Thorin 1.9.0
The Higher ORder INtermediate representation
|
Classes | |
class | AddMem |
This phase adds mems to all lambdas and continuations. More... | |
class | Alloc2Malloc |
class | CopyProp |
This FPPass is similar to sparse conditional constant propagation (SCCP). More... | |
class | RememElim |
class | Reshape |
The general idea of this pass/phase is to change the shape of signatures of functions. More... | |
class | SSAConstr |
SSA construction algorithm that promotes slots, loads, and stores to SSA values. More... | |
Typedefs | |
using | DefQueue = std::deque< const Def * > |
Enumerations | |
%mem.Ptr | |
enum class | AddrSpace : nat_t { Generic = 0 , Global = 1 , Texture = 2 , Shared = 3 , Constant = 4 } |
enum | Ptr : flags_t |
%mem.Ptr0 | |
enum | Ptr0 : flags_t |
%mem.free | |
enum | free : flags_t |
%mem.ignore | |
enum | ignore : flags_t |
%mem.rm | |
enum | rm : flags_t |
%mem.reshape_mode | |
enum | reshape_mode : flags_t |
%mem.reshape_flat | |
enum | reshape_flat : flags_t |
%mem.reshape_arg | |
enum | reshape_arg : flags_t |
%mem.ssa_pass | |
enum | ssa_pass : flags_t |
%mem.copy_prop_pass | |
enum | copy_prop_pass : flags_t |
%mem.remem_elim_pass | |
enum | remem_elim_pass : flags_t |
%mem.alloc2malloc_pass | |
enum | alloc2malloc_pass : flags_t |
%mem.reshape_pass | |
enum | reshape_pass : flags_t |
%mem.add_mem_phase | |
enum | add_mem_phase : flags_t |
Functions | |
void | register_normalizers (Normalizers &normalizers) |
Variables | |
static constexpr plugin_t | Plugin_Id = 0x3863800000000000 |
%mem.M | |
enum | M : flags_t |
enum | m : flags_t |
Lam * | mut_con (World &w) |
Yields .con[mem.M] . | |
Lam * | mut_con (Ref dom) |
Yields .con[mem.M, dom] . | |
Ref | mem_def (Ref def) |
Returns the (first) element of type mem::M from the given tuple. | |
Ref | mem_var (Lam *lam) |
Returns the memory argument of a function if it has one. | |
Ref | replace_mem (Ref mem, Ref arg) |
Swaps the memory occurrences in the given def with the given memory. | |
Ref | strip_mem_ty (Ref def) |
Removes recusively all occurences of mem from a type (sigma). | |
Ref | strip_mem (Ref def) |
Recursively removes all occurrences of mem from a tuple. | |
%mem.load | |
enum | load : flags_t |
Ref | normalize_load (Ref type, Ref callee, Ref arg) |
%mem.store | |
enum | store : flags_t |
Ref | normalize_store (Ref type, Ref callee, Ref arg) |
%mem.remem | |
enum | remem : flags_t |
Ref | op_remem (Ref mem) |
Ref | normalize_remem (Ref type, Ref callee, Ref mem) |
%mem.alloc | |
enum | alloc : flags_t |
Ref | op_alloc (Ref type, Ref mem) |
%mem.slot | |
enum | slot : flags_t |
Ref | op_slot (Ref type, Ref mem) |
%mem.malloc | |
enum | malloc : flags_t |
Ref | op_malloc (Ref type, Ref mem) |
%mem.mslot | |
enum | mslot : flags_t |
Ref | op_mslot (Ref type, Ref mem, Ref id) |
%mem.lea | |
enum | lea : flags_t |
Ref | op_lea (Ref ptr, Ref index) |
Ref | op_lea_unsafe (Ref ptr, Ref i) |
Ref | op_lea_unsafe (Ref ptr, u64 i) |
Ref | normalize_lea (Ref type, Ref callee, Ref arg) |
using thorin::plug::mem::DefQueue = typedef std::deque<const Def*> |
|
strong |
enum thorin::plug::mem::alloc : flags_t |
enum thorin::plug::mem::free : flags_t |
enum thorin::plug::mem::ignore : flags_t |
enum thorin::plug::mem::lea : flags_t |
enum thorin::plug::mem::load : flags_t |
enum thorin::plug::mem::M : flags_t |
enum thorin::plug::mem::m : flags_t |
enum thorin::plug::mem::malloc : flags_t |
enum thorin::plug::mem::mslot : flags_t |
enum thorin::plug::mem::Ptr : flags_t |
enum thorin::plug::mem::Ptr0 : flags_t |
enum thorin::plug::mem::remem : flags_t |
enum thorin::plug::mem::rm : flags_t |
enum thorin::plug::mem::slot : flags_t |
enum thorin::plug::mem::store : flags_t |
Returns the (first) element of type mem::M from the given tuple.
Definition at line 25 of file mem.h.
References mem_def(), thorin::Def::num_projs(), thorin::Def::projs(), and thorin::Def::type().
Referenced by mem_def(), mem_var(), and thorin::plug::affine::LowerFor::rewrite().
Returns the memory argument of a function if it has one.
Definition at line 38 of file mem.h.
References mem_def(), and thorin::Def::var().
Referenced by thorin::plug::clos::Clos2SJLJ::enter(), thorin::plug::affine::LowerFor::rewrite(), and thorin::plug::mem::CopyProp::rewrite().
Yields .con[mem.M]
.
Definition at line 16 of file mem.h.
Referenced by dfa2matcher(), thorin::plug::clos::Clos2SJLJ::enter(), and thorin::plug::matrix::LowerMatrixMediumLevel::rewrite_().
Definition at line 7 of file normalizers.cpp.
References thorin::Lit::isa(), thorin::Def::projs(), and thorin::Def::world().
Definition at line 18 of file normalizers.cpp.
References thorin::Def::op(), thorin::Def::projs(), and thorin::Def::world().
Definition at line 32 of file normalizers.cpp.
References normalize_remem(), thorin::World::raw_app(), and thorin::Def::world().
Referenced by normalize_remem().
Definition at line 39 of file normalizers.cpp.
References thorin::Pack::body(), normalize_store(), thorin::Def::projs(), and thorin::Def::world().
Referenced by normalize_store().
Definition at line 136 of file mem.h.
References thorin::Def::world().
Referenced by thorin::plug::matrix::LowerMatrixLowLevel::rewrite_imm().
Definition at line 111 of file mem.h.
References thorin::tuple_of_types(), thorin::Def::type(), and thorin::Def::world().
Referenced by op_lea_unsafe().
Definition at line 118 of file mem.h.
References op_lea(), thorin::Def::type(), thorin::plug::core::u, and thorin::Def::world().
Referenced by op_lea_unsafe().
Definition at line 123 of file mem.h.
References thorin::World::lit_i64(), op_lea_unsafe(), and thorin::Def::world().
Definition at line 152 of file mem.h.
References thorin::plug::core::size, and thorin::Def::world().
Referenced by thorin::plug::mem::Alloc2Malloc::rewrite().
Definition at line 161 of file mem.h.
References thorin::plug::core::size, and thorin::Def::world().
Referenced by thorin::plug::mem::Alloc2Malloc::rewrite().
Definition at line 128 of file mem.h.
Referenced by thorin::plug::mem::SSAConstr::rewrite().
Definition at line 144 of file mem.h.
References thorin::Def::world().
Referenced by thorin::plug::clos::Clos2SJLJ::enter().
void thorin::plug::mem::register_normalizers | ( | Normalizers & | normalizers | ) |
Referenced by thorin_get_plugin().
Swaps the memory occurrences in the given def with the given memory.
Definition at line 41 of file mem.h.
References thorin::Def::num_projs(), and thorin::Def::type().
Recursively removes all occurrences of mem from a tuple.
Returns an empty tuple if applied with mem alone.
Definition at line 72 of file mem.h.
References strip_mem(), thorin::Def::type(), and thorin::Def::world().
Referenced by strip_mem().
Removes recusively all occurences of mem from a type (sigma).
Definition at line 54 of file mem.h.
References strip_mem_ty(), and thorin::Def::world().
Referenced by strip_mem_ty().