MimIR 0.1
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::compile @ref compile
7namespace mim {
8namespace plug::compile {
9
10static constexpr plugin_t Plugin_Id = 0x11039128d1800000;
11
12/// @name %%compile.Phase
13///@{
14enum class Phase : flags_t {
15};
16
17///@}
18
19/// @name %%compile.Pass
20///@{
21enum class Pass : flags_t {
22};
23
24///@}
25
26/// @name %%compile.Repl
27///@{
28enum class Repl : flags_t {
29};
30
31///@}
32
33/// @name %%compile.is_loaded
34///@{
35enum class is_loaded : flags_t {
36};
37
38const Def* normalize_is_loaded(const Def*, const Def*, const Def*);
39///@}
40
41/// @name %%compile.phases
42///@{
43enum class phases : flags_t {
44};
45
46///@}
47
48/// @name %%compile.passes
49///@{
50enum class passes : flags_t {
51};
52
53///@}
54
55/// @name %%compile.repls
56///@{
57enum class repls : flags_t {
58};
59
60///@}
61
62/// @name %%compile.beta_red_phase
63///@{
64enum class beta_red_phase : flags_t {
65};
66
67///@}
68
69/// @name %%compile.branch_normalize_phase
70///@{
72};
73
74///@}
75
76/// @name %%compile.cleanup_phase
77///@{
78enum class cleanup_phase : flags_t {
79};
80
81///@}
82
83/// @name %%compile.eta_exp_phase
84///@{
85enum class eta_exp_phase : flags_t {
86};
87
88///@}
89
90/// @name %%compile.eta_red_phase
91///@{
92enum class eta_red_phase : flags_t {
93};
94
95///@}
96
97/// @name %%compile.null_phase
98///@{
99enum class null_phase : flags_t {
100};
101
102///@}
103
104/// @name %%compile.ret_wrap_phase
105///@{
107};
108
109///@}
110
111/// @name %%compile.sccp
112///@{
113enum class sccp : flags_t {
114};
115
116///@}
117
118/// @name %%compile.pass2phase
119///@{
120enum class pass2phase : flags_t {
121};
122
123///@}
124
125/// @name %%compile.repl2phase
126///@{
127enum class repl2phase : flags_t {
128};
129
130///@}
131
132/// @name %%compile.prefix_cleanup_phase
133///@{
135};
136
137///@}
138
139/// @name %%compile.internal_cleanup_phase
140///@{
142};
143
144///@}
145
146/// @name %%compile.null_repl
147///@{
148enum class null_repl : flags_t {
149};
150
151///@}
152
153/// @name %%compile.beta_red_pass
154///@{
155enum class beta_red_pass : flags_t {
156};
157
158///@}
159
160/// @name %%compile.eta_exp_pass
161///@{
162enum class eta_exp_pass : flags_t {
163};
164
165///@}
166
167/// @name %%compile.eta_red_pass
168///@{
169enum class eta_red_pass : flags_t {
170};
171
172///@}
173
174/// @name %%compile.lam_spec_pass
175///@{
176enum class lam_spec_pass : flags_t {
177};
178
179///@}
180
181/// @name %%compile.null_pass
182///@{
183enum class null_pass : flags_t {
184};
185
186///@}
187
188/// @name %%compile.scalarize_pass
189///@{
191};
192
193///@}
194
195/// @name %%compile.tail_rec_elim_pass
196///@{
198};
199
200///@}
201
203
204#define MIM_compile_NORMALIZER_IMPL \
205 void register_normalizers(Normalizers& normalizers) {\
206 normalizers[flags_t(Annex::Base<is_loaded>)] = &normalize_is_loaded; \
207 }
208} // namespace plug::compile
209
210#ifndef DOXYGEN // don't include in Doxygen documentation
211
212template<> constexpr flags_t Annex::Base<plug::compile::Phase> = 0x11039128d1800000;
213template<> constexpr size_t Annex::Num<plug::compile::Phase> = 0;
214template<> constexpr flags_t Annex::Base<plug::compile::Pass> = 0x11039128d1800100;
215template<> constexpr size_t Annex::Num<plug::compile::Pass> = 0;
216template<> constexpr flags_t Annex::Base<plug::compile::Repl> = 0x11039128d1800200;
217template<> constexpr size_t Annex::Num<plug::compile::Repl> = 0;
218template<> constexpr flags_t Annex::Base<plug::compile::is_loaded> = 0x11039128d1800300;
219template<> constexpr size_t Annex::Num<plug::compile::is_loaded> = 0;
220template<> constexpr flags_t Annex::Base<plug::compile::phases> = 0x11039128d1800400;
221template<> constexpr size_t Annex::Num<plug::compile::phases> = 0;
222template<> constexpr flags_t Annex::Base<plug::compile::passes> = 0x11039128d1800500;
223template<> constexpr size_t Annex::Num<plug::compile::passes> = 0;
224template<> constexpr flags_t Annex::Base<plug::compile::repls> = 0x11039128d1800600;
225template<> constexpr size_t Annex::Num<plug::compile::repls> = 0;
226template<> constexpr flags_t Annex::Base<plug::compile::beta_red_phase> = 0x11039128d1800700;
227template<> constexpr size_t Annex::Num<plug::compile::beta_red_phase> = 0;
228template<> constexpr flags_t Annex::Base<plug::compile::branch_normalize_phase> = 0x11039128d1800800;
229template<> constexpr size_t Annex::Num<plug::compile::branch_normalize_phase> = 0;
230template<> constexpr flags_t Annex::Base<plug::compile::cleanup_phase> = 0x11039128d1800900;
231template<> constexpr size_t Annex::Num<plug::compile::cleanup_phase> = 0;
232template<> constexpr flags_t Annex::Base<plug::compile::eta_exp_phase> = 0x11039128d1800a00;
233template<> constexpr size_t Annex::Num<plug::compile::eta_exp_phase> = 0;
234template<> constexpr flags_t Annex::Base<plug::compile::eta_red_phase> = 0x11039128d1800b00;
235template<> constexpr size_t Annex::Num<plug::compile::eta_red_phase> = 0;
236template<> constexpr flags_t Annex::Base<plug::compile::null_phase> = 0x11039128d1800c00;
237template<> constexpr size_t Annex::Num<plug::compile::null_phase> = 0;
238template<> constexpr flags_t Annex::Base<plug::compile::ret_wrap_phase> = 0x11039128d1800d00;
239template<> constexpr size_t Annex::Num<plug::compile::ret_wrap_phase> = 0;
240template<> constexpr flags_t Annex::Base<plug::compile::sccp> = 0x11039128d1800e00;
241template<> constexpr size_t Annex::Num<plug::compile::sccp> = 0;
242template<> constexpr flags_t Annex::Base<plug::compile::pass2phase> = 0x11039128d1800f00;
243template<> constexpr size_t Annex::Num<plug::compile::pass2phase> = 0;
244template<> constexpr flags_t Annex::Base<plug::compile::repl2phase> = 0x11039128d1801000;
245template<> constexpr size_t Annex::Num<plug::compile::repl2phase> = 0;
246template<> constexpr flags_t Annex::Base<plug::compile::prefix_cleanup_phase> = 0x11039128d1801100;
247template<> constexpr size_t Annex::Num<plug::compile::prefix_cleanup_phase> = 0;
248template<> constexpr flags_t Annex::Base<plug::compile::internal_cleanup_phase> = 0x11039128d1801200;
249template<> constexpr size_t Annex::Num<plug::compile::internal_cleanup_phase> = 0;
250template<> constexpr flags_t Annex::Base<plug::compile::null_repl> = 0x11039128d1801300;
251template<> constexpr size_t Annex::Num<plug::compile::null_repl> = 0;
252template<> constexpr flags_t Annex::Base<plug::compile::beta_red_pass> = 0x11039128d1801400;
253template<> constexpr size_t Annex::Num<plug::compile::beta_red_pass> = 0;
254template<> constexpr flags_t Annex::Base<plug::compile::eta_exp_pass> = 0x11039128d1801500;
255template<> constexpr size_t Annex::Num<plug::compile::eta_exp_pass> = 0;
256template<> constexpr flags_t Annex::Base<plug::compile::eta_red_pass> = 0x11039128d1801600;
257template<> constexpr size_t Annex::Num<plug::compile::eta_red_pass> = 0;
258template<> constexpr flags_t Annex::Base<plug::compile::lam_spec_pass> = 0x11039128d1801700;
259template<> constexpr size_t Annex::Num<plug::compile::lam_spec_pass> = 0;
260template<> constexpr flags_t Annex::Base<plug::compile::null_pass> = 0x11039128d1801800;
261template<> constexpr size_t Annex::Num<plug::compile::null_pass> = 0;
262template<> constexpr flags_t Annex::Base<plug::compile::scalarize_pass> = 0x11039128d1801900;
263template<> constexpr size_t Annex::Num<plug::compile::scalarize_pass> = 0;
264template<> constexpr flags_t Annex::Base<plug::compile::tail_rec_elim_pass> = 0x11039128d1801a00;
265template<> constexpr size_t Annex::Num<plug::compile::tail_rec_elim_pass> = 0;
266
267template<> struct Axm::IsANode<plug::compile::Phase> { using type = Axm; };
268template<> struct Axm::IsANode<plug::compile::Pass> { using type = Axm; };
269template<> struct Axm::IsANode<plug::compile::Repl> { using type = Axm; };
270template<> struct Axm::IsANode<plug::compile::beta_red_phase> { using type = Axm; };
271template<> struct Axm::IsANode<plug::compile::branch_normalize_phase> { using type = Axm; };
272template<> struct Axm::IsANode<plug::compile::cleanup_phase> { using type = Axm; };
273template<> struct Axm::IsANode<plug::compile::eta_exp_phase> { using type = Axm; };
274template<> struct Axm::IsANode<plug::compile::eta_red_phase> { using type = Axm; };
275template<> struct Axm::IsANode<plug::compile::null_phase> { using type = Axm; };
276template<> struct Axm::IsANode<plug::compile::ret_wrap_phase> { using type = Axm; };
277template<> struct Axm::IsANode<plug::compile::sccp> { using type = Axm; };
278template<> struct Axm::IsANode<plug::compile::internal_cleanup_phase> { using type = Axm; };
279template<> struct Axm::IsANode<plug::compile::null_repl> { using type = Axm; };
280template<> struct Axm::IsANode<plug::compile::beta_red_pass> { using type = Axm; };
281template<> struct Axm::IsANode<plug::compile::eta_exp_pass> { using type = Axm; };
282template<> struct Axm::IsANode<plug::compile::lam_spec_pass> { using type = Axm; };
283template<> struct Axm::IsANode<plug::compile::null_pass> { using type = Axm; };
284template<> struct Axm::IsANode<plug::compile::scalarize_pass> { using type = Axm; };
285template<> struct Axm::IsANode<plug::compile::tail_rec_elim_pass> { using type = Axm; };
286
287#endif
288} // namespace mim
289
290#ifndef DOXYGEN // don't include in Doxygen documentation
291
292
293#endif
Base class for all Defs.
Definition def.h:251
The compile Plugin
void register_normalizers(Normalizers &normalizers)
const Def * normalize_is_loaded(const Def *, const Def *, const Def *arg)
static constexpr plugin_t Plugin_Id
Definition autogen.h:10
Definition ast.h:14
u64 flags_t
Definition types.h:45
absl::flat_hash_map< flags_t, NormalizeFn > Normalizers
Definition plugin.h:19
u64 plugin_t
Definition types.h:46
@ Axm
Definition def.h:114
static constexpr size_t Num
Number of Axm::subtags.
Definition plugin.h:116
static constexpr flags_t Base
Definition plugin.h:117