MimIR
MimIR is my Intermediate Representation
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
6namespace 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`
13class LowerPtr : public RWPhase {
14public:
17
18 const Def* rewrite_imm_App(const App*) override;
19};
20
21} // namespace mim::plug::buffer
Base class for all Defs.
Definition def.h:261
flags_t annex() const
Definition phase.h:81
RWPhase(World &world, std::string name, Analysis *analysis=nullptr)
Definition phase.h:316
World & world()=delete
Hides both and forbids direct access.
The World represents the whole program and manages creation of MimIR nodes (Defs).
Definition world.h:36
LowerPtr(World &world, flags_t annex)
Definition lower_ptr.h:15
const Def * rewrite_imm_App(const App *) override
Definition lower_ptr.cpp:44
The buffer Plugin
Definition buffer.h:7
u64 flags_t
Definition types.h:39