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
5
namespace
mim
{
6
7
size_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
mim::Bound::find
size_t find(const Def *type) const
Definition
lattice.cpp:7
mim::Def
Base class for all Defs.
Definition
def.h:223
mim::Def::isa_mut
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
mim::Def::ops
auto ops() const
Definition
def.h:268
mim::Def::type
const Def * type() const
Definition
def.h:248
lattice.h
mim
Definition
cfg.h:11
mim::binary_find
I binary_find(I begin, I end, T val, Cmp cmp)
Definition
util.h:58
mim::GIDLt
Definition
util.h:172
util.h
src
mim
lattice.cpp
Generated by
1.12.0