MimIR
0.5-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
/// Afterwards, old_world() is the host, which keeps each kernel as a declaration, and new_world() the device.
10
class
SplitOffKernels
:
public
RWPhase
{
11
public
:
12
using
RWPhase::RWPhase
;
13
14
private
:
15
void
start
()
final
;
16
bool
analyze
()
final
;
17
void
analyze
(
const
Def
*);
18
19
const
Def
*
rewrite_mut_Lam
(
Lam
*)
final
;
20
21
DefSet
analyzed_;
22
LamSet
kernels_;
23
};
24
25
}
// namespace mim::plug::gpu::phase
mim::Def
Base class for all Defs.
Definition
def.h:289
mim::Lam
A function.
Definition
lam.h:91
mim::RWPhase::RWPhase
RWPhase(World &world, std::string name, Analysis *analysis=nullptr)
Definition
phase.h:334
mim::plug::gpu::phase::SplitOffKernels
Afterwards, old_world() is the host, which keeps each kernel as a declaration, and new_world() the de...
Definition
split_off_kernels.h:10
mim::plug::gpu::phase::SplitOffKernels::start
void start() final
Actual entry.
Definition
split_off_kernels.cpp:5
mim::plug::gpu::phase::SplitOffKernels::analyze
bool analyze() final
Runs the optional pre-analysis on old_world(), typically to a fixed point, before rewriting begins.
Definition
split_off_kernels.cpp:18
mim::plug::gpu::phase::SplitOffKernels::RWPhase
RWPhase(World &world, std::string name, Analysis *analysis=nullptr)
Definition
phase.h:334
mim::plug::gpu::phase::SplitOffKernels::rewrite_mut_Lam
const Def * rewrite_mut_Lam(Lam *) final
Definition
split_off_kernels.cpp:37
gpu.h
mim::plug::gpu::phase
Definition
lower_map_reduce.h:5
mim::LamSet
GIDSet< Lam * > LamSet
Definition
lam.h:211
mim::DefSet
GIDSet< const Def * > DefSet
Definition
def.h:94
phase.h
include
mim
plug
gpu
phase
split_off_kernels.h
Generated by
1.18.0