MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
lattice.cpp
Go to the documentation of this file.
1#include "mim/lattice.h"
2
3#include "mim/util/util.h"
4
5namespace mim {
6
7size_t Bound::find(const Def* type) const {
8 auto i = isa_mut() ? std::find(ops().begin(), ops().end(), type)
9 : binary_find(ops().begin(), ops().end(), type, GIDLt<const Def*>());
10 return i == ops().end() ? size_t(-1) : i - ops().begin();
11}
12
13} // namespace mim
size_t find(const Def *type) const
Definition lattice.cpp:7
Base class for all Defs.
Definition def.h:223
T * isa_mut() const
If this is *mut*able, it will cast constness away and perform a dynamic_cast to T.
Definition def.h:447
auto ops() const
Definition def.h:268
const Def * type() const
Definition def.h:248
Definition cfg.h:11
I binary_find(I begin, I end, T val, Cmp cmp)
Definition util.h:58