Namespaces | |
| namespace | phase |
Enumerations | |
%mem.Ptr | |
| enum class | Ptr : flags_t |
%mem.Ptr0 | |
| enum class | Ptr0 : flags_t |
%mem.free | |
| enum class | free : flags_t |
%mem.add_mem | |
| enum class | add_mem : flags_t |
%mem.seo | |
| enum class | seo : flags_t |
%mem.remem_repl | |
| enum class | remem_repl : flags_t |
%mem.alloc2malloc_repl | |
| enum class | alloc2malloc_repl : flags_t |
Functions | |
| void | register_normalizers (Normalizers &normalizers) |
Variables | |
| static constexpr plugin_t | Plugin_Id = 0x3863800000000000 |
%mem.M | |
| enum class | M : flags_t |
| Lam * | mut_con (World &w, nat_t a=0) |
| Yields con[mem.M 0]. | |
| Lam * | mut_con (const Def *dom) |
| Yields con[mem.M 0, dom]. | |
| const App * | isa_mem (const Def *def) |
If def is a mem.M-typed value, yields its memory type mem.M a; otherwise nullptr. | |
| bool | has_leading_mem (const Pi *pi) |
Does pi already thread memory - a leading mem.M, either directly or grouped as the first component of the first parameter (e.g. | |
| const Def * | mem_def (const Def *def) |
| Returns the (first) element of type mem.M a from the given tuple. | |
| const Def * | mem_var (Lam *lam) |
| Returns the memory argument of a function if it has one. | |
| const Def * | strip_mem_ty (const Def *def) |
| Removes recusively all occurences of mem from a type (sigma). | |
| const Def * | strip_mem (const Def *def) |
| Recursively removes all occurrences of mem from a tuple. | |
%mem.load | |
| enum class | load : flags_t |
| const Def * | normalize_load (const Def *type, const Def *, const Def *arg) |
%mem.store | |
| enum class | store : flags_t |
| const Def * | normalize_store (const Def *, const Def *, const Def *arg) |
%mem.remem | |
| enum class | remem : flags_t |
| const Def * | normalize_remem (const Def *, const Def *, const Def *) |
%mem.alloc | |
| enum class | alloc : flags_t |
| const Def * | op_alloc (const Def *type, const Def *as, const Def *mem) |
| const Def * | op_alloc (const Def *type, const Def *mem) |
%mem.slot | |
| enum class | slot : flags_t |
| const Def * | op_slot (const Def *type, const Def *as, const Def *mem, const Def *ret) |
| const Def * | op_slot (const Def *type, const Def *mem, const Def *ret) |
| std::tuple< const Def *, Lam *, const Def *, const Def * > | split_slot (const App *slot) |
Decomposes the continuation-based slot into (mem, ret_lam, ret_mem, ptr), where ret_mem is the continuation's mem and ptr is the continuation's slot var; the slot's lifetime is ret_lam's scope. | |
%mem.malloc | |
| enum class | malloc : flags_t |
| const Def * | op_malloc (const Def *type, const Def *as, const Def *mem) |
| const Def * | op_malloc (const Def *type, const Def *mem) |
%mem.mslot | |
| enum class | mslot : flags_t |
| const Def * | op_mslot (const Def *type, const Def *as, const Def *mem, const Def *ret) |
| const Def * | op_mslot (const Def *type, const Def *mem, const Def *ret) |
%mem.lea | |
| enum class | lea : flags_t |
| const Def * | pointee (const Def *ptr) |
| const Def * | op_lea (const Def *ptr, const Def *index) |
| const Def * | op_lea_unsafe (const Def *ptr, const Def *i) |
| const Def * | op_lea_unsafe (const Def *ptr, u64 i) |
| const Def * | normalize_lea (const Def *, const Def *, const Def *arg) |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
inline |
Does pi already thread memory - a leading mem.M, either directly or grouped as the first component of the first parameter (e.g.
the Fn [mem.M 0, To, ins] → … shape of a mem-threaded combiner)?
Definition at line 33 of file mem.h.
References mim::Pi::dom(), mim::Axm::isa(), and mim::Def::num_ops().
Referenced by mim::plug::mem::phase::AddMem::rewrite_imm_Pi().
If def is a mem.M-typed value, yields its memory type mem.M a; otherwise nullptr.
Null-safe: type-level Defs (e.g. mim::Univ) have no type and hence are not memory.
Definition at line 26 of file mem.h.
References mim::Axm::isa(), and mim::Def::type().
Referenced by mem_def(), mim::plug::mem::phase::AddMem::rewrite(), and mim::plug::mem::phase::AddMem::rewrite_imm_Tuple().
Returns the (first) element of type mem.M a from the given tuple.
Definition at line 42 of file mem.h.
References isa_mem(), mem_def(), mim::Def::num_projs(), mim::Def::projs(), and mim::Def::type().
Referenced by mem_def(), mem_var(), and mim::plug::affine::phase::LowerFor::rewrite_imm_App().
Returns the memory argument of a function if it has one.
Definition at line 55 of file mem.h.
References mem_def(), and mim::Def::var().
Referenced by mim::plug::affine::phase::LowerFor::rewrite_imm_App(), and mim::plug::mem::phase::AddMem::rewrite_mut_Lam().
Yields con[mem.M 0].
Definition at line 16 of file mem.h.
Referenced by mim::plug::matrix::phase::LowerMatrixMediumLevel::rewrite_imm_App().
Definition at line 7 of file normalizers.cpp.
References mim::Axm::as(), mim::Lit::isa(), pointee(), and mim::Def::projs().
Definition at line 16 of file normalizers.cpp.
References mim::Axm::as(), mim::Def::num_ops(), mim::Def::op(), pointee(), and mim::Def::projs().
Definition at line 31 of file normalizers.cpp.
Definition at line 33 of file normalizers.cpp.
References mim::Seq::body(), and mim::Def::projs().
Definition at line 129 of file mem.h.
Referenced by op_alloc(), mim::plug::clos::phase::LowerTypedClos::rewrite(), and mim::plug::buffer::LowerPtr::rewrite_imm_App().
Definition at line 133 of file mem.h.
References op_alloc().
Definition at line 112 of file mem.h.
References mim::Axm::as(), pointee(), mim::tuple_of_types(), mim::Def::type(), and mim::Def::world().
Referenced by op_lea_unsafe().
Definition at line 119 of file mem.h.
References mim::Axm::as(), op_lea(), mim::Def::type(), mim::plug::core::u, and mim::Def::world().
Referenced by op_lea_unsafe().
Definition at line 124 of file mem.h.
References mim::World::lit_i64(), op_lea_unsafe(), and mim::Def::world().
Definition at line 160 of file mem.h.
References mim::plug::core::size.
Referenced by op_malloc(), and reg_phases().
Definition at line 165 of file mem.h.
References op_malloc().
|
inline |
Builds the continuation-based %mem.mslot (type, as) applied to (mem, size) and the continuation ret. ret is a Cn [mem.M as, mem.Ptr (type, as)] receiving the fresh slot; its scope delimits the slot's lifetime.
Definition at line 172 of file mem.h.
References mim::plug::core::size.
Referenced by op_mslot(), and reg_phases().
Definition at line 177 of file mem.h.
References op_mslot().
|
inline |
Builds the continuation-based %mem.slot (type, as) applied to mem and the continuation ret. ret is a Cn [mem.M as, mem.Ptr (type, as)] receiving the fresh slot; its scope delimits the slot's lifetime.
Definition at line 140 of file mem.h.
Referenced by op_slot(), and mim::plug::mem::phase::SEO::rewrite_imm_App().
Definition at line 104 of file mem.h.
References mim::Axm::as(), pointee(), and mim::Def::type().
Referenced by mim::plug::mem::phase::mk_phi(), normalize_lea(), normalize_load(), op_lea(), and pointee().
| void mim::plug::mem::register_normalizers | ( | Normalizers & | normalizers | ) |
Referenced by mim_get_plugin().
|
inline |
Decomposes the continuation-based slot into (mem, ret_lam, ret_mem, ptr), where ret_mem is the continuation's mem and ptr is the continuation's slot var; the slot's lifetime is ret_lam's scope.
Definition at line 150 of file mem.h.
Referenced by mim::plug::mem::phase::SEO::rewrite_imm_App().
Recursively removes all occurrences of mem from a tuple.
Returns an empty tuple if applied with mem alone.
Definition at line 76 of file mem.h.
References mim::Axm::isa(), strip_mem(), mim::Def::type(), and mim::Def::world().
Referenced by strip_mem().
Removes recusively all occurences of mem from a type (sigma).
Definition at line 58 of file mem.h.
References mim::Axm::isa(), strip_mem_ty(), and mim::Def::world().
Referenced by mim::plug::ll::Emitter::convert_ret_pi(), and strip_mem_ty().