MimIR
0.4-dev
MimIR is my Intermediate Representation
Toggle main menu visibility
Loading...
Searching...
No Matches
lattice.cpp
Go to the documentation of this file.
1
#include "
mim/lattice.h
"
2
3
#include <fe/algo.h>
4
5
#include "
mim/util/gid.h
"
6
7
namespace
mim
{
8
9
size_t
Bound::find
(
const
Def*
type
)
const
{
10
auto
lt =
GIDLt<const Def*>
();
11
auto
i =
isa_mut
() ? std::find(
ops
().begin(),
ops
().end(),
type
) : fe::binary_find(
ops
(),
type
, lt);
12
return
i ==
ops
().end() ? size_t(-1) : i -
ops
().begin();
13
}
14
15
}
// namespace mim
mim::Bound::find
size_t find(const Def *type) const
Definition
lattice.cpp:9
mim::Def::ops
constexpr auto ops() const noexcept
Definition
def.h:348
mim::Def::isa_mut
T * isa_mut() const
If this is mutable, it will cast constness away and perform a dynamic_cast to T.
Definition
def.h:580
mim::Def::type
const Def * type() const noexcept
Yields the "raw" type of this Def (maybe nullptr).
Definition
def.h:1111
gid.h
lattice.h
mim
Definition
ast.h:16
mim::GIDLt
Definition
gid.h:17
src
mim
lattice.cpp
Generated by
1.18.0