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.pass2phase
112///@{
113enum class pass2phase : flags_t {
114};
115
116///@}
117
118/// @name %%compile.repl2phase
119///@{
120enum class repl2phase : flags_t {
121};
122
123///@}
124
125/// @name %%compile.prefix_cleanup_phase
126///@{
128};
129
130///@}
131
132/// @name %%compile.internal_cleanup_phase
133///@{
135};
136
137///@}
138
139/// @name %%compile.null_repl
140///@{
141enum class null_repl : flags_t {
142};
143
144///@}
145
146/// @name %%compile.beta_red_pass
147///@{
148enum class beta_red_pass : flags_t {
149};
150
151///@}
152
153/// @name %%compile.eta_exp_pass
154///@{
155enum class eta_exp_pass : flags_t {
156};
157
158///@}
159
160/// @name %%compile.eta_red_pass
161///@{
162enum class eta_red_pass : flags_t {
163};
164
165///@}
166
167/// @name %%compile.lam_spec_pass
168///@{
169enum class lam_spec_pass : flags_t {
170};
171
172///@}
173
174/// @name %%compile.null_pass
175///@{
176enum class null_pass : flags_t {
177};
178
179///@}
180
181/// @name %%compile.scalarize_pass
182///@{
184};
185
186///@}
187
188/// @name %%compile.tail_rec_elim_pass
189///@{
191};
192
193///@}
194
196
197#define MIM_compile_NORMALIZER_IMPL \
198 void register_normalizers(Normalizers& normalizers) {\
199 normalizers[flags_t(Annex::Base<is_loaded>)] = &normalize_is_loaded; \
200 }
201} // namespace plug::compile
202
203#ifndef DOXYGEN // don't include in Doxygen documentation
204
205template<> constexpr flags_t Annex::Base<plug::compile::Phase> = 0x11039128d1800000;
206template<> constexpr size_t Annex::Num<plug::compile::Phase> = 0;
207template<> constexpr flags_t Annex::Base<plug::compile::Pass> = 0x11039128d1800100;
208template<> constexpr size_t Annex::Num<plug::compile::Pass> = 0;
209template<> constexpr flags_t Annex::Base<plug::compile::Repl> = 0x11039128d1800200;
210template<> constexpr size_t Annex::Num<plug::compile::Repl> = 0;
211template<> constexpr flags_t Annex::Base<plug::compile::is_loaded> = 0x11039128d1800300;
212template<> constexpr size_t Annex::Num<plug::compile::is_loaded> = 0;
213template<> constexpr flags_t Annex::Base<plug::compile::phases> = 0x11039128d1800400;
214template<> constexpr size_t Annex::Num<plug::compile::phases> = 0;
215template<> constexpr flags_t Annex::Base<plug::compile::passes> = 0x11039128d1800500;
216template<> constexpr size_t Annex::Num<plug::compile::passes> = 0;
217template<> constexpr flags_t Annex::Base<plug::compile::repls> = 0x11039128d1800600;
218template<> constexpr size_t Annex::Num<plug::compile::repls> = 0;
219template<> constexpr flags_t Annex::Base<plug::compile::beta_red_phase> = 0x11039128d1800700;
220template<> constexpr size_t Annex::Num<plug::compile::beta_red_phase> = 0;
221template<> constexpr flags_t Annex::Base<plug::compile::branch_normalize_phase> = 0x11039128d1800800;
222template<> constexpr size_t Annex::Num<plug::compile::branch_normalize_phase> = 0;
223template<> constexpr flags_t Annex::Base<plug::compile::cleanup_phase> = 0x11039128d1800900;
224template<> constexpr size_t Annex::Num<plug::compile::cleanup_phase> = 0;
225template<> constexpr flags_t Annex::Base<plug::compile::eta_exp_phase> = 0x11039128d1800a00;
226template<> constexpr size_t Annex::Num<plug::compile::eta_exp_phase> = 0;
227template<> constexpr flags_t Annex::Base<plug::compile::eta_red_phase> = 0x11039128d1800b00;
228template<> constexpr size_t Annex::Num<plug::compile::eta_red_phase> = 0;
229template<> constexpr flags_t Annex::Base<plug::compile::null_phase> = 0x11039128d1800c00;
230template<> constexpr size_t Annex::Num<plug::compile::null_phase> = 0;
231template<> constexpr flags_t Annex::Base<plug::compile::ret_wrap_phase> = 0x11039128d1800d00;
232template<> constexpr size_t Annex::Num<plug::compile::ret_wrap_phase> = 0;
233template<> constexpr flags_t Annex::Base<plug::compile::pass2phase> = 0x11039128d1800e00;
234template<> constexpr size_t Annex::Num<plug::compile::pass2phase> = 0;
235template<> constexpr flags_t Annex::Base<plug::compile::repl2phase> = 0x11039128d1800f00;
236template<> constexpr size_t Annex::Num<plug::compile::repl2phase> = 0;
237template<> constexpr flags_t Annex::Base<plug::compile::prefix_cleanup_phase> = 0x11039128d1801000;
238template<> constexpr size_t Annex::Num<plug::compile::prefix_cleanup_phase> = 0;
239template<> constexpr flags_t Annex::Base<plug::compile::internal_cleanup_phase> = 0x11039128d1801100;
240template<> constexpr size_t Annex::Num<plug::compile::internal_cleanup_phase> = 0;
241template<> constexpr flags_t Annex::Base<plug::compile::null_repl> = 0x11039128d1801200;
242template<> constexpr size_t Annex::Num<plug::compile::null_repl> = 0;
243template<> constexpr flags_t Annex::Base<plug::compile::beta_red_pass> = 0x11039128d1801300;
244template<> constexpr size_t Annex::Num<plug::compile::beta_red_pass> = 0;
245template<> constexpr flags_t Annex::Base<plug::compile::eta_exp_pass> = 0x11039128d1801400;
246template<> constexpr size_t Annex::Num<plug::compile::eta_exp_pass> = 0;
247template<> constexpr flags_t Annex::Base<plug::compile::eta_red_pass> = 0x11039128d1801500;
248template<> constexpr size_t Annex::Num<plug::compile::eta_red_pass> = 0;
249template<> constexpr flags_t Annex::Base<plug::compile::lam_spec_pass> = 0x11039128d1801600;
250template<> constexpr size_t Annex::Num<plug::compile::lam_spec_pass> = 0;
251template<> constexpr flags_t Annex::Base<plug::compile::null_pass> = 0x11039128d1801700;
252template<> constexpr size_t Annex::Num<plug::compile::null_pass> = 0;
253template<> constexpr flags_t Annex::Base<plug::compile::scalarize_pass> = 0x11039128d1801800;
254template<> constexpr size_t Annex::Num<plug::compile::scalarize_pass> = 0;
255template<> constexpr flags_t Annex::Base<plug::compile::tail_rec_elim_pass> = 0x11039128d1801900;
256template<> constexpr size_t Annex::Num<plug::compile::tail_rec_elim_pass> = 0;
257
258template<> struct Axm::IsANode<plug::compile::Phase> { using type = Axm; };
259template<> struct Axm::IsANode<plug::compile::Pass> { using type = Axm; };
260template<> struct Axm::IsANode<plug::compile::Repl> { using type = Axm; };
261template<> struct Axm::IsANode<plug::compile::beta_red_phase> { using type = Axm; };
262template<> struct Axm::IsANode<plug::compile::branch_normalize_phase> { using type = Axm; };
263template<> struct Axm::IsANode<plug::compile::cleanup_phase> { using type = Axm; };
264template<> struct Axm::IsANode<plug::compile::eta_exp_phase> { using type = Axm; };
265template<> struct Axm::IsANode<plug::compile::eta_red_phase> { using type = Axm; };
266template<> struct Axm::IsANode<plug::compile::null_phase> { using type = Axm; };
267template<> struct Axm::IsANode<plug::compile::ret_wrap_phase> { using type = Axm; };
268template<> struct Axm::IsANode<plug::compile::internal_cleanup_phase> { using type = Axm; };
269template<> struct Axm::IsANode<plug::compile::null_repl> { using type = Axm; };
270template<> struct Axm::IsANode<plug::compile::beta_red_pass> { using type = Axm; };
271template<> struct Axm::IsANode<plug::compile::eta_exp_pass> { using type = Axm; };
272template<> struct Axm::IsANode<plug::compile::lam_spec_pass> { using type = Axm; };
273template<> struct Axm::IsANode<plug::compile::null_pass> { using type = Axm; };
274template<> struct Axm::IsANode<plug::compile::scalarize_pass> { using type = Axm; };
275template<> struct Axm::IsANode<plug::compile::tail_rec_elim_pass> { using type = Axm; };
276
277#endif
278} // namespace mim
279
280#ifndef DOXYGEN // don't include in Doxygen documentation
281
282
283#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