MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
ll.cpp File Reference
#include "mim/plug/ll/ll.h"
#include <ranges>
#include <string>
#include <mim/config.h>
#include <mim/phase.h>
#include <mim/plugin.h>
#include <mim/plug/core/core.h>
Include dependency graph for ll.cpp:

Go to the source code of this file.

Classes

class  mim::plug::ll::Emit
 Pipeline phase for ll.emit. More...

Namespaces

namespace  mim
namespace  mim::plug
namespace  mim::plug::ll
 The ll Plugin

Functions

static nat_t mim::plug::ll::idx_bitwidth (const Def *type)
 An Idx n whose n is only known at runtime is bounded by a Nat, hence an i64.
static std::string mim::plug::ll::fmath_flags (math::Mode mode)
static const char * mim::plug::ll::ncmp_pred (core::ncmp id)
static const char * mim::plug::ll::icmp_pred (core::icmp id)
static const char * mim::plug::ll::fcmp_pred (math::cmp id)
void mim::plug::ll::mim_ll_convert (Emitter &e, const Def *type, bool simd, std::string &res)
 The heavy, target-independent emitter methods are compiled once into libmim_ll (see ll.cpp).
void mim::plug::ll::mim_ll_finalize (Emitter &e)
void mim::plug::ll::mim_ll_emit_epilogue (Emitter &e, Lam *lam)
void mim::plug::ll::mim_ll_emit_bb (Emitter &e, BB &bb, const Def *def, std::string &res)
static void reg_phases (Flags2Phases &phases)
 MIM_PLUGIN_ENTRY (ll)

Variables

static constexpr PluginArg known_args []
static const PluginSym known_syms []

Function Documentation

◆ MIM_PLUGIN_ENTRY()

MIM_PLUGIN_ENTRY ( ll )

Definition at line 1188 of file ll.cpp.

References known_args, known_syms, MIM_PLUGIN_ENTRY, and reg_phases().

◆ reg_phases()

void reg_phases ( Flags2Phases & phases)
static

Definition at line 1170 of file ll.cpp.

References mim::Phase::hook(), and reg_phases().

Referenced by MIM_PLUGIN_ENTRY(), and reg_phases().

Variable Documentation

◆ known_args

PluginArg known_args[]
staticconstexpr
Initial value:
= {
{"o=<file>, output=<file>", "Writes the LLVM IR to `<file>` instead of the default `<world>.ll`/`a.ll`; `<file>` may be `-` for stdout."},
{"rt=embed, rt=extern", "How the C runtime wrappers reach the output: `embed` (default) splices their LLVM IR into the module; `extern` only `declare`s them and leaves linking to you."},
}

Definition at line 1173 of file ll.cpp.

Referenced by MIM_PLUGIN_ENTRY().

◆ known_syms

const PluginSym known_syms[]
static
Initial value:
= {
}
void mim_ll_finalize(Emitter &)
Definition ll.cpp:1161
void mim_ll_emit_epilogue(Emitter &, Lam *)
Definition ll.cpp:1162
void mim_ll_convert(Emitter &, const Def *, bool simd, std::string &res)
The heavy, target-independent emitter methods are compiled once into libmim_ll (see ll....
Definition ll.cpp:1158
void mim_ll_emit_bb(Emitter &, BB &, const Def *, std::string &res)
Definition ll.cpp:1163
#define MIM_PLUGIN_SYM(f)
Builds a PluginSym for f, so name and address cannot drift apart.
Definition plugin.h:54

Definition at line 1181 of file ll.cpp.

Referenced by MIM_PLUGIN_ENTRY().