MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
mim::plug::ll Namespace Reference

The ll Plugin More...

Classes

struct  BB
class  Emit
 Pipeline phase for ll.emit. More...
class  Emitter

Enumerations

<tt>ll.emit</tt>
enum class  emit : flags_t
<tt>ll.vec</tt>
enum class  vec : flags_t
<tt>ll.novec</tt>
enum class  novec : flags_t

Functions

void 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_ll_finalize (Emitter &e)
void mim_ll_emit_epilogue (Emitter &e, Lam *lam)
void mim_ll_emit_bb (Emitter &e, BB &bb, const Def *def, std::string &res)
Emitter::Rt arg_rt (fe::View< std::string > args)
 Parses -X <backend>:rt=extern|embed; Emitter::Rt::embed is the default.
static std::optional< std::pair< nat_t, const Def * > > is_simd (const Def *type)
static nat_t 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 fmath_flags (math::Mode mode)
static const char * ncmp_pred (core::ncmp id)
static const char * icmp_pred (core::icmp id)
static const char * fcmp_pred (math::cmp id)

Variables

static constexpr plugin_t Plugin_Id = 0x34d0000000000000

Detailed Description

Enumeration Type Documentation

◆ emit

enum class mim::plug::ll::emit : flags_t
strong

Definition at line 14 of file autogen.h.

◆ novec

enum class mim::plug::ll::novec : flags_t
strong

Definition at line 28 of file autogen.h.

◆ vec

enum class mim::plug::ll::vec : flags_t
strong

Definition at line 21 of file autogen.h.

Function Documentation

◆ arg_rt()

Emitter::Rt mim::plug::ll::arg_rt ( fe::View< std::string > args)
inline

Parses -X <backend>:rt=extern|embed; Emitter::Rt::embed is the default.

Definition at line 325 of file ll.h.

References arg_rt(), mim::arg_value(), mim::plug::ll::Emitter::embed, and mim::plug::ll::Emitter::ext.

Referenced by arg_rt(), mim::plug::ll::Emit::start(), and mim::plug::nvptx::Emit::start().

◆ fcmp_pred()

◆ fmath_flags()

◆ icmp_pred()

◆ idx_bitwidth()

nat_t mim::plug::ll::idx_bitwidth ( const Def * type)
static

An Idx n whose n is only known at runtime is bounded by a Nat, hence an i64.

Definition at line 53 of file ll.cpp.

References idx_bitwidth(), mim::Idx::isa(), and mim::Idx::size2bitwidth().

Referenced by idx_bitwidth().

◆ is_simd()

std::optional< std::pair< nat_t, const Def * > > mim::plug::ll::is_simd ( const Def * type)
inlinestatic

◆ mim_ll_convert()

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).

libmim_nvptx reaches them through these extern "C" shims instead of recompiling the bodies; Emitter caches the pointers via GET_FUN_PTR in its constructor.

Definition at line 1158 of file ll.cpp.

◆ mim_ll_emit_bb()

void mim::plug::ll::mim_ll_emit_bb ( Emitter & e,
BB & bb,
const Def * def,
std::string & res )

Definition at line 1163 of file ll.cpp.

◆ mim_ll_emit_epilogue()

void mim::plug::ll::mim_ll_emit_epilogue ( Emitter & e,
Lam * lam )

Definition at line 1162 of file ll.cpp.

◆ mim_ll_finalize()

void mim::plug::ll::mim_ll_finalize ( Emitter & e)

Definition at line 1161 of file ll.cpp.

◆ ncmp_pred()

const char * mim::plug::ll::ncmp_pred ( core::ncmp id)
static

Variable Documentation

◆ Plugin_Id

plugin_t mim::plug::ll::Plugin_Id = 0x34d0000000000000
staticconstexpr

Definition at line 10 of file autogen.h.