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/axiom.h>
4#include <mim/plugin.h>
5
6/// @namespace mim::plug::clos @ref clos
7namespace mim {
8namespace plug::clos {
9
10static constexpr plugin_t Plugin_Id = 0x10d4140000000000;
11
12/// @name %%clos.BufPtr
13///@{
14enum class BufPtr : flags_t {
15};
16
17///@}
18
19/// @name %%clos.alloc_jmpbuf
20///@{
21enum class alloc_jmpbuf : flags_t {
22};
23
24///@}
25
26/// @name %%clos.setjmp
27///@{
28enum class setjmp : flags_t {
29};
30
31///@}
32
33/// @name %%clos.longjmp
34///@{
35enum class longjmp : flags_t {
36};
37
38///@}
39
40/// @name %%clos.attr
41///@{
42enum class attr : flags_t {
43 returning = 0x10d4140000000400,
44 freeBB = 0x10d4140000000401,
45 fstclassBB = 0x10d4140000000402,
46 esc = 0x10d4140000000403,
47 bottom = 0x10d4140000000404,
48};
49
50template<attr>
52
53///@}
54
55/// @name %%clos.clos_conv_prep_pass
56///@{
58};
59
60///@}
61
62/// @name %%clos.branch_clos_pass
63///@{
65};
66
67///@}
68
69/// @name %%clos.lower_typed_clos_prep_pass
70///@{
73
74///@}
75
76/// @name %%clos.clos2sjlj_pass
77///@{
78enum class clos2sjlj_pass : flags_t {
79};
80
81///@}
82
83/// @name %%clos.eta_red_bool_pass
84///@{
86};
87
88///@}
89
90/// @name %%clos.clos_conv_phase
91///@{
93};
94
95///@}
96
97/// @name %%clos.lower_typed_clos_phase
98///@{
100};
101
102///@}
103
105
106#define MIM_clos_NORMALIZER_IMPL \
107 void register_normalizers(Normalizers& normalizers) {\
108 normalizers[flags_t(attr::returning)] = &normalize_clos<attr::returning>; \
109 normalizers[flags_t(attr::freeBB)] = &normalize_clos<attr::freeBB>; \
110 normalizers[flags_t(attr::fstclassBB)] = &normalize_clos<attr::fstclassBB>; \
111 normalizers[flags_t(attr::esc)] = &normalize_clos<attr::esc>; \
112 normalizers[flags_t(attr::bottom)] = &normalize_clos<attr::bottom>; \
113 }
114} // namespace plug::clos
115
116#ifndef DOXYGEN // don't include in Doxygen documentation
117
118template<> constexpr flags_t Annex::Base<plug::clos::BufPtr> = 0x10d4140000000000;
119template<> constexpr size_t Annex::Num<plug::clos::BufPtr> = 0;
120template<> constexpr flags_t Annex::Base<plug::clos::alloc_jmpbuf> = 0x10d4140000000100;
121template<> constexpr size_t Annex::Num<plug::clos::alloc_jmpbuf> = 0;
122template<> constexpr flags_t Annex::Base<plug::clos::setjmp> = 0x10d4140000000200;
123template<> constexpr size_t Annex::Num<plug::clos::setjmp> = 0;
124template<> constexpr flags_t Annex::Base<plug::clos::longjmp> = 0x10d4140000000300;
125template<> constexpr size_t Annex::Num<plug::clos::longjmp> = 0;
126template<> constexpr flags_t Annex::Base<plug::clos::attr> = 0x10d4140000000400;
127template<> constexpr size_t Annex::Num<plug::clos::attr> = 5;
128template<> constexpr flags_t Annex::Base<plug::clos::clos_conv_prep_pass> = 0x10d4140000000500;
129template<> constexpr size_t Annex::Num<plug::clos::clos_conv_prep_pass> = 0;
130template<> constexpr flags_t Annex::Base<plug::clos::branch_clos_pass> = 0x10d4140000000600;
131template<> constexpr size_t Annex::Num<plug::clos::branch_clos_pass> = 0;
132template<> constexpr flags_t Annex::Base<plug::clos::lower_typed_clos_prep_pass> = 0x10d4140000000700;
133template<> constexpr size_t Annex::Num<plug::clos::lower_typed_clos_prep_pass> = 0;
134template<> constexpr flags_t Annex::Base<plug::clos::clos2sjlj_pass> = 0x10d4140000000800;
135template<> constexpr size_t Annex::Num<plug::clos::clos2sjlj_pass> = 0;
136template<> constexpr flags_t Annex::Base<plug::clos::eta_red_bool_pass> = 0x10d4140000000900;
137template<> constexpr size_t Annex::Num<plug::clos::eta_red_bool_pass> = 0;
138template<> constexpr flags_t Annex::Base<plug::clos::clos_conv_phase> = 0x10d4140000000a00;
139template<> constexpr size_t Annex::Num<plug::clos::clos_conv_phase> = 0;
140template<> constexpr flags_t Annex::Base<plug::clos::lower_typed_clos_phase> = 0x10d4140000000b00;
141template<> constexpr size_t Annex::Num<plug::clos::lower_typed_clos_phase> = 0;
142
143template<> struct Axiom::Match<plug::clos::BufPtr> { using type = Axiom; };
144template<> struct Axiom::Match<plug::clos::clos_conv_prep_pass> { using type = Axiom; };
145template<> struct Axiom::Match<plug::clos::branch_clos_pass> { using type = Axiom; };
146template<> struct Axiom::Match<plug::clos::lower_typed_clos_prep_pass> { using type = Axiom; };
147template<> struct Axiom::Match<plug::clos::clos2sjlj_pass> { using type = Axiom; };
148template<> struct Axiom::Match<plug::clos::clos_conv_phase> { using type = Axiom; };
149template<> struct Axiom::Match<plug::clos::lower_typed_clos_phase> { using type = Axiom; };
150
151#endif
152} // namespace mim
153
154#ifndef DOXYGEN // don't include in Doxygen documentation
155
156template<> struct fe::is_bit_enum<mim::plug::clos::attr> : std::true_type {};
157
158#endif
Helper class to retrieve Infer::arg if present.
Definition def.h:86
lower_typed_clos_prep_pass
Definition autogen.h:71
void register_normalizers(Normalizers &normalizers)
Ref normalize_clos(Ref type, Ref callee, Ref arg)
static constexpr plugin_t Plugin_Id
Definition autogen.h:10
Definition cfg.h:11
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
static constexpr size_t Num
Definition plugin.h:115
static constexpr flags_t Base
Definition plugin.h:118