MimIR
0.5-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
#include <
mim/plug/core/autogen.h
>
7
8
/// @namespace mim::plug::mem @ref mem
9
namespace
mim
{
10
namespace
plug::mem
{
11
12
static
constexpr
plugin_t
Plugin_Id
= 0x3863800000000000;
13
14
using
M
=
plug::core::M
;
15
using
Ptr
=
plug::core::Ptr
;
16
17
/// @name `mem.Ptr0`
18
///@{
19
enum class
Ptr0
:
flags_t
{
20
};
21
22
///@}
23
24
/// @name `mem.Char`
25
///@{
26
enum class
Char
:
flags_t
{
27
};
28
29
///@}
30
31
/// @name `mem.Str`
32
///@{
33
enum class
Str
:
flags_t
{
34
};
35
36
///@}
37
38
/// @name `mem.load`
39
///@{
40
enum class
load
:
flags_t
{
41
};
42
43
const
Def
*
normalize_load
(
const
Def
*,
const
Def
*,
const
Def
*);
44
///@}
45
46
/// @name `mem.store`
47
///@{
48
enum class
store
:
flags_t
{
49
};
50
51
const
Def
*
normalize_store
(
const
Def
*,
const
Def
*,
const
Def
*);
52
///@}
53
54
/// @name `mem.fresh`
55
///@{
56
enum class
fresh
:
flags_t
{
57
};
58
59
///@}
60
61
/// @name `mem.alloc`
62
///@{
63
enum class
alloc
:
flags_t
{
64
};
65
66
///@}
67
68
/// @name `mem.slot`
69
///@{
70
enum class
slot
:
flags_t
{
71
};
72
73
///@}
74
75
/// @name `mem.malloc`
76
///@{
77
enum class
malloc
:
flags_t
{
78
};
79
80
///@}
81
82
/// @name `mem.free`
83
///@{
84
enum class
free
:
flags_t
{
85
};
86
87
///@}
88
89
/// @name `mem.mslot`
90
///@{
91
enum class
mslot
:
flags_t
{
92
};
93
94
///@}
95
96
/// @name `mem.lea`
97
///@{
98
enum class
lea
:
flags_t
{
99
};
100
101
const
Def
*
normalize_lea
(
const
Def
*,
const
Def
*,
const
Def
*);
102
///@}
103
104
/// @name `mem.decay`
105
///@{
106
enum class
decay
:
flags_t
{
107
};
108
109
///@}
110
111
/// @name `mem.assume`
112
///@{
113
enum class
assume
:
flags_t
{
114
};
115
116
///@}
117
118
/// @name `mem.cstr`
119
///@{
120
enum class
cstr
:
flags_t
{
121
};
122
123
///@}
124
125
/// @name `mem.add_mem`
126
///@{
127
enum class
add_mem
:
flags_t
{
128
};
129
130
///@}
131
132
/// @name `mem.free_locals`
133
///@{
134
enum class
free_locals
:
flags_t
{
135
};
136
137
///@}
138
139
/// @name `mem.heap2stack`
140
///@{
141
enum class
heap2stack
:
flags_t
{
142
};
143
144
///@}
145
146
/// @name `mem.seo`
147
///@{
148
enum class
seo
:
flags_t
{
149
};
150
151
///@}
152
153
/// @name `mem.alloc2malloc_repl`
154
///@{
155
enum class
alloc2malloc_repl
:
flags_t
{
156
};
157
158
///@}
159
160
void
register_normalizers
(
Normalizers
& normalizers);
161
162
#define MIM_mem_NORMALIZER_IMPL \
163
void register_normalizers(Normalizers& normalizers) {\
164
normalizers[flags_t(Annex::Base<load>)] = &normalize_load; \
165
normalizers[flags_t(Annex::Base<store>)] = &normalize_store; \
166
normalizers[flags_t(Annex::Base<lea>)] = &normalize_lea; \
167
}
168
}
// namespace plug::mem
169
170
#ifndef DOXYGEN
// don't include in Doxygen documentation
171
172
template
<>
constexpr
flags_t
Annex::Base<plug::mem::Ptr0>
= 0x3863800000000000;
173
template
<>
constexpr
size_t
Annex::Num<plug::mem::Ptr0>
= 0;
174
template
<>
constexpr
flags_t
Annex::Base<plug::mem::Char>
= 0x3863800000000100;
175
template
<>
constexpr
size_t
Annex::Num<plug::mem::Char>
= 0;
176
template
<>
constexpr
flags_t
Annex::Base<plug::mem::Str>
= 0x3863800000000200;
177
template
<>
constexpr
size_t
Annex::Num<plug::mem::Str>
= 0;
178
template
<>
constexpr
flags_t
Annex::Base<plug::mem::load>
= 0x3863800000000300;
179
template
<>
constexpr
size_t
Annex::Num<plug::mem::load>
= 0;
180
template
<>
constexpr
flags_t
Annex::Base<plug::mem::store>
= 0x3863800000000400;
181
template
<>
constexpr
size_t
Annex::Num<plug::mem::store>
= 0;
182
template
<>
constexpr
flags_t
Annex::Base<plug::mem::fresh>
= 0x3863800000000500;
183
template
<>
constexpr
size_t
Annex::Num<plug::mem::fresh>
= 0;
184
template
<>
constexpr
flags_t
Annex::Base<plug::mem::alloc>
= 0x3863800000000600;
185
template
<>
constexpr
size_t
Annex::Num<plug::mem::alloc>
= 0;
186
template
<>
constexpr
flags_t
Annex::Base<plug::mem::slot>
= 0x3863800000000700;
187
template
<>
constexpr
size_t
Annex::Num<plug::mem::slot>
= 0;
188
template
<>
constexpr
flags_t
Annex::Base<plug::mem::malloc>
= 0x3863800000000800;
189
template
<>
constexpr
size_t
Annex::Num<plug::mem::malloc>
= 0;
190
template
<>
constexpr
flags_t
Annex::Base<plug::mem::free>
= 0x3863800000000900;
191
template
<>
constexpr
size_t
Annex::Num<plug::mem::free>
= 0;
192
template
<>
constexpr
flags_t
Annex::Base<plug::mem::mslot>
= 0x3863800000000a00;
193
template
<>
constexpr
size_t
Annex::Num<plug::mem::mslot>
= 0;
194
template
<>
constexpr
flags_t
Annex::Base<plug::mem::lea>
= 0x3863800000000b00;
195
template
<>
constexpr
size_t
Annex::Num<plug::mem::lea>
= 0;
196
template
<>
constexpr
flags_t
Annex::Base<plug::mem::decay>
= 0x3863800000000c00;
197
template
<>
constexpr
size_t
Annex::Num<plug::mem::decay>
= 0;
198
template
<>
constexpr
flags_t
Annex::Base<plug::mem::assume>
= 0x3863800000000d00;
199
template
<>
constexpr
size_t
Annex::Num<plug::mem::assume>
= 0;
200
template
<>
constexpr
flags_t
Annex::Base<plug::mem::cstr>
= 0x3863800000000e00;
201
template
<>
constexpr
size_t
Annex::Num<plug::mem::cstr>
= 0;
202
template
<>
constexpr
flags_t
Annex::Base<plug::mem::add_mem>
= 0x3863800000000f00;
203
template
<>
constexpr
size_t
Annex::Num<plug::mem::add_mem>
= 0;
204
template
<>
constexpr
flags_t
Annex::Base<plug::mem::free_locals>
= 0x3863800000001000;
205
template
<>
constexpr
size_t
Annex::Num<plug::mem::free_locals>
= 0;
206
template
<>
constexpr
flags_t
Annex::Base<plug::mem::heap2stack>
= 0x3863800000001100;
207
template
<>
constexpr
size_t
Annex::Num<plug::mem::heap2stack>
= 0;
208
template
<>
constexpr
flags_t
Annex::Base<plug::mem::seo>
= 0x3863800000001200;
209
template
<>
constexpr
size_t
Annex::Num<plug::mem::seo>
= 0;
210
template
<>
constexpr
flags_t
Annex::Base<plug::mem::alloc2malloc_repl>
= 0x3863800000001300;
211
template
<>
constexpr
size_t
Annex::Num<plug::mem::alloc2malloc_repl>
= 0;
212
213
template
<>
struct
Axm::IsANode
<
plug
::mem::Ptr0> {
using
type
=
Axm
; };
214
template
<>
struct
Axm::IsANode
<
plug
::mem::Char> {
using
type
=
Axm
; };
215
template
<>
struct
Axm::IsANode
<
plug
::mem::Str> {
using
type
=
Axm
; };
216
template
<>
struct
Axm::IsANode
<
plug
::mem::decay> {
using
type
=
Axm
; };
217
template
<>
struct
Axm::IsANode
<
plug
::mem::cstr> {
using
type
=
Axm
; };
218
template
<>
struct
Axm::IsANode
<
plug
::mem::add_mem> {
using
type
=
Axm
; };
219
template
<>
struct
Axm::IsANode
<
plug
::mem::free_locals> {
using
type
=
Axm
; };
220
template
<>
struct
Axm::IsANode
<
plug
::mem::heap2stack> {
using
type
=
Axm
; };
221
template
<>
struct
Axm::IsANode
<
plug
::mem::seo> {
using
type
=
Axm
; };
222
template
<>
struct
Axm::IsANode
<
plug
::mem::alloc2malloc_repl> {
using
type
=
Axm
; };
223
224
#endif
225
}
// namespace mim
226
227
#ifndef DOXYGEN
// don't include in Doxygen documentation
228
229
230
#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:289
autogen.h
mim::plug::core::M
M
Definition
autogen.h:14
mim::plug::core::Ptr
Ptr
Definition
autogen.h:21
mim::plug::mem
The mem Plugin
Definition
escape_analysis.h:9
mim::plug::mem::cstr
cstr
Definition
autogen.h:120
mim::plug::mem::load
load
Definition
autogen.h:40
mim::plug::mem::register_normalizers
void register_normalizers(Normalizers &normalizers)
mim::plug::mem::store
store
Definition
autogen.h:48
mim::plug::mem::seo
seo
Definition
autogen.h:148
mim::plug::mem::fresh
fresh
Definition
autogen.h:56
mim::plug::mem::normalize_lea
const Def * normalize_lea(const Def *, const Def *, const Def *arg)
Definition
normalizers.cpp:7
mim::plug::mem::alloc2malloc_repl
alloc2malloc_repl
Definition
autogen.h:155
mim::plug::mem::free_locals
free_locals
Definition
autogen.h:134
mim::plug::mem::Ptr
plug::core::Ptr Ptr
Definition
autogen.h:15
mim::plug::mem::add_mem
add_mem
Definition
autogen.h:127
mim::plug::mem::decay
decay
Definition
autogen.h:106
mim::plug::mem::mslot
mslot
Definition
autogen.h:91
mim::plug::mem::Plugin_Id
static constexpr plugin_t Plugin_Id
Definition
autogen.h:12
mim::plug::mem::assume
assume
Definition
autogen.h:113
mim::plug::mem::normalize_store
const Def * normalize_store(const Def *, const Def *, const Def *arg)
Definition
normalizers.cpp:28
mim::plug::mem::free
free
Definition
autogen.h:84
mim::plug::mem::Char
Char
Definition
autogen.h:26
mim::plug::mem::normalize_load
const Def * normalize_load(const Def *type, const Def *, const Def *arg)
Definition
normalizers.cpp:14
mim::plug::mem::Ptr0
Ptr0
Definition
autogen.h:19
mim::plug::mem::malloc
malloc
Definition
autogen.h:77
mim::plug::mem::lea
lea
Definition
autogen.h:98
mim::plug::mem::M
plug::core::M M
Definition
autogen.h:14
mim::plug::mem::slot
slot
Definition
autogen.h:70
mim::plug::mem::Str
Str
Definition
autogen.h:33
mim::plug::mem::heap2stack
heap2stack
Definition
autogen.h:141
mim::plug::mem::alloc
alloc
Definition
autogen.h:63
mim::plug
Definition
affine.h:10
mim
Definition
ast.h:16
mim::flags_t
u64 flags_t
Definition
types.h:39
mim::Normalizers
ankerl::unordered_dense::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:125
plugin.h
mim::Annex::Num
static constexpr size_t Num
Number of Axm::subtags.
Definition
plugin.h:273
mim::Annex::Base
static constexpr flags_t Base
Definition
plugin.h:274
build
include
mim
plug
mem
autogen.h
Generated by
1.18.0