MimIR
0.4-dev
MimIR is my Intermediate Representation
Toggle main menu visibility
Loading...
Searching...
No Matches
lower_map_reduce.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
mim/phase.h
>
4
5
#include "
mim/plug/gpu/gpu.h
"
6
7
namespace
mim::plug::gpu::phase
{
8
9
class
LowerMapReduce
:
public
RWPhase
{
10
public
:
11
using
Super
=
RWPhase
;
12
13
LowerMapReduce
(
World
&
world
,
flags_t
annex
)
14
:
Super
(
world
,
annex
) {}
15
16
private
:
17
/// Skips the whole phase if the program already contains an explicit `gpu.init`.
18
// TODO: consider different solution to gpu.init vs gpu.auto_init problem
19
void
start
() final;
20
const
Def
*
rewrite_imm_App
(const
App
*) final;
21
22
const
Def
* lower_map_reduce_post(const
App
*);
23
};
24
25
}
// namespace mim::plug::gpu::phase
mim::App
Definition
lam.h:224
mim::Def
Base class for all Defs.
Definition
def.h:273
mim::Phase::annex
flags_t annex() const
Definition
phase.h:81
mim::RWPhase::RWPhase
RWPhase(World &world, std::string name, Analysis *analysis=nullptr)
Definition
phase.h:431
mim::RWPhase::world
World & world()=delete
Hides both and forbids direct access.
mim::World
The World represents the whole program and manages creation of MimIR nodes (Defs).
Definition
world.h:40
mim::plug::gpu::phase::LowerMapReduce::start
void start() final
Skips the whole phase if the program already contains an explicit gpu.init.
Definition
lower_map_reduce.cpp:353
mim::plug::gpu::phase::LowerMapReduce::LowerMapReduce
LowerMapReduce(World &world, flags_t annex)
Definition
lower_map_reduce.h:13
mim::plug::gpu::phase::LowerMapReduce::Super
RWPhase Super
Definition
lower_map_reduce.h:11
mim::plug::gpu::phase::LowerMapReduce::rewrite_imm_App
const Def * rewrite_imm_App(const App *) final
Definition
lower_map_reduce.cpp:364
gpu.h
mim::plug::gpu::phase
Definition
lower_map_reduce.h:7
mim::flags_t
u64 flags_t
Definition
types.h:39
phase.h
include
mim
plug
gpu
phase
lower_map_reduce.h
Generated by
1.18.0