MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
normalizers.cpp
Go to the documentation of this file.
1#include <mim/world.h>
2
4
5namespace mim::plug::mach {
6
7const Def* normalize_lit(const Def* type, const Def*, const Def* arg) {
8 return Lit::isa(arg) ? type->world().lit_tt() : nullptr;
9}
10
11const Def* normalize_zext(const Def* type, const Def*, const Def* x) { return fold_ext(type, x, false); }
12
14
15} // namespace mim::plug::mach
Base class for all Defs.
Definition def.h:285
static std::optional< T > isa(const Def *def)
Definition def.h:974
#define MIM_mach_NORMALIZER_IMPL
Definition autogen.h:172
The mach Plugin
Definition asm.h:15
const Def * normalize_lit(const Def *type, const Def *, const Def *arg)
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
const Def * normalize_zext(const Def *type, const Def *, const Def *x)