MimIR
0.4-dev
MimIR is my Intermediate Representation
Toggle main menu visibility
Loading...
Searching...
No Matches
split_off_kernels.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
SplitOffKernels
:
public
RWPhase
{
10
public
:
11
SplitOffKernels
(
World
&
world
,
flags_t
annex
)
12
:
RWPhase
(
world
,
annex
) {}
13
SplitOffKernels
(
World
&
world
, std::string
name
)
14
:
RWPhase
(
world
, std::move(
name
)) {}
15
16
private
:
17
void
start
() final;
18
bool
analyze
() final;
19
void
analyze
(const
Def
*);
20
21
const
Def
*
rewrite_mut_Lam
(
Lam
*) final;
22
23
DefSet
analyzed_;
24
LamSet
kernels_;
25
};
26
27
}
// namespace mim::plug::gpu::phase
mim::Def
Base class for all Defs.
Definition
def.h:273
mim::Lam
A function.
Definition
lam.h:113
mim::Phase::annex
flags_t annex() const
Definition
phase.h:81
mim::Phase::name
std::string_view name() const
Definition
phase.h:80
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::SplitOffKernels::start
void start() final
RWBase::start() and then swaps the two worlds.
Definition
split_off_kernels.cpp:7
mim::plug::gpu::phase::SplitOffKernels::analyze
bool analyze() final
Runs the optional pre-analysis on Phase::world, typically to a fixed point, before rewriting begins.
Definition
split_off_kernels.cpp:17
mim::plug::gpu::phase::SplitOffKernels::SplitOffKernels
SplitOffKernels(World &world, flags_t annex)
Definition
split_off_kernels.h:11
mim::plug::gpu::phase::SplitOffKernels::SplitOffKernels
SplitOffKernels(World &world, std::string name)
Definition
split_off_kernels.h:13
mim::plug::gpu::phase::SplitOffKernels::rewrite_mut_Lam
const Def * rewrite_mut_Lam(Lam *) final
Definition
split_off_kernels.cpp:38
gpu.h
mim::plug::gpu::phase
Definition
lower_map_reduce.h:7
mim::LamSet
GIDSet< Lam * > LamSet
Definition
lam.h:220
mim::flags_t
u64 flags_t
Definition
types.h:39
mim::DefSet
GIDSet< const Def * > DefSet
Definition
def.h:89
phase.h
include
mim
plug
gpu
phase
split_off_kernels.h
Generated by
1.18.0