MimIR
0.6-dev
MimIR is my Intermediate Representation
Toggle main menu visibility
Loading...
Searching...
No Matches
normalizers.cpp
Go to the documentation of this file.
1
#include <
mim/world.h
>
2
3
#include "
mim/plug/mach/mach.h
"
4
5
namespace
mim::plug::mach
{
6
7
const
Def
*
normalize_lit
(
const
Def
* type,
const
Def
*,
const
Def
* arg) {
8
return
Lit::isa
(arg) ? type->world().lit_tt() :
nullptr
;
9
}
10
11
const
Def
*
normalize_zext
(
const
Def
* type,
const
Def
*,
const
Def
* x) {
return
fold_ext
(type, x,
false
); }
12
13
MIM_mach_NORMALIZER_IMPL
14
15
}
// namespace mim::plug::mach
mim::Def
Base class for all Defs.
Definition
def.h:285
mim::Lit::isa
static std::optional< T > isa(const Def *def)
Definition
def.h:974
MIM_mach_NORMALIZER_IMPL
#define MIM_mach_NORMALIZER_IMPL
Definition
autogen.h:172
mach.h
mim::plug::mach
The mach Plugin
Definition
asm.h:15
mim::plug::mach::normalize_lit
const Def * normalize_lit(const Def *type, const Def *, const Def *arg)
Definition
normalizers.cpp:7
mim::plug::mach::fold_ext
const Def * fold_ext(const Def *type, const Def *x, bool sign)
x of Idx s as a literal of type, sign-extended if sign.
Definition
mach.h:20
mim::plug::mach::normalize_zext
const Def * normalize_zext(const Def *type, const Def *, const Def *x)
Definition
normalizers.cpp:11
world.h
src
mim
plug
mach
normalizers.cpp
Generated by
1.18.0