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

Classes

class  AddMem
 Threads the mem.M memory monad through the world: mem-extends continuations and rewires every memory operand to the current memory at that program point. More...
class  FreeLocals
 Frees the memory a function allocates but does not let escape; see mem::EscapeAnalysis. More...
class  Heap2Stack
 Turns a mem.alloc that does not escape its function (see mem::EscapeAnalysis) into a mem.slot. More...
class  SEO
 Symbolic Expression Optimization. More...

Enumerations

enum  {
  Proxy_SCCP_Top ,
  Proxy_Bundle ,
  Proxy_Sloxy ,
  Proxy_Phi
}

Functions

static size_t idx_of (Defs vars, const Def *p)
static const Proxy * isa_bundle (const Def *def, Lam *lam)
static const Def * mk_phi (World &w, Lam *lam, const Def *sloxy)
static const Var * slot_var (const Def *ptr)
static std::pair< const Proxy *, DefVec > sloxy_path (const Def *abstr_ptr)
 The sloxy abstr_ptr points into, and the literal mem.lea indices on the way, outermost first.
static bool keep (Lam *lam, const Def *old_var, const Def *abstr)

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
Proxy_SCCP_Top 
Proxy_Bundle 
Proxy_Sloxy 
Proxy_Phi 

Definition at line 14 of file seo.cpp.

Function Documentation

◆ idx_of()

size_t mim::plug::mem::phase::idx_of ( Defs vars,
const Def * p )
static

Definition at line 22 of file seo.cpp.

References idx_of(), and mim::Var::isa_tproj().

Referenced by idx_of().

◆ isa_bundle()

const Proxy * mim::plug::mem::phase::isa_bundle ( const Def * def,
Lam * lam )
static

Definition at line 109 of file seo.cpp.

References mim::Proxy::isa(), and isa_bundle().

Referenced by isa_bundle(), and keep().

◆ keep()

bool mim::plug::mem::phase::keep ( Lam * lam,
const Def * old_var,
const Def * abstr )
static

Definition at line 474 of file seo.cpp.

References mim::Proxy::isa(), isa_bundle(), and keep().

Referenced by keep().

◆ mk_phi()

const Def * mim::plug::mem::phase::mk_phi ( World & w,
Lam * lam,
const Def * sloxy )
static

Definition at line 183 of file seo.cpp.

References mim::Def::dbg_key(), mk_phi(), mim::plug::mem::pointee(), Proxy_Phi, and mim::Def::var().

Referenced by mk_phi().

◆ slot_var()

const Var * mim::plug::mem::phase::slot_var ( const Def * ptr)
static

Definition at line 204 of file seo.cpp.

References slot_var().

Referenced by slot_var().

◆ sloxy_path()

std::pair< const Proxy *, DefVec > mim::plug::mem::phase::sloxy_path ( const Def * abstr_ptr)
static

The sloxy abstr_ptr points into, and the literal mem.lea indices on the way, outermost first.

Definition at line 207 of file seo.cpp.

References mim::Axm::isa(), mim::Lit::isa(), mim::Proxy::isa(), mim::Def::num_tprojs(), mim::plug::mem::pointee(), and sloxy_path().

Referenced by sloxy_path().