MimIR
0.4-dev
MimIR is my Intermediate Representation
Toggle main menu visibility
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::mem @ref mem
7
namespace
mim
{
8
namespace
plug::mem
{
9
10
static
constexpr
plugin_t
Plugin_Id
= 0x3863800000000000;
11
12
/// @name %%mem.M
13
///@{
14
enum class
M
:
flags_t
{
15
};
16
17
///@}
18
19
/// @name %%mem.Ptr
20
///@{
21
enum class
Ptr
:
flags_t
{
22
};
23
24
///@}
25
26
/// @name %%mem.Ptr0
27
///@{
28
enum class
Ptr0
:
flags_t
{
29
};
30
31
///@}
32
33
/// @name %%mem.load
34
///@{
35
enum class
load
:
flags_t
{
36
};
37
38
const
Def
*
normalize_load
(
const
Def
*,
const
Def
*,
const
Def
*);
39
///@}
40
41
/// @name %%mem.store
42
///@{
43
enum class
store
:
flags_t
{
44
};
45
46
const
Def
*
normalize_store
(
const
Def
*,
const
Def
*,
const
Def
*);
47
///@}
48
49
/// @name %%mem.remem
50
///@{
51
enum class
remem
:
flags_t
{
52
};
53
54
const
Def
*
normalize_remem
(
const
Def
*,
const
Def
*,
const
Def
*);
55
///@}
56
57
/// @name %%mem.fresh
58
///@{
59
enum class
fresh
:
flags_t
{
60
};
61
62
///@}
63
64
/// @name %%mem.alloc
65
///@{
66
enum class
alloc
:
flags_t
{
67
};
68
69
///@}
70
71
/// @name %%mem.slot
72
///@{
73
enum class
slot
:
flags_t
{
74
};
75
76
///@}
77
78
/// @name %%mem.malloc
79
///@{
80
enum class
malloc
:
flags_t
{
81
};
82
83
///@}
84
85
/// @name %%mem.free
86
///@{
87
enum class
free
:
flags_t
{
88
};
89
90
///@}
91
92
/// @name %%mem.mslot
93
///@{
94
enum class
mslot
:
flags_t
{
95
};
96
97
///@}
98
99
/// @name %%mem.lea
100
///@{
101
enum class
lea
:
flags_t
{
102
};
103
104
const
Def
*
normalize_lea
(
const
Def
*,
const
Def
*,
const
Def
*);
105
///@}
106
107
/// @name %%mem.add_mem
108
///@{
109
enum class
add_mem
:
flags_t
{
110
};
111
112
///@}
113
114
/// @name %%mem.seo
115
///@{
116
enum class
seo
:
flags_t
{
117
};
118
119
///@}
120
121
/// @name %%mem.remem_repl
122
///@{
123
enum class
remem_repl
:
flags_t
{
124
};
125
126
///@}
127
128
/// @name %%mem.alloc2malloc_repl
129
///@{
130
enum class
alloc2malloc_repl
:
flags_t
{
131
};
132
133
///@}
134
135
void
register_normalizers
(
Normalizers
& normalizers);
136
137
#define MIM_mem_NORMALIZER_IMPL \
138
void register_normalizers(Normalizers& normalizers) {\
139
normalizers[flags_t(Annex::Base<load>)] = &normalize_load; \
140
normalizers[flags_t(Annex::Base<store>)] = &normalize_store; \
141
normalizers[flags_t(Annex::Base<remem>)] = &normalize_remem; \
142
normalizers[flags_t(Annex::Base<lea>)] = &normalize_lea; \
143
}
144
}
// namespace plug::mem
145
146
#ifndef DOXYGEN
// don't include in Doxygen documentation
147
148
template
<>
constexpr
flags_t
Annex::Base<plug::mem::M>
= 0x3863800000000000;
149
template
<>
constexpr
size_t
Annex::Num<plug::mem::M>
= 0;
150
template
<>
constexpr
flags_t
Annex::Base<plug::mem::Ptr>
= 0x3863800000000100;
151
template
<>
constexpr
size_t
Annex::Num<plug::mem::Ptr>
= 0;
152
template
<>
constexpr
flags_t
Annex::Base<plug::mem::Ptr0>
= 0x3863800000000200;
153
template
<>
constexpr
size_t
Annex::Num<plug::mem::Ptr0>
= 0;
154
template
<>
constexpr
flags_t
Annex::Base<plug::mem::load>
= 0x3863800000000300;
155
template
<>
constexpr
size_t
Annex::Num<plug::mem::load>
= 0;
156
template
<>
constexpr
flags_t
Annex::Base<plug::mem::store>
= 0x3863800000000400;
157
template
<>
constexpr
size_t
Annex::Num<plug::mem::store>
= 0;
158
template
<>
constexpr
flags_t
Annex::Base<plug::mem::remem>
= 0x3863800000000500;
159
template
<>
constexpr
size_t
Annex::Num<plug::mem::remem>
= 0;
160
template
<>
constexpr
flags_t
Annex::Base<plug::mem::fresh>
= 0x3863800000000600;
161
template
<>
constexpr
size_t
Annex::Num<plug::mem::fresh>
= 0;
162
template
<>
constexpr
flags_t
Annex::Base<plug::mem::alloc>
= 0x3863800000000700;
163
template
<>
constexpr
size_t
Annex::Num<plug::mem::alloc>
= 0;
164
template
<>
constexpr
flags_t
Annex::Base<plug::mem::slot>
= 0x3863800000000800;
165
template
<>
constexpr
size_t
Annex::Num<plug::mem::slot>
= 0;
166
template
<>
constexpr
flags_t
Annex::Base<plug::mem::malloc>
= 0x3863800000000900;
167
template
<>
constexpr
size_t
Annex::Num<plug::mem::malloc>
= 0;
168
template
<>
constexpr
flags_t
Annex::Base<plug::mem::free>
= 0x3863800000000a00;
169
template
<>
constexpr
size_t
Annex::Num<plug::mem::free>
= 0;
170
template
<>
constexpr
flags_t
Annex::Base<plug::mem::mslot>
= 0x3863800000000b00;
171
template
<>
constexpr
size_t
Annex::Num<plug::mem::mslot>
= 0;
172
template
<>
constexpr
flags_t
Annex::Base<plug::mem::lea>
= 0x3863800000000c00;
173
template
<>
constexpr
size_t
Annex::Num<plug::mem::lea>
= 0;
174
template
<>
constexpr
flags_t
Annex::Base<plug::mem::add_mem>
= 0x3863800000000d00;
175
template
<>
constexpr
size_t
Annex::Num<plug::mem::add_mem>
= 0;
176
template
<>
constexpr
flags_t
Annex::Base<plug::mem::seo>
= 0x3863800000000e00;
177
template
<>
constexpr
size_t
Annex::Num<plug::mem::seo>
= 0;
178
template
<>
constexpr
flags_t
Annex::Base<plug::mem::remem_repl>
= 0x3863800000000f00;
179
template
<>
constexpr
size_t
Annex::Num<plug::mem::remem_repl>
= 0;
180
template
<>
constexpr
flags_t
Annex::Base<plug::mem::alloc2malloc_repl>
= 0x3863800000001000;
181
template
<>
constexpr
size_t
Annex::Num<plug::mem::alloc2malloc_repl>
= 0;
182
183
template
<>
struct
Axm::IsANode
<
plug
::mem::Ptr0> {
using
type
=
Axm
; };
184
template
<>
struct
Axm::IsANode
<
plug
::mem::add_mem> {
using
type
=
Axm
; };
185
template
<>
struct
Axm::IsANode
<
plug
::mem::seo> {
using
type
=
Axm
; };
186
template
<>
struct
Axm::IsANode
<
plug
::mem::remem_repl> {
using
type
=
Axm
; };
187
template
<>
struct
Axm::IsANode
<
plug
::mem::alloc2malloc_repl> {
using
type
=
Axm
; };
188
189
#endif
190
}
// namespace mim
191
192
#ifndef DOXYGEN
// don't include in Doxygen documentation
193
194
195
#endif
axm.h
mim::Axm::IsANode::type
App type
Definition
axm.h:70
mim::Axm::IsANode
Definition
axm.h:69
mim::Def
Base class for all Defs.
Definition
def.h:273
mim::plug::mem
The mem Plugin
Definition
mem.h:11
mim::plug::mem::load
load
Definition
autogen.h:35
mim::plug::mem::register_normalizers
void register_normalizers(Normalizers &normalizers)
mim::plug::mem::store
store
Definition
autogen.h:43
mim::plug::mem::seo
seo
Definition
autogen.h:116
mim::plug::mem::fresh
fresh
Definition
autogen.h:59
mim::plug::mem::normalize_lea
const Def * normalize_lea(const Def *, const Def *, const Def *arg)
Definition
normalizers.cpp:7
mim::plug::mem::M
M
Definition
autogen.h:14
mim::plug::mem::alloc2malloc_repl
alloc2malloc_repl
Definition
autogen.h:130
mim::plug::mem::normalize_remem
const Def * normalize_remem(const Def *, const Def *, const Def *)
Definition
normalizers.cpp:31
mim::plug::mem::add_mem
add_mem
Definition
autogen.h:109
mim::plug::mem::remem
remem
Definition
autogen.h:51
mim::plug::mem::mslot
mslot
Definition
autogen.h:94
mim::plug::mem::Plugin_Id
static constexpr plugin_t Plugin_Id
Definition
autogen.h:10
mim::plug::mem::normalize_store
const Def * normalize_store(const Def *, const Def *, const Def *arg)
Definition
normalizers.cpp:33
mim::plug::mem::free
free
Definition
autogen.h:87
mim::plug::mem::normalize_load
const Def * normalize_load(const Def *type, const Def *, const Def *arg)
Definition
normalizers.cpp:16
mim::plug::mem::Ptr0
Ptr0
Definition
autogen.h:28
mim::plug::mem::malloc
malloc
Definition
autogen.h:80
mim::plug::mem::remem_repl
remem_repl
Definition
autogen.h:123
mim::plug::mem::lea
lea
Definition
autogen.h:101
mim::plug::mem::slot
slot
Definition
autogen.h:73
mim::plug::mem::alloc
alloc
Definition
autogen.h:66
mim::plug::mem::Ptr
Ptr
Definition
autogen.h:21
mim::plug
Definition
lower_for.h:5
mim
Definition
ast.h:16
mim::flags_t
u64 flags_t
Definition
types.h:39
mim::Normalizers
absl::flat_hash_map< flags_t, NormalizeFn > Normalizers
Definition
plugin.h:27
mim::plugin_t
u64 plugin_t
Definition
types.h:40
mim::Node::Axm
@ Axm
Definition
def.h:122
plugin.h
mim::Annex::Num
static constexpr size_t Num
Number of Axm::subtags.
Definition
plugin.h:247
mim::Annex::Base
static constexpr flags_t Base
Definition
plugin.h:248
build
include
mim
plug
mem
autogen.h
Generated by
1.18.0