3#include <absl/container/btree_set.h>
53 const LamSet& unknowns()
const {
return unknowns_; }
56 const auto& slots()
const {
return slots_; }
57 const auto& lam2sloxy2val()
const {
return lam2sloxy2val_; }
58 const Def* lam2sloxy2val(
Lam* lam,
const Def* sloxy);
62 const Proxy* mk_sccp_top(
const Def* var);
67 const Def* apply_known(
Lam* known,
Defs abstr_targs);
77 const Def* sloxy2val(
const Def* sloxy,
const Def* val) {
return lam2sloxy2val_[
curr_mut<Lam>()][sloxy] = val; }
86 absl::node_hash_map<Lam*, Def2Def, GIDHash<const Def*>> lam2sloxy2val_;
92 absl::btree_set<const Def*, GIDLt<const Def*>> slots_;
100 , analysis_(
world) {}
114 const Def* isa_optimized_sloxy(
const Def*)
const;
128 absl::node_hash_map<Lam*, Vector<Phi>,
GIDHash<Lam*>> lam2phis_;
Traverses the current World using Rewriter infrastructure while staying in the same world.
virtual void reset()
Clears the rewriter map and resets Phase::todo() for the next fixed-point iteration.
virtual void finalize()
Run after the main analysis - only in full rounds, so it always sees the complete abstract World.
Rebuilds old_world() into new_world() and then swaps them.
virtual bool analyze()
Runs the optional pre-analysis on RWPhase::old_world(), typically to a fixed point,...
RWPhase(World &world, std::string name, Analysis *analysis=nullptr)
World & world()=delete
Hides both and forbids direct access.
This is a thin wrapper for std::span<T, N> with the following additional features:
This is a thin wrapper for absl::InlinedVector<T, N, A> which is a drop-in replacement for std::vecto...
The World represents the whole program and manages creation of MimIR nodes (Defs).
const Def * rewrite_imm_App(const App *) final
const Def * rewrite_mut_Lam(Lam *) final
SEO(World &world, flags_t annex)
DefMap< const Def * > Def2Def
Vector< const Def * > DefVec
GIDMap< Lam *, To > LamMap
GIDSet< const Def * > DefSet