MimIR
0.3-dev
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
matrix.cpp
Go to the documentation of this file.
1
#include "
mim/plug/matrix/matrix.h
"
2
3
#include <
mim/phase.h
>
4
#include <
mim/plugin.h
>
5
6
#include "
mim/plug/matrix/phase/lower_aff.h
"
7
#include "
mim/plug/matrix/phase/lower_matrix_highlevel.h
"
8
#include "
mim/plug/matrix/phase/lower_matrix_mediumlevel.h
"
9
10
using namespace
mim
;
11
using namespace
mim::plug
;
12
13
void
reg_phases
(
Flags2Phases
& phases) {
14
// clang-format off
15
Phase::hook<matrix::lower_matrix_high_level_map_reduce, matrix::phase::LowerMatrixHighLevelMapRed>
(phases);
16
Phase::hook<matrix::lower_matrix_medium_level, matrix::phase::LowerMatrixMediumLevel >
(phases);
17
Phase::hook<matrix::lower_aff, matrix::phase::LowerAff >
(phases);
18
// clang-format on
19
// The matrix-to-pointer lowering now lives in the `buffer` plugin (%buffer.lower_ptr).
20
}
21
22
extern
"C"
MIM_EXPORT
Plugin
mim_get_plugin
() {
23
return
{
"matrix"
,
MIM_VERSION
,
matrix::register_normalizers
,
reg_phases
};
24
}
reg_phases
void reg_phases(Flags2Phases &phases)
Definition
affine.cpp:12
mim::Phase::hook
static void hook(Flags2Phases &phases)
Definition
phase.h:70
MIM_EXPORT
#define MIM_EXPORT
Definition
config.h:19
lower_aff.h
lower_matrix_highlevel.h
lower_matrix_mediumlevel.h
reg_phases
void reg_phases(Flags2Phases &phases)
Definition
matrix.cpp:13
matrix.h
mim::plug::matrix::register_normalizers
void register_normalizers(Normalizers &normalizers)
mim::plug
Definition
lower_for.h:5
mim
Definition
ast.h:14
mim::Flags2Phases
absl::flat_hash_map< flags_t, std::function< std::unique_ptr< Phase >(World &)> > Flags2Phases
Maps an axiom of a Phase to a function that creates one.
Definition
plugin.h:25
mim::mim_get_plugin
mim::Plugin mim_get_plugin()
phase.h
plugin.h
MIM_VERSION
#define MIM_VERSION
Definition
plugin.h:54
mim::Plugin
Basic info and registration function pointer to be returned from a specific plugin.
Definition
plugin.h:59
src
mim
plug
matrix
matrix.cpp
Generated by
1.16.1