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