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