MimIR
0.4-dev
MimIR is my Intermediate Representation
Toggle main menu visibility
Loading...
Searching...
No Matches
lower_ptr.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
mim/def.h
>
4
#include <
mim/phase.h
>
5
6
namespace
mim::plug::buffer
{
7
8
/// Lowers the `buffer` abstraction to the low-level pointer representation.
9
/// The `Buf` type is replaced by a pointer to nested arrays.
10
/// - `alloc` is replaced with `mem.alloc`
11
/// - `read` becomes `mem.lea` + `mem.load`
12
/// - `write` becomes `mem.lea` + `mem.store`
13
class
LowerPtr
:
public
RWPhase
{
14
public
:
15
LowerPtr
(
World
&
world
,
flags_t
annex
)
16
:
RWPhase
(
world
,
annex
) {}
17
18
const
Def
*
rewrite_imm_App
(
const
App
*)
override
;
19
};
20
21
}
// namespace mim::plug::buffer
mim::App
Definition
lam.h:224
mim::Def
Base class for all Defs.
Definition
def.h:273
mim::Phase::annex
flags_t annex() const
Definition
phase.h:81
mim::RWPhase::RWPhase
RWPhase(World &world, std::string name, Analysis *analysis=nullptr)
Definition
phase.h:431
mim::RWPhase::world
World & world()=delete
Hides both and forbids direct access.
mim::World
The World represents the whole program and manages creation of MimIR nodes (Defs).
Definition
world.h:40
mim::plug::buffer::LowerPtr::LowerPtr
LowerPtr(World &world, flags_t annex)
Definition
lower_ptr.h:15
mim::plug::buffer::LowerPtr::rewrite_imm_App
const Def * rewrite_imm_App(const App *) override
Definition
lower_ptr.cpp:46
def.h
mim::plug::buffer
The buffer Plugin
Definition
buffer.h:7
mim::flags_t
u64 flags_t
Definition
types.h:39
phase.h
include
mim
plug
buffer
phase
lower_ptr.h
Generated by
1.18.0