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:
15 using RWPhase::RWPhase;
16
17 const Def* rewrite_imm_App(const App*) override;
18};
19
20} // namespace mim::plug::buffer
Base class for all Defs.
Definition def.h:289
RWPhase(World &world, std::string name, Analysis *analysis=nullptr)
Definition phase.h:334
Lowers the buffer abstraction to the low-level pointer representation.
Definition lower_ptr.h:13
const Def * rewrite_imm_App(const App *) override
Definition lower_ptr.cpp:13
RWPhase(World &world, std::string name, Analysis *analysis=nullptr)
Definition phase.h:334
The buffer Plugin
Definition buffer.h:8