Thorin 1.9.0
The Higher ORder INtermediate representation
|
In this phase, we lower all matrix operations and types to the low-level representation using pointers. More...
#include <thorin/plug/matrix/pass/lower_matrix_lowlevel.h>
Public Member Functions | |
LowerMatrixLowLevel (World &world) | |
Ref | rewrite_imm (Ref) override |
Public Member Functions inherited from thorin::RWPhase | |
RWPhase (World &world, std::string_view name) | |
World & | world () |
void | start () override |
Actual entry. | |
Public Member Functions inherited from thorin::Phase | |
Phase (World &world, std::string_view name, bool dirty) | |
virtual | ~Phase ()=default |
World & | world () |
std::string_view | name () const |
bool | is_dirty () const |
virtual void | run () |
Entry point and generates some debug output; invokes Phase::start. | |
Public Member Functions inherited from thorin::Rewriter | |
Rewriter (World &world) | |
World & | world () |
Ref | map (Ref old_def, Ref new_def) |
Map old_def to new_def and returns new_def ;. | |
virtual Ref | rewrite (Ref) |
virtual Ref | rewrite_mut (Def *) |
Additional Inherited Members | |
Static Public Member Functions inherited from thorin::Phase | |
template<class P , class... Args> | |
static void | run (Args &&... args) |
Runs a single Phase. | |
Protected Attributes inherited from thorin::Phase | |
World & | world_ |
std::string | name_ |
bool | dirty_ |
In this phase, we lower all matrix operations and types to the low-level representation using pointers.
The matrix type is replaced by a pointer to n nested arrays.
init
is replaced with alloc
read
becomes lea+load
insert
becomes lea+store
constMat
becomes alloc+pack+store
Definition at line 17 of file lower_matrix_lowlevel.h.
|
inline |
Definition at line 19 of file lower_matrix_lowlevel.h.
Reimplemented from thorin::Rewriter.
Definition at line 59 of file lower_matrix_lowlevel.cpp.
References thorin::World::call(), thorin::World::lit_nat_0(), thorin::plug::mem::op_alloc(), thorin::Def::projs(), thorin::Rewriter::rewrite(), thorin::Rewriter::rewrite_imm(), thorin::World::tuple(), thorin::Def::type(), and thorin::RWPhase::world().