MimIR
0.5-dev
MimIR is my Intermediate Representation
Toggle main menu visibility
Loading...
Searching...
No Matches
autogen.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
mim/axm.h
>
4
#include <
mim/plugin.h
>
5
6
/// @namespace mim::plug::compile @ref compile
7
namespace
mim
{
8
namespace
plug::compile
{
9
10
static
constexpr
plugin_t
Plugin_Id
= 0x11039128d1800000;
11
12
/// @name `compile.Phase`
13
///@{
14
enum class
Phase
:
flags_t
{
15
};
16
17
///@}
18
19
/// @name `compile.aggr`
20
///@{
21
enum class
aggr
:
flags_t
{
22
};
23
24
const
Def
*
normalize_aggr
(
const
Def
*,
const
Def
*,
const
Def
*);
25
///@}
26
27
/// @name `compile.cond`
28
///@{
29
enum class
cond
:
flags_t
{
30
};
31
32
const
Def
*
normalize_cond
(
const
Def
*,
const
Def
*,
const
Def
*);
33
///@}
34
35
/// @name `compile.is_loaded`
36
///@{
37
enum class
is_loaded
:
flags_t
{
38
};
39
40
const
Def
*
normalize_is_loaded
(
const
Def
*,
const
Def
*,
const
Def
*);
41
///@}
42
43
/// @name `compile.named`
44
///@{
45
enum class
named
:
flags_t
{
46
};
47
48
///@}
49
50
/// @name `compile.phases`
51
///@{
52
enum class
phases
:
flags_t
{
53
};
54
55
///@}
56
57
/// @name `compile.adce`
58
///@{
59
enum class
adce
:
flags_t
{
60
};
61
62
///@}
63
64
/// @name `compile.beta_red`
65
///@{
66
enum class
beta_red
:
flags_t
{
67
};
68
69
///@}
70
71
/// @name `compile.cleanup`
72
///@{
73
enum class
cleanup
:
flags_t
{
74
};
75
76
///@}
77
78
/// @name `compile.dispatch_normalize`
79
///@{
80
enum class
dispatch_normalize
:
flags_t
{
81
};
82
83
///@}
84
85
/// @name `compile.eta_conv`
86
///@{
87
enum class
eta_conv
:
flags_t
{
88
};
89
90
///@}
91
92
/// @name `compile.lam_spec`
93
///@{
94
enum class
lam_spec
:
flags_t
{
95
};
96
97
///@}
98
99
/// @name `compile.nom_erasure`
100
///@{
101
enum class
nom_erasure
:
flags_t
{
102
};
103
104
///@}
105
106
/// @name `compile.null`
107
///@{
108
enum class
null
:
flags_t
{
109
};
110
111
///@}
112
113
/// @name `compile.ret_wrap`
114
///@{
115
enum class
ret_wrap
:
flags_t
{
116
};
117
118
///@}
119
120
/// @name `compile.scalarize`
121
///@{
122
enum class
scalarize
:
flags_t
{
123
};
124
125
///@}
126
127
/// @name `compile.sccp`
128
///@{
129
enum class
sccp
:
flags_t
{
130
};
131
132
///@}
133
134
/// @name `compile.single_erasure`
135
///@{
136
enum class
single_erasure
:
flags_t
{
137
};
138
139
///@}
140
141
/// @name `compile.static_arg_opt`
142
///@{
143
enum class
static_arg_opt
:
flags_t
{
144
};
145
146
///@}
147
148
void
register_normalizers
(
Normalizers
& normalizers);
149
150
#define MIM_compile_NORMALIZER_IMPL \
151
void register_normalizers(Normalizers& normalizers) {\
152
normalizers[flags_t(Annex::Base<aggr>)] = &normalize_aggr; \
153
normalizers[flags_t(Annex::Base<cond>)] = &normalize_cond; \
154
normalizers[flags_t(Annex::Base<is_loaded>)] = &normalize_is_loaded; \
155
}
156
}
// namespace plug::compile
157
158
#ifndef DOXYGEN
// don't include in Doxygen documentation
159
160
template
<>
constexpr
flags_t
Annex::Base<plug::compile::Phase>
= 0x11039128d1800000;
161
template
<>
constexpr
size_t
Annex::Num<plug::compile::Phase>
= 0;
162
template
<>
constexpr
flags_t
Annex::Base<plug::compile::aggr>
= 0x11039128d1800100;
163
template
<>
constexpr
size_t
Annex::Num<plug::compile::aggr>
= 0;
164
template
<>
constexpr
flags_t
Annex::Base<plug::compile::cond>
= 0x11039128d1800200;
165
template
<>
constexpr
size_t
Annex::Num<plug::compile::cond>
= 0;
166
template
<>
constexpr
flags_t
Annex::Base<plug::compile::is_loaded>
= 0x11039128d1800300;
167
template
<>
constexpr
size_t
Annex::Num<plug::compile::is_loaded>
= 0;
168
template
<>
constexpr
flags_t
Annex::Base<plug::compile::named>
= 0x11039128d1800400;
169
template
<>
constexpr
size_t
Annex::Num<plug::compile::named>
= 0;
170
template
<>
constexpr
flags_t
Annex::Base<plug::compile::phases>
= 0x11039128d1800500;
171
template
<>
constexpr
size_t
Annex::Num<plug::compile::phases>
= 0;
172
template
<>
constexpr
flags_t
Annex::Base<plug::compile::adce>
= 0x11039128d1800600;
173
template
<>
constexpr
size_t
Annex::Num<plug::compile::adce>
= 0;
174
template
<>
constexpr
flags_t
Annex::Base<plug::compile::beta_red>
= 0x11039128d1800700;
175
template
<>
constexpr
size_t
Annex::Num<plug::compile::beta_red>
= 0;
176
template
<>
constexpr
flags_t
Annex::Base<plug::compile::cleanup>
= 0x11039128d1800800;
177
template
<>
constexpr
size_t
Annex::Num<plug::compile::cleanup>
= 0;
178
template
<>
constexpr
flags_t
Annex::Base<plug::compile::dispatch_normalize>
= 0x11039128d1800900;
179
template
<>
constexpr
size_t
Annex::Num<plug::compile::dispatch_normalize>
= 0;
180
template
<>
constexpr
flags_t
Annex::Base<plug::compile::eta_conv>
= 0x11039128d1800a00;
181
template
<>
constexpr
size_t
Annex::Num<plug::compile::eta_conv>
= 0;
182
template
<>
constexpr
flags_t
Annex::Base<plug::compile::lam_spec>
= 0x11039128d1800b00;
183
template
<>
constexpr
size_t
Annex::Num<plug::compile::lam_spec>
= 0;
184
template
<>
constexpr
flags_t
Annex::Base<plug::compile::nom_erasure>
= 0x11039128d1800c00;
185
template
<>
constexpr
size_t
Annex::Num<plug::compile::nom_erasure>
= 0;
186
template
<>
constexpr
flags_t
Annex::Base<plug::compile::null>
= 0x11039128d1800d00;
187
template
<>
constexpr
size_t
Annex::Num<plug::compile::null>
= 0;
188
template
<>
constexpr
flags_t
Annex::Base<plug::compile::ret_wrap>
= 0x11039128d1800e00;
189
template
<>
constexpr
size_t
Annex::Num<plug::compile::ret_wrap>
= 0;
190
template
<>
constexpr
flags_t
Annex::Base<plug::compile::scalarize>
= 0x11039128d1800f00;
191
template
<>
constexpr
size_t
Annex::Num<plug::compile::scalarize>
= 0;
192
template
<>
constexpr
flags_t
Annex::Base<plug::compile::sccp>
= 0x11039128d1801000;
193
template
<>
constexpr
size_t
Annex::Num<plug::compile::sccp>
= 0;
194
template
<>
constexpr
flags_t
Annex::Base<plug::compile::single_erasure>
= 0x11039128d1801100;
195
template
<>
constexpr
size_t
Annex::Num<plug::compile::single_erasure>
= 0;
196
template
<>
constexpr
flags_t
Annex::Base<plug::compile::static_arg_opt>
= 0x11039128d1801200;
197
template
<>
constexpr
size_t
Annex::Num<plug::compile::static_arg_opt>
= 0;
198
199
template
<>
struct
Axm::IsANode
<
plug
::compile::Phase> {
using
type
=
Axm
; };
200
template
<>
struct
Axm::IsANode
<
plug
::compile::adce> {
using
type
=
Axm
; };
201
template
<>
struct
Axm::IsANode
<
plug
::compile::beta_red> {
using
type
=
Axm
; };
202
template
<>
struct
Axm::IsANode
<
plug
::compile::cleanup> {
using
type
=
Axm
; };
203
template
<>
struct
Axm::IsANode
<
plug
::compile::dispatch_normalize> {
using
type
=
Axm
; };
204
template
<>
struct
Axm::IsANode
<
plug
::compile::eta_conv> {
using
type
=
Axm
; };
205
template
<>
struct
Axm::IsANode
<
plug
::compile::lam_spec> {
using
type
=
Axm
; };
206
template
<>
struct
Axm::IsANode
<
plug
::compile::nom_erasure> {
using
type
=
Axm
; };
207
template
<>
struct
Axm::IsANode
<
plug
::compile::null> {
using
type
=
Axm
; };
208
template
<>
struct
Axm::IsANode
<
plug
::compile::ret_wrap> {
using
type
=
Axm
; };
209
template
<>
struct
Axm::IsANode
<
plug
::compile::scalarize> {
using
type
=
Axm
; };
210
template
<>
struct
Axm::IsANode
<
plug
::compile::sccp> {
using
type
=
Axm
; };
211
template
<>
struct
Axm::IsANode
<
plug
::compile::single_erasure> {
using
type
=
Axm
; };
212
template
<>
struct
Axm::IsANode
<
plug
::compile::static_arg_opt> {
using
type
=
Axm
; };
213
214
#endif
215
}
// namespace mim
216
217
#ifndef DOXYGEN
// don't include in Doxygen documentation
218
219
220
#endif
axm.h
mim::Axm::IsANode::type
App type
Definition
axm.h:70
mim::Axm::IsANode
Definition
axm.h:69
mim::Def
Base class for all Defs.
Definition
def.h:289
mim::plug::compile
The compile Plugin
Definition
normalizers.cpp:7
mim::plug::compile::lam_spec
lam_spec
Definition
autogen.h:94
mim::plug::compile::aggr
aggr
Definition
autogen.h:21
mim::plug::compile::normalize_cond
const Def * normalize_cond(const Def *, const Def *callee, const Def *phase)
compile.cond name phase ↦ phase if name's plugin is loaded, else compile.null.
Definition
normalizers.cpp:26
mim::plug::compile::phases
phases
Definition
autogen.h:52
mim::plug::compile::single_erasure
single_erasure
Definition
autogen.h:136
mim::plug::compile::register_normalizers
void register_normalizers(Normalizers &normalizers)
mim::plug::compile::null
null
Definition
autogen.h:108
mim::plug::compile::static_arg_opt
static_arg_opt
Definition
autogen.h:143
mim::plug::compile::sccp
sccp
Definition
autogen.h:129
mim::plug::compile::nom_erasure
nom_erasure
Definition
autogen.h:101
mim::plug::compile::is_loaded
is_loaded
Definition
autogen.h:37
mim::plug::compile::eta_conv
eta_conv
Definition
autogen.h:87
mim::plug::compile::ret_wrap
ret_wrap
Definition
autogen.h:115
mim::plug::compile::normalize_is_loaded
const Def * normalize_is_loaded(const Def *, const Def *, const Def *arg)
Definition
normalizers.cpp:9
mim::plug::compile::Phase
Phase
Definition
autogen.h:14
mim::plug::compile::cond
cond
Definition
autogen.h:29
mim::plug::compile::scalarize
scalarize
Definition
autogen.h:122
mim::plug::compile::dispatch_normalize
dispatch_normalize
Definition
autogen.h:80
mim::plug::compile::beta_red
beta_red
Definition
autogen.h:66
mim::plug::compile::adce
adce
Definition
autogen.h:59
mim::plug::compile::named
named
Definition
autogen.h:45
mim::plug::compile::cleanup
cleanup
Definition
autogen.h:73
mim::plug::compile::Plugin_Id
static constexpr plugin_t Plugin_Id
Definition
autogen.h:10
mim::plug::compile::normalize_aggr
const Def * normalize_aggr(const Def *, const Def *, const Def *arg)
compile.aggr fallback ↦ tt/ff if -X compile:aggr/:no-aggr was passed, else fallback.
Definition
normalizers.cpp:18
mim::plug
Definition
affine.h:10
mim
Definition
ast.h:16
mim::flags_t
u64 flags_t
Definition
types.h:39
mim::Normalizers
ankerl::unordered_dense::map< flags_t, NormalizeFn > Normalizers
Definition
plugin.h:27
mim::plugin_t
u64 plugin_t
Definition
types.h:40
mim::Node::Axm
@ Axm
Definition
def.h:125
plugin.h
mim::Annex::Num
static constexpr size_t Num
Number of Axm::subtags.
Definition
plugin.h:273
mim::Annex::Base
static constexpr flags_t Base
Definition
plugin.h:274
build
include
mim
plug
compile
autogen.h
Generated by
1.18.0