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::refly @ref refly
7namespace mim {
8namespace plug::refly {
9
10static constexpr plugin_t Plugin_Id = 0x4c61cd6800000000;
11
12/// @name %%refly.Code
13///@{
14enum class Code : flags_t {
15};
16
17///@}
18
19/// @name %%refly.reify
20///@{
21enum class reify : flags_t {
22};
23
25///@}
26
27/// @name %%refly.reflect
28///@{
29enum class reflect : flags_t {
30};
31
33///@}
34
35/// @name %%refly.gid
36///@{
37enum class gid : flags_t {
38};
39
41///@}
42
43/// @name %%refly.error
44///@{
45enum class error : flags_t {
46};
47
48///@}
49
50/// @name %%refly.warn
51///@{
52enum class warn : flags_t {
53};
54
55///@}
56
57/// @name %%refly.info
58///@{
59enum class info : flags_t {
60};
61
62///@}
63
64/// @name %%refly.verbose
65///@{
66enum class verbose : flags_t {
67};
68
69///@}
70
71/// @name %%refly.debug
72///@{
73enum class debug : flags_t {
74};
75
76///@}
77
78/// @name %%refly.dbg
79///@{
80enum class dbg : flags_t {
81 tmp = 0x4c61cd6800000900,
82 perm = 0x4c61cd6800000901,
83};
84
85template<dbg>
87
88///@}
89
90/// @name %%refly.refine
91///@{
92enum class refine : flags_t {
93};
94
96///@}
97
98/// @name %%refly.remove_dbg_perm_pass
99///@{
101};
102
103///@}
104
106
107#define MIM_refly_NORMALIZER_IMPL \
108 void register_normalizers(Normalizers& normalizers) {\
109 normalizers[flags_t(Annex::Base<reify>)] = &normalize_reify; \
110 normalizers[flags_t(Annex::Base<reflect>)] = &normalize_reflect; \
111 normalizers[flags_t(Annex::Base<gid>)] = &normalize_gid; \
112 normalizers[flags_t(dbg::tmp)] = &normalize_dbg<dbg::tmp>; \
113 normalizers[flags_t(dbg::perm)] = &normalize_dbg<dbg::perm>; \
114 normalizers[flags_t(Annex::Base<refine>)] = &normalize_refine; \
115 }
116} // namespace plug::refly
117
118#ifndef DOXYGEN // don't include in Doxygen documentation
119
120template<> constexpr flags_t Annex::Base<plug::refly::Code> = 0x4c61cd6800000000;
121template<> constexpr size_t Annex::Num<plug::refly::Code> = 0;
122template<> constexpr flags_t Annex::Base<plug::refly::reify> = 0x4c61cd6800000100;
123template<> constexpr size_t Annex::Num<plug::refly::reify> = 0;
124template<> constexpr flags_t Annex::Base<plug::refly::reflect> = 0x4c61cd6800000200;
125template<> constexpr size_t Annex::Num<plug::refly::reflect> = 0;
126template<> constexpr flags_t Annex::Base<plug::refly::gid> = 0x4c61cd6800000300;
127template<> constexpr size_t Annex::Num<plug::refly::gid> = 0;
128template<> constexpr flags_t Annex::Base<plug::refly::error> = 0x4c61cd6800000400;
129template<> constexpr size_t Annex::Num<plug::refly::error> = 0;
130template<> constexpr flags_t Annex::Base<plug::refly::warn> = 0x4c61cd6800000500;
131template<> constexpr size_t Annex::Num<plug::refly::warn> = 0;
132template<> constexpr flags_t Annex::Base<plug::refly::info> = 0x4c61cd6800000600;
133template<> constexpr size_t Annex::Num<plug::refly::info> = 0;
134template<> constexpr flags_t Annex::Base<plug::refly::verbose> = 0x4c61cd6800000700;
135template<> constexpr size_t Annex::Num<plug::refly::verbose> = 0;
136template<> constexpr flags_t Annex::Base<plug::refly::debug> = 0x4c61cd6800000800;
137template<> constexpr size_t Annex::Num<plug::refly::debug> = 0;
138template<> constexpr flags_t Annex::Base<plug::refly::dbg> = 0x4c61cd6800000900;
139template<> constexpr size_t Annex::Num<plug::refly::dbg> = 2;
140template<> constexpr flags_t Annex::Base<plug::refly::refine> = 0x4c61cd6800000a00;
141template<> constexpr size_t Annex::Num<plug::refly::refine> = 0;
142template<> constexpr flags_t Annex::Base<plug::refly::remove_dbg_perm_pass> = 0x4c61cd6800000b00;
143template<> constexpr size_t Annex::Num<plug::refly::remove_dbg_perm_pass> = 0;
144
145template<> struct Axiom::Match<plug::refly::error> { using type = Axiom; };
146template<> struct Axiom::Match<plug::refly::warn> { using type = Axiom; };
147template<> struct Axiom::Match<plug::refly::info> { using type = Axiom; };
148template<> struct Axiom::Match<plug::refly::verbose> { using type = Axiom; };
149template<> struct Axiom::Match<plug::refly::debug> { using type = Axiom; };
150template<> struct Axiom::Match<plug::refly::remove_dbg_perm_pass> { using type = Axiom; };
151
152#endif
153} // namespace mim
154
155#ifndef DOXYGEN // don't include in Doxygen documentation
156
157template<> struct fe::is_bit_enum<mim::plug::refly::dbg> : std::true_type {};
158
159#endif
Helper class to retrieve Infer::arg if present.
Definition def.h:86
Ref normalize_gid(Ref, Ref, Ref arg)
Ref normalize_refine(Ref type, Ref callee, Ref arg)
static constexpr plugin_t Plugin_Id
Definition autogen.h:10
Ref normalize_dbg(Ref type, Ref callee, Ref arg)
Ref normalize_reflect(Ref, Ref, Ref arg)
void register_normalizers(Normalizers &normalizers)
Ref normalize_reify(Ref, Ref, Ref arg)
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