MimIR 0.1
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
lower_matrix_lowlevel.h
Go to the documentation of this file.
1#pragma once
2
3#include <mim/def.h>
4#include <mim/pass.h>
5#include <mim/phase.h>
6
7namespace mim::plug::matrix {
8
9/// In this phase, we lower all matrix operations and types to the low-level representation using pointers.
10/// The matrix type is replaced by a pointer to n nested arrays.
11/// - `init` is replaced with `alloc`
12/// - `read` becomes `lea+load`
13/// - `insert` becomes `lea+store`
14/// - `constMat` becomes `alloc+pack+store`
15
17public:
20
21 const Def* rewrite_imm_App(const App*) override;
22
23private:
24 Def2Def rewritten;
25};
26
27} // namespace mim::plug::matrix
Base class for all Defs.
Definition def.h:251
RWPhase(World &world, std::string name)
Definition phase.h:71
World & world()=delete
Hides both and forbids direct access.
flags_t annex() const
Definition pass.h:68
The World represents the whole program and manages creation of MimIR nodes (Defs).
Definition world.h:36
const Def * rewrite_imm_App(const App *) override
LowerMatrixLowLevel(World &world, flags_t annex)
The matrix Plugin
Definition matrix.h:7
DefMap< const Def * > Def2Def
Definition def.h:75
u64 flags_t
Definition types.h:45