MimIR
MimIR is my Intermediate Representation
Loading...
Searching...
No Matches
nvptx.cpp
Go to the documentation of this file.
2
3#include <mim/phase.h>
4#include <mim/plugin.h>
5
6#include "mim/plug/gpu/gpu.h"
7
8using namespace mim;
9using namespace mim::plug;
10
11void reg_phases(Flags2Phases& phases) {
13 auto stream_flags = Annex::base<gpu::Stream>();
14 if (def->flags() == stream_flags) return world().annex<nvptx::Stream>();
15 return {};
16 });
17}
18
19extern "C" MIM_EXPORT Plugin mim_get_plugin() { return {"nvptx", MIM_VERSION, nullptr, reg_phases}; }
void reg_phases(Flags2Phases &phases)
Definition affine.cpp:12
#define MIM_EXPORT
Definition config.h:19
Definition ast.h:14
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::Plugin mim_get_plugin()
void reg_phases(Flags2Phases &phases)
Definition nvptx.cpp:11
#define MIM_REPL(__phases, __annex,...)
Definition phase.h:406
#define MIM_VERSION
Definition plugin.h:54
static consteval flags_t base()
Definition plugin.h:150
Basic info and registration function pointer to be returned from a specific plugin.
Definition plugin.h:59