MimIR
0.6-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::mach @ref mach
7
namespace
mim
{
8
namespace
plug::mach
{
9
10
static
constexpr
plugin_t
Plugin_Id
= 0x3821090000000000;
11
12
/// @name `mach.Flags`
13
///@{
14
enum class
Flags
:
flags_t
{
15
};
16
17
///@}
18
19
/// @name `mach.Spill`
20
///@{
21
enum class
Spill
:
flags_t
{
22
};
23
24
///@}
25
26
/// @name `mach.in`
27
///@{
28
enum class
in
:
flags_t
{
29
};
30
31
///@}
32
33
/// @name `mach.zext`
34
///@{
35
enum class
zext
:
flags_t
{
36
};
37
38
const
Def
*
normalize_zext
(
const
Def
*,
const
Def
*,
const
Def
*);
39
///@}
40
41
/// @name `mach.sched`
42
///@{
43
enum class
sched
:
flags_t
{
44
};
45
46
///@}
47
48
/// @name `mach.slot`
49
///@{
50
enum class
slot
:
flags_t
{
51
};
52
53
///@}
54
55
/// @name `mach.load`
56
///@{
57
enum class
load
:
flags_t
{
58
};
59
60
///@}
61
62
/// @name `mach.store`
63
///@{
64
enum class
store
:
flags_t
{
65
};
66
67
///@}
68
69
/// @name `mach.spill`
70
///@{
71
enum class
spill
:
flags_t
{
72
};
73
74
///@}
75
76
/// @name `mach.reload`
77
///@{
78
enum class
reload
:
flags_t
{
79
};
80
81
///@}
82
83
/// @name `mach.fpe`
84
///@{
85
enum class
fpe
:
flags_t
{
86
};
87
88
///@}
89
90
/// @name `mach.fok`
91
///@{
92
enum class
fok
:
flags_t
{
93
};
94
95
///@}
96
97
/// @name `mach.float`
98
///@{
99
enum class
float_
:
flags_t
{
100
arith = 0x3821090000000c00,
101
unary = 0x3821090000000c01,
102
};
103
104
///@}
105
106
/// @name `mach.lit`
107
///@{
108
enum class
lit
:
flags_t
{
109
};
110
111
const
Def
*
normalize_lit
(
const
Def
*,
const
Def
*,
const
Def
*);
112
///@}
113
114
/// @name `mach.libcall`
115
///@{
116
enum class
libcall
:
flags_t
{
117
};
118
119
///@}
120
121
/// @name `mach.legalize`
122
///@{
123
enum class
legalize
:
flags_t
{
124
};
125
126
///@}
127
128
/// @name `mach.schedule`
129
///@{
130
enum class
schedule
:
flags_t
{
131
};
132
133
///@}
134
135
/// @name `mach.close`
136
///@{
137
enum class
close
:
flags_t
{
138
};
139
140
///@}
141
142
/// @name `mach.spilling`
143
///@{
144
enum class
spilling
:
flags_t
{
145
};
146
147
///@}
148
149
/// @name `mach.constrain`
150
///@{
151
enum class
constrain
:
flags_t
{
152
};
153
154
///@}
155
156
/// @name `mach.regalloc`
157
///@{
158
enum class
regalloc
:
flags_t
{
159
};
160
161
///@}
162
163
/// @name `mach.live`
164
///@{
165
enum class
live
:
flags_t
{
166
};
167
168
///@}
169
170
void
register_normalizers
(
Normalizers
& normalizers);
171
172
#define MIM_mach_NORMALIZER_IMPL \
173
void register_normalizers(Normalizers& normalizers) {\
174
normalizers[flags_t(Annex::Base<zext>)] = &normalize_zext; \
175
normalizers[flags_t(Annex::Base<lit>)] = &normalize_lit; \
176
}
177
}
// namespace plug::mach
178
179
#ifndef DOXYGEN
// don't include in Doxygen documentation
180
181
template
<>
constexpr
flags_t
Annex::Base<plug::mach::Flags>
= 0x3821090000000000;
182
template
<>
constexpr
size_t
Annex::Num<plug::mach::Flags>
= 0;
183
template
<>
constexpr
flags_t
Annex::Base<plug::mach::Spill>
= 0x3821090000000100;
184
template
<>
constexpr
size_t
Annex::Num<plug::mach::Spill>
= 0;
185
template
<>
constexpr
flags_t
Annex::Base<plug::mach::in>
= 0x3821090000000200;
186
template
<>
constexpr
size_t
Annex::Num<plug::mach::in>
= 0;
187
template
<>
constexpr
flags_t
Annex::Base<plug::mach::zext>
= 0x3821090000000300;
188
template
<>
constexpr
size_t
Annex::Num<plug::mach::zext>
= 0;
189
template
<>
constexpr
flags_t
Annex::Base<plug::mach::sched>
= 0x3821090000000400;
190
template
<>
constexpr
size_t
Annex::Num<plug::mach::sched>
= 0;
191
template
<>
constexpr
flags_t
Annex::Base<plug::mach::slot>
= 0x3821090000000500;
192
template
<>
constexpr
size_t
Annex::Num<plug::mach::slot>
= 0;
193
template
<>
constexpr
flags_t
Annex::Base<plug::mach::load>
= 0x3821090000000600;
194
template
<>
constexpr
size_t
Annex::Num<plug::mach::load>
= 0;
195
template
<>
constexpr
flags_t
Annex::Base<plug::mach::store>
= 0x3821090000000700;
196
template
<>
constexpr
size_t
Annex::Num<plug::mach::store>
= 0;
197
template
<>
constexpr
flags_t
Annex::Base<plug::mach::spill>
= 0x3821090000000800;
198
template
<>
constexpr
size_t
Annex::Num<plug::mach::spill>
= 0;
199
template
<>
constexpr
flags_t
Annex::Base<plug::mach::reload>
= 0x3821090000000900;
200
template
<>
constexpr
size_t
Annex::Num<plug::mach::reload>
= 0;
201
template
<>
constexpr
flags_t
Annex::Base<plug::mach::fpe>
= 0x3821090000000a00;
202
template
<>
constexpr
size_t
Annex::Num<plug::mach::fpe>
= 0;
203
template
<>
constexpr
flags_t
Annex::Base<plug::mach::fok>
= 0x3821090000000b00;
204
template
<>
constexpr
size_t
Annex::Num<plug::mach::fok>
= 0;
205
template
<>
constexpr
flags_t
Annex::Base<plug::mach::float_>
= 0x3821090000000c00;
206
template
<>
constexpr
size_t
Annex::Num<plug::mach::float_>
= 2;
207
template
<>
constexpr
flags_t
Annex::Base<plug::mach::lit>
= 0x3821090000000d00;
208
template
<>
constexpr
size_t
Annex::Num<plug::mach::lit>
= 0;
209
template
<>
constexpr
flags_t
Annex::Base<plug::mach::libcall>
= 0x3821090000000e00;
210
template
<>
constexpr
size_t
Annex::Num<plug::mach::libcall>
= 0;
211
template
<>
constexpr
flags_t
Annex::Base<plug::mach::legalize>
= 0x3821090000000f00;
212
template
<>
constexpr
size_t
Annex::Num<plug::mach::legalize>
= 0;
213
template
<>
constexpr
flags_t
Annex::Base<plug::mach::schedule>
= 0x3821090000001000;
214
template
<>
constexpr
size_t
Annex::Num<plug::mach::schedule>
= 0;
215
template
<>
constexpr
flags_t
Annex::Base<plug::mach::close>
= 0x3821090000001100;
216
template
<>
constexpr
size_t
Annex::Num<plug::mach::close>
= 0;
217
template
<>
constexpr
flags_t
Annex::Base<plug::mach::spilling>
= 0x3821090000001200;
218
template
<>
constexpr
size_t
Annex::Num<plug::mach::spilling>
= 0;
219
template
<>
constexpr
flags_t
Annex::Base<plug::mach::constrain>
= 0x3821090000001300;
220
template
<>
constexpr
size_t
Annex::Num<plug::mach::constrain>
= 0;
221
template
<>
constexpr
flags_t
Annex::Base<plug::mach::regalloc>
= 0x3821090000001400;
222
template
<>
constexpr
size_t
Annex::Num<plug::mach::regalloc>
= 0;
223
template
<>
constexpr
flags_t
Annex::Base<plug::mach::live>
= 0x3821090000001500;
224
template
<>
constexpr
size_t
Annex::Num<plug::mach::live>
= 0;
225
226
template
<>
struct
Axm::IsANode
<
plug
::mach::Flags> {
using
type
=
Axm
; };
227
template
<>
struct
Axm::IsANode
<
plug
::mach::fpe> {
using
type
=
Axm
; };
228
template
<>
struct
Axm::IsANode
<
plug
::mach::fok> {
using
type
=
Axm
; };
229
template
<>
struct
Axm::IsANode
<
plug
::mach::float_> {
using
type
=
Axm
; };
230
template
<>
struct
Axm::IsANode
<
plug
::mach::libcall> {
using
type
=
Axm
; };
231
template
<>
struct
Axm::IsANode
<
plug
::mach::legalize> {
using
type
=
Axm
; };
232
template
<>
struct
Axm::IsANode
<
plug
::mach::schedule> {
using
type
=
Axm
; };
233
template
<>
struct
Axm::IsANode
<
plug
::mach::close> {
using
type
=
Axm
; };
234
template
<>
struct
Axm::IsANode
<
plug
::mach::spilling> {
using
type
=
Axm
; };
235
template
<>
struct
Axm::IsANode
<
plug
::mach::constrain> {
using
type
=
Axm
; };
236
template
<>
struct
Axm::IsANode
<
plug
::mach::regalloc> {
using
type
=
Axm
; };
237
template
<>
struct
Axm::IsANode
<
plug
::mach::live> {
using
type
=
Axm
; };
238
239
#endif
240
}
// namespace mim
241
242
#ifndef DOXYGEN
// don't include in Doxygen documentation
243
244
template
<>
struct
fe::is_bit_enum<
mim
::plug::mach::float_> : std::true_type {};
245
246
#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:285
mim::plug::mach
The mach Plugin
Definition
asm.h:15
mim::plug::mach::reload
reload
Definition
autogen.h:78
mim::plug::mach::normalize_lit
const Def * normalize_lit(const Def *type, const Def *, const Def *arg)
Definition
normalizers.cpp:7
mim::plug::mach::in
in
Definition
autogen.h:28
mim::plug::mach::lit
lit
Definition
autogen.h:108
mim::plug::mach::fok
fok
Definition
autogen.h:92
mim::plug::mach::close
close
Definition
autogen.h:137
mim::plug::mach::Flags
Flags
Definition
autogen.h:14
mim::plug::mach::live
live
Definition
autogen.h:165
mim::plug::mach::slot
slot
Definition
autogen.h:50
mim::plug::mach::float_
float_
Definition
autogen.h:99
mim::plug::mach::legalize
legalize
Definition
autogen.h:123
mim::plug::mach::zext
zext
Definition
autogen.h:35
mim::plug::mach::schedule
schedule
Definition
autogen.h:130
mim::plug::mach::Spill
Spill
Definition
autogen.h:21
mim::plug::mach::register_normalizers
void register_normalizers(Normalizers &normalizers)
mim::plug::mach::store
store
Definition
autogen.h:64
mim::plug::mach::constrain
constrain
Definition
autogen.h:151
mim::plug::mach::libcall
libcall
Definition
autogen.h:116
mim::plug::mach::spill
spill
Definition
autogen.h:71
mim::plug::mach::fpe
fpe
Definition
autogen.h:85
mim::plug::mach::spilling
spilling
Definition
autogen.h:144
mim::plug::mach::load
load
Definition
autogen.h:57
mim::plug::mach::normalize_zext
const Def * normalize_zext(const Def *type, const Def *, const Def *x)
Definition
normalizers.cpp:11
mim::plug::mach::regalloc
regalloc
Definition
autogen.h:158
mim::plug::mach::Plugin_Id
static constexpr plugin_t Plugin_Id
Definition
autogen.h:10
mim::plug::mach::sched
sched
Definition
autogen.h:43
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:28
mim::plugin_t
u64 plugin_t
Definition
types.h:40
mim::Node::Axm
@ Axm
Definition
def.h:123
plugin.h
mim::Annex::Num
static constexpr size_t Num
Number of Axm::subtags.
Definition
plugin.h:275
mim::Annex::Base
static constexpr flags_t Base
Definition
plugin.h:276
build-docs
include
mim
plug
mach
autogen.h
Generated by
1.18.0