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::direct @ref direct
7namespace mim {
8namespace plug::direct {
9
10static constexpr plugin_t Plugin_Id = 0x14a4c61150000000;
11
12/// @name %%direct.cps2ds
13///@{
14enum class cps2ds : flags_t {
15};
16
18///@}
19
20/// @name %%direct.cps2ds_dep
21///@{
22enum class cps2ds_dep : flags_t {
23};
24
25///@}
26
27/// @name %%direct.ds2cps_pass
28///@{
29enum class ds2cps_pass : flags_t {
30};
31
32///@}
33
34/// @name %%direct.cps2ds_pass
35///@{
36enum class cps2ds_pass : flags_t {
37};
38
39///@}
40
42
43#define MIM_direct_NORMALIZER_IMPL \
44 void register_normalizers(Normalizers& normalizers) {\
45 normalizers[flags_t(Annex::Base<cps2ds>)] = &normalize_cps2ds; \
46 }
47} // namespace plug::direct
48
49#ifndef DOXYGEN // don't include in Doxygen documentation
50
51template<> constexpr flags_t Annex::Base<plug::direct::cps2ds> = 0x14a4c61150000000;
52template<> constexpr size_t Annex::Num<plug::direct::cps2ds> = 0;
53template<> constexpr flags_t Annex::Base<plug::direct::cps2ds_dep> = 0x14a4c61150000100;
54template<> constexpr size_t Annex::Num<plug::direct::cps2ds_dep> = 0;
55template<> constexpr flags_t Annex::Base<plug::direct::ds2cps_pass> = 0x14a4c61150000200;
56template<> constexpr size_t Annex::Num<plug::direct::ds2cps_pass> = 0;
57template<> constexpr flags_t Annex::Base<plug::direct::cps2ds_pass> = 0x14a4c61150000300;
58template<> constexpr size_t Annex::Num<plug::direct::cps2ds_pass> = 0;
59
60template<> struct Axiom::Match<plug::direct::ds2cps_pass> { using type = Axiom; };
61template<> struct Axiom::Match<plug::direct::cps2ds_pass> { using type = Axiom; };
62
63#endif
64} // namespace mim
65
66#ifndef DOXYGEN // don't include in Doxygen documentation
67
68
69#endif
Helper class to retrieve Infer::arg if present.
Definition def.h:86
void register_normalizers(Normalizers &normalizers)
static constexpr plugin_t Plugin_Id
Definition autogen.h:10
Ref normalize_cps2ds(Ref, Ref, Ref fun)
cps2ds is directly converted to op_cps2ds_dep f in its normalizer.
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