11 static constexpr size_t Type = -1_s;
18 size_t index()
const {
return index_; }
19 const Def*
def()
const {
return def_; }
20 operator const Def*()
const {
return def_; }
22 bool operator==(
Use other)
const {
return this->def_ == other.def_ && this->index_ == other.index_; }
31 if constexpr (
sizeof(size_t) == 8)
42using Uses = absl::flat_hash_set<Use, UseHash, UseEq>;
64 if (
auto i = def2uses_.find(def); i != def2uses_.end())
return i->second;
85 swap(s1.nest_, s2.nest_);
86 swap(s1.early_, s2.early_);
87 swap(s1.late_, s2.late_);
88 swap(s1.smart_, s2.smart_);
89 swap(s1.def2uses_, s2.def2uses_);
93 const Nest* nest_ =
nullptr;
constexpr u32 gid() const noexcept
Def * mut() const
The mutable capsulated in this Node or nullptr, if it's a virtual root comprising several Nodes.
Builds a nesting tree of all immutables‍/binders.
const Node * root() const
const Nest::Node * smart(Def *curr, const Def *)
Scheduler(Scheduler &&other) noexcept
Scheduler(const Scheduler &)=delete
Scheduler & operator=(Scheduler other) noexcept
const Nest::Node * late(Def *curr, const Def *)
const Uses & uses(const Def *def) const
static Schedule schedule(const Nest &)
const Nest & nest() const
const Nest::Node * early(const Def *)
friend void swap(Scheduler &s1, Scheduler &s2) noexcept
Use(const Def *def, size_t index)
const Def * operator->() const
bool operator==(Use other) const
The World represents the whole program and manages creation of MimIR nodes (Defs).
GIDMap< const Def *, To > DefMap
size_t hash_combine(size_t seed, T v)
absl::flat_hash_set< Use, UseHash, UseEq > Uses
bool operator()(Use u1, Use u2) const
size_t operator()(Use use) const