MimIR
MimIR is my Intermediate Representation
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
7namespace mim::plug::gpu::phase {
8
9class SplitOffKernels : public RWPhase {
10public:
14 : RWPhase(world, std::move(name)) {}
15
16private:
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
Base class for all Defs.
Definition def.h:261
A function.
Definition lam.h:110
flags_t annex() const
Definition phase.h:81
std::string_view name() const
Definition phase.h:80
RWPhase(World &world, std::string name, Analysis *analysis=nullptr)
Definition phase.h:316
World & world()=delete
Hides both and forbids direct access.
The World represents the whole program and manages creation of MimIR nodes (Defs).
Definition world.h:36
bool analyze() final
Runs the optional pre-analysis on RWPhase::old_world(), typically to a fixed point,...
SplitOffKernels(World &world, flags_t annex)
SplitOffKernels(World &world, std::string name)
GIDSet< Lam * > LamSet
Definition lam.h:220
u64 flags_t
Definition types.h:39
GIDSet< const Def * > DefSet
Definition def.h:76
Definition span.h:126