libFirm
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
firm_types.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 1995-2010 University of Karlsruhe. All right reserved.
3
*
4
* This file is part of libFirm.
5
*
6
* This file may be distributed and/or modified under the terms of the
7
* GNU General Public License version 2 as published by the Free Software
8
* Foundation and appearing in the file LICENSE.GPL included in the
9
* packaging of this file.
10
*
11
* Licensees holding valid libFirm Professional Edition licenses may use
12
* this file in accordance with the libFirm Commercial License.
13
* Agreement provided with the Software.
14
*
15
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17
* PURPOSE.
18
*/
19
25
#ifndef FIRM_COMMON_FIRM_TYPES_H
26
#define FIRM_COMMON_FIRM_TYPES_H
27
28
#include "
begin.h
"
29
48
typedef
unsigned
long
ir_visited_t
;
50
typedef
unsigned
long
ir_label_t
;
51
54
typedef
struct
dbg_info
dbg_info
;
57
typedef
struct
type_dbg_info
type_dbg_info
;
60
typedef
struct
ident
ident
;
63
typedef
struct
ir_node
ir_node
;
66
typedef
struct
ir_op
ir_op
;
69
typedef
struct
ir_mode
ir_mode
;
72
typedef
struct
ir_edge_t
ir_edge_t
;
75
typedef
struct
ir_heights_t
ir_heights_t
;
78
typedef
struct
ir_tarval
ir_tarval
;
81
typedef
struct
ir_enum_const
ir_enum_const
;
84
typedef
struct
ir_type
ir_type
;
87
typedef
struct
ir_graph
ir_graph
;
90
typedef
struct
ir_prog
ir_prog
;
93
typedef
struct
ir_loop
ir_loop
;
96
typedef
struct
ir_entity
ir_entity
;
99
typedef
struct
ir_cdep
ir_cdep
;
102
typedef
struct
arch_irn_ops_t
arch_irn_ops_t
;
104
typedef
struct
ir_graph_pass_t
ir_graph_pass_t
;
106
typedef
struct
ir_prog_pass_t
ir_prog_pass_t
;
107
109
typedef
struct
ir_graph_pass_manager_t
ir_graph_pass_manager_t
;
111
typedef
struct
ir_prog_pass_manager_t
ir_prog_pass_manager_t
;
112
115
typedef
union
ir_initializer_t
ir_initializer_t
;
116
120
typedef
void
irg_walk_func
(
ir_node
*,
void
*);
121
128
typedef
struct
ir_switch_table
ir_switch_table
;
129
146
typedef
ir_node
*
uninitialized_local_variable_func_t
(
ir_graph
*irg,
ir_mode
*mode,
int
pos);
147
148
#ifdef __cplusplus
149
# define ENUM_BITSET(type) \
150
extern "C++" { \
151
static inline type operator ~ (type a) { return (type)~(int)a; } \
152
static inline type operator & (type a, type b) { return (type)((int)a & (int)b); } \
153
static inline type operator &= (type& a, type b) { return a = (type)((int)a & (int)b); } \
154
static inline type operator ^ (type a, type b) { return (type)((int)a ^ (int)b); } \
155
static inline type operator ^= (type& a, type b) { return a = (type)((int)a ^ (int)b); } \
156
static inline type operator | (type a, type b) { return (type)((int)a | (int)b); } \
157
static inline type operator |= (type& a, type b) { return a = (type)((int)a | (int)b); } \
158
}
159
#else
160
164
# define ENUM_BITSET(type)
165
#endif
166
167
#ifdef __cplusplus
168
# define ENUM_COUNTABLE(type) \
169
extern "C++" { \
170
static inline type operator ++(type& a) { return a = (type)((int)a + 1); } \
171
static inline type operator --(type& a) { return a = (type)((int)a - 1); } \
172
}
173
#else
174
178
# define ENUM_COUNTABLE(type)
179
#endif
180
185
typedef
enum
ir_relation
{
186
ir_relation_false
= 0,
187
ir_relation_equal
= 1u << 0,
188
ir_relation_less
= 1u << 1,
189
ir_relation_greater
= 1u << 2,
190
ir_relation_unordered
= 1u << 3,
191
ir_relation_less_equal
=
ir_relation_equal
|
ir_relation_less
,
192
ir_relation_greater_equal
=
ir_relation_equal
|
ir_relation_greater
,
193
ir_relation_less_greater =
ir_relation_less
|
ir_relation_greater
,
194
ir_relation_less_equal_greater
=
ir_relation_equal
|
ir_relation_less
|
ir_relation_greater
,
195
ir_relation_unordered_equal
=
ir_relation_unordered
|
ir_relation_equal
,
196
ir_relation_unordered_less
=
ir_relation_unordered
|
ir_relation_less
,
197
ir_relation_unordered_less_equal
=
ir_relation_unordered
|
ir_relation_less
|
ir_relation_equal
,
198
ir_relation_unordered_greater
=
ir_relation_unordered
|
ir_relation_greater
,
199
ir_relation_unordered_greater_equal
=
ir_relation_unordered
|
ir_relation_greater
|
ir_relation_equal
,
200
ir_relation_unordered_less_greater
=
ir_relation_unordered
|
ir_relation_less
|
ir_relation_greater
,
201
ir_relation_true
=
ir_relation_equal
|
ir_relation_less
|
ir_relation_greater
|
ir_relation_unordered
,
202
}
ir_relation
;
203
ENUM_BITSET
(
ir_relation
)
204
205
209
typedef enum
ir_cons_flags
{
210
cons_none
= 0,
211
cons_volatile
= 1U << 0,
212
cons_unaligned
= 1U << 1,
213
cons_floats
= 1U << 2,
214
cons_throws_exception
= 1U << 3,
217
}
ir_cons_flags
;
218
ENUM_BITSET
(
ir_cons_flags
)
219
220
224
typedef enum
op_pin_state
{
225
op_pin_state_floats
= 0,
226
op_pin_state_pinned
= 1,
227
op_pin_state_exc_pinned
,
229
op_pin_state_mem_pinned
231
}
op_pin_state
;
232
237
typedef
enum
cond_jmp_predicate
{
238
COND_JMP_PRED_NONE
,
239
COND_JMP_PRED_TRUE
,
240
COND_JMP_PRED_FALSE
241
}
cond_jmp_predicate
;
242
249
typedef
enum
mtp_additional_properties
{
251
mtp_no_property
= 0,
258
mtp_property_const
= 1u << 0,
264
mtp_property_pure
= 1u << 1,
267
mtp_property_noreturn
= 1u << 2,
269
mtp_property_nothrow
= 1u << 3,
271
mtp_property_naked
= 1u << 4,
274
mtp_property_malloc
= 1u << 5,
277
mtp_property_returns_twice
= 1u << 6,
280
mtp_property_intrinsic
= 1u << 7,
282
mtp_property_runtime
= 1u << 8,
285
mtp_property_private
= 1u << 9,
287
mtp_property_has_loop
= 1u << 10,
289
mtp_property_always_inline
= 1u << 11,
291
mtp_property_noinline
= 1u << 12,
293
mtp_property_inline_recommended
= 1u << 13,
295
mtp_temporary
= 1u << 14,
296
}
mtp_additional_properties
;
297
ENUM_BITSET
(
mtp_additional_properties
)
298
299
305
typedef enum
symconst_kind
{
306
symconst_type_size
,
308
symconst_type_align
,
310
symconst_addr_ent
,
313
symconst_ofs_ent
,
315
symconst_enum_const
317
}
symconst_kind
;
318
326
typedef
union
symconst_symbol
{
327
ir_type
*
type_p
;
328
ir_entity
*
entity_p
;
329
ir_enum_const
*
enum_p
;
330
}
symconst_symbol
;
331
336
typedef
enum
ir_where_alloc
{
337
stack_alloc
,
338
heap_alloc
339
}
ir_where_alloc
;
340
344
typedef
struct
ir_asm_constraint
{
345
unsigned
pos
;
346
ident
*
constraint
;
347
ir_mode
*
mode
;
348
}
ir_asm_constraint
;
349
353
typedef
enum
ir_builtin_kind
{
354
ir_bk_trap
,
355
ir_bk_debugbreak
,
356
ir_bk_return_address
,
357
ir_bk_frame_address
,
358
ir_bk_prefetch
,
359
ir_bk_ffs
,
360
ir_bk_clz
,
361
ir_bk_ctz
,
362
ir_bk_popcount
,
363
ir_bk_parity
,
364
ir_bk_bswap
,
365
ir_bk_inport
,
366
ir_bk_outport
,
367
ir_bk_inner_trampoline
,
368
ir_bk_last =
ir_bk_inner_trampoline
,
369
}
ir_builtin_kind
;
370
374
typedef
enum
ir_value_classify_sign
{
375
value_classified_unknown
= 0,
376
value_classified_positive
= 1,
377
value_classified_negative
= -1
379
}
ir_value_classify_sign
;
380
384
typedef
enum
{
385
volatility_non_volatile
,
386
volatility_is_volatile
387
}
ir_volatility
;
388
392
typedef
enum
{
393
align_is_aligned
= 0,
394
align_non_aligned
,
395
}
ir_align
;
396
397
#include "
end.h
"
398
399
#endif
libfirm
firm_types.h
Generated on Sat Nov 24 2012 19:13:48 for libFirm by
1.8.1.2