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::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>
51const Def* normalize_clos(const Def*, const Def*, const Def*);
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.clos_conv_phase
84///@{
86};
87
88///@}
89
90/// @name %%clos.lower_typed_clos_phase
91///@{
93};
94
95///@}
96
98
99#define MIM_clos_NORMALIZER_IMPL \
100 void register_normalizers(Normalizers& normalizers) {\
101 normalizers[flags_t(attr::returning)] = &normalize_clos<attr::returning>; \
102 normalizers[flags_t(attr::freeBB)] = &normalize_clos<attr::freeBB>; \
103 normalizers[flags_t(attr::fstclassBB)] = &normalize_clos<attr::fstclassBB>; \
104 normalizers[flags_t(attr::esc)] = &normalize_clos<attr::esc>; \
105 normalizers[flags_t(attr::bottom)] = &normalize_clos<attr::bottom>; \
106 }
107} // namespace plug::clos
108
109#ifndef DOXYGEN // don't include in Doxygen documentation
110
111template<> constexpr flags_t Annex::Base<plug::clos::BufPtr> = 0x10d4140000000000;
112template<> constexpr size_t Annex::Num<plug::clos::BufPtr> = 0;
113template<> constexpr flags_t Annex::Base<plug::clos::alloc_jmpbuf> = 0x10d4140000000100;
114template<> constexpr size_t Annex::Num<plug::clos::alloc_jmpbuf> = 0;
115template<> constexpr flags_t Annex::Base<plug::clos::setjmp> = 0x10d4140000000200;
116template<> constexpr size_t Annex::Num<plug::clos::setjmp> = 0;
117template<> constexpr flags_t Annex::Base<plug::clos::longjmp> = 0x10d4140000000300;
118template<> constexpr size_t Annex::Num<plug::clos::longjmp> = 0;
119template<> constexpr flags_t Annex::Base<plug::clos::attr> = 0x10d4140000000400;
120template<> constexpr size_t Annex::Num<plug::clos::attr> = 5;
121template<> constexpr flags_t Annex::Base<plug::clos::clos_conv_prep_pass> = 0x10d4140000000500;
122template<> constexpr size_t Annex::Num<plug::clos::clos_conv_prep_pass> = 0;
123template<> constexpr flags_t Annex::Base<plug::clos::branch_clos_pass> = 0x10d4140000000600;
124template<> constexpr size_t Annex::Num<plug::clos::branch_clos_pass> = 0;
125template<> constexpr flags_t Annex::Base<plug::clos::lower_typed_clos_prep_pass> = 0x10d4140000000700;
126template<> constexpr size_t Annex::Num<plug::clos::lower_typed_clos_prep_pass> = 0;
127template<> constexpr flags_t Annex::Base<plug::clos::clos2sjlj_pass> = 0x10d4140000000800;
128template<> constexpr size_t Annex::Num<plug::clos::clos2sjlj_pass> = 0;
129template<> constexpr flags_t Annex::Base<plug::clos::clos_conv_phase> = 0x10d4140000000900;
130template<> constexpr size_t Annex::Num<plug::clos::clos_conv_phase> = 0;
131template<> constexpr flags_t Annex::Base<plug::clos::lower_typed_clos_phase> = 0x10d4140000000a00;
132template<> constexpr size_t Annex::Num<plug::clos::lower_typed_clos_phase> = 0;
133
134template<> struct Axm::IsANode<plug::clos::BufPtr> { using type = Axm; };
135template<> struct Axm::IsANode<plug::clos::clos_conv_prep_pass> { using type = Axm; };
136template<> struct Axm::IsANode<plug::clos::branch_clos_pass> { using type = Axm; };
137template<> struct Axm::IsANode<plug::clos::lower_typed_clos_prep_pass> { using type = Axm; };
138template<> struct Axm::IsANode<plug::clos::clos2sjlj_pass> { using type = Axm; };
139template<> struct Axm::IsANode<plug::clos::clos_conv_phase> { using type = Axm; };
140template<> struct Axm::IsANode<plug::clos::lower_typed_clos_phase> { using type = Axm; };
141
142#endif
143} // namespace mim
144
145#ifndef DOXYGEN // don't include in Doxygen documentation
146
147template<> struct fe::is_bit_enum<mim::plug::clos::attr> : std::true_type {};
148
149#endif
Base class for all Defs.
Definition def.h:251
The clos Plugin
Definition clos.h:7
lower_typed_clos_prep_pass
Definition autogen.h:71
void register_normalizers(Normalizers &normalizers)
const Def * normalize_clos(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