libFirm
Loading...
Searching...
No Matches
firm_types.h
1/*
2 * This file is part of libFirm.
3 * Copyright (C) 2012 University of Karlsruhe.
4 */
5
11#ifndef FIRM_COMMON_FIRM_TYPES_H
12#define FIRM_COMMON_FIRM_TYPES_H
13
14#include "begin.h"
15
34typedef unsigned long ir_visited_t;
36typedef unsigned long ir_label_t;
37
40typedef struct dbg_info dbg_info;
50typedef const char ident;
53typedef struct ir_node ir_node;
56typedef struct ir_op ir_op;
59typedef struct ir_mode ir_mode;
62typedef struct ir_edge_t ir_edge_t;
68typedef struct ir_tarval ir_tarval;
71typedef struct ir_type ir_type;
74typedef struct ir_graph ir_graph;
77typedef struct ir_prog ir_prog;
80typedef struct ir_loop ir_loop;
83typedef struct ir_entity ir_entity;
86typedef struct ir_cdep ir_cdep;
93
97typedef void irg_walk_func(ir_node *, void *);
98
106
124
125#ifdef __cplusplus
126# define ENUM_BITSET(type) \
127 extern "C++" { \
128 static inline type operator ~ (type a) { return (type)~(int)a; } \
129 static inline type operator & (type a, type b) { return (type)((int)a & (int)b); } \
130 static inline type operator &= (type& a, type b) { return a = (type)((int)a & (int)b); } \
131 static inline type operator ^ (type a, type b) { return (type)((int)a ^ (int)b); } \
132 static inline type operator ^= (type& a, type b) { return a = (type)((int)a ^ (int)b); } \
133 static inline type operator | (type a, type b) { return (type)((int)a | (int)b); } \
134 static inline type operator |= (type& a, type b) { return a = (type)((int)a | (int)b); } \
135 }
136#else
141# define ENUM_BITSET(type)
142#endif
143
144#ifdef __cplusplus
145# define ENUM_COUNTABLE(type) \
146 extern "C++" { \
147 static inline type operator ++(type& a) { return a = (type)((int)a + 1); } \
148 static inline type operator --(type& a) { return a = (type)((int)a - 1); } \
149 }
150#else
155# define ENUM_COUNTABLE(type)
156#endif
157
180ENUM_BITSET(ir_relation)
181
182
186typedef enum ir_cons_flags {
188 cons_volatile = 1U << 0,
189 cons_unaligned = 1U << 1,
190 cons_floats = 1U << 2,
191 cons_throws_exception = 1U << 3,
195ENUM_BITSET(ir_cons_flags)
196
197
207
217
267ENUM_BITSET(mtp_additional_properties)
268
269
278
306
310typedef enum {
311 volatility_non_volatile,
312 volatility_is_volatile
313} ir_volatility;
314
318typedef enum {
319 align_is_aligned = 0,
320 align_non_aligned,
321} ir_align;
322
327typedef enum float_int_conversion_overflow_style_t {
328 ir_overflow_indefinite,
330 ir_overflow_min_max,
333} float_int_conversion_overflow_style_t;
334
335typedef struct hook_entry hook_entry_t;
336
337#include "end.h"
338
339#endif
struct ir_cdep ir_cdep
Control Dependence Analysis Results.
Definition firm_types.h:86
struct type_dbg_info type_dbg_info
Source Type Reference.
Definition firm_types.h:43
struct dbg_info dbg_info
Source Reference.
Definition firm_types.h:40
struct ir_heights_t ir_heights_t
Computed graph Heights.
Definition firm_types.h:65
const char ident
Identifier.
Definition firm_types.h:50
ir_node * uninitialized_local_variable_func_t(ir_graph *irg, ir_mode *mode, int pos)
This function is called, whenever a local variable is used before definition.
Definition firm_types.h:123
struct ir_edge_t ir_edge_t
Dynamic Reverse Edge.
Definition firm_types.h:62
struct ir_graph ir_graph
Procedure Graph.
Definition firm_types.h:74
void irg_walk_func(ir_node *, void *)
type for graph-walk callbacks
Definition firm_types.h:97
struct ir_loop ir_loop
Loop.
Definition firm_types.h:80
struct ir_mode ir_mode
SSA Value mode.
Definition firm_types.h:59
struct ir_node ir_node
Procedure Graph Node.
Definition firm_types.h:53
ir_relation
Relations for comparing numbers.
Definition firm_types.h:162
op_pin_state
pinned states.
Definition firm_types.h:201
ir_cons_flags
constrained flags for memory operations.
Definition firm_types.h:186
@ ir_relation_unordered_greater_equal
unordered, greater or equal
Definition firm_types.h:176
@ ir_relation_true
always true
Definition firm_types.h:178
@ ir_relation_false
always false
Definition firm_types.h:163
@ ir_relation_unordered_less_equal
unordered, less or equal
Definition firm_types.h:174
@ ir_relation_less_equal_greater
less equal or greater ('not unordered')
Definition firm_types.h:171
@ ir_relation_less_greater
less or greater ('not equal' for integer numbers)
Definition firm_types.h:170
@ ir_relation_greater_equal
greater or equal
Definition firm_types.h:169
@ ir_relation_equal
equal
Definition firm_types.h:164
@ ir_relation_unordered
unordered
Definition firm_types.h:167
@ ir_relation_unordered_greater
unordered or greater
Definition firm_types.h:175
@ ir_relation_unordered_less_greater
unordered, less or greater ('not equal' for floatingpoint numbers)
Definition firm_types.h:177
@ ir_relation_unordered_less
unordered or less
Definition firm_types.h:173
@ ir_relation_less
less
Definition firm_types.h:165
@ ir_relation_greater
greater
Definition firm_types.h:166
@ ir_relation_unordered_equal
unordered or equal
Definition firm_types.h:172
@ ir_relation_less_equal
less or equal
Definition firm_types.h:168
@ op_pin_state_pinned
Nodes must remain in this basic block.
Definition firm_types.h:203
@ op_pin_state_exc_pinned
Node must remain in this basic block if it can throw an exception, else can float.
Definition firm_types.h:204
@ op_pin_state_floats
Nodes of this opcode can be placed in any basic block.
Definition firm_types.h:202
@ cons_volatile
Memory operation is volatile.
Definition firm_types.h:188
@ cons_none
No constrains.
Definition firm_types.h:187
@ cons_floats
Memory operation can float.
Definition firm_types.h:190
@ cons_throws_exception
fragile op throws exception (and produces X_regular and X_except values)
Definition firm_types.h:191
@ cons_unaligned
Memory operation is unaligned.
Definition firm_types.h:189
struct ir_op ir_op
Node Opcode.
Definition firm_types.h:56
struct ir_prog ir_prog
Program.
Definition firm_types.h:77
struct ir_machine_triple_t ir_machine_triple_t
Machine triple.
Definition firm_types.h:92
struct ir_tarval ir_tarval
Target Machine Value.
Definition firm_types.h:68
struct ir_entity ir_entity
Entity.
Definition firm_types.h:83
union ir_initializer_t ir_initializer_t
Initializer (for entities)
Definition firm_types.h:89
struct ir_type ir_type
Type.
Definition firm_types.h:71
mtp_additional_properties
Additional method type properties: Tell about special properties of a method type.
Definition firm_types.h:224
@ mtp_property_noreturn
This method never returns.
Definition firm_types.h:239
@ mtp_property_malloc
This method returns newly allocate memory.
Definition firm_types.h:249
@ mtp_property_is_constructor
marker used for oo analyses needing info whether method is constructor or not
Definition firm_types.h:265
@ mtp_property_returns_twice
This method can return more than once (typically setjmp).
Definition firm_types.h:252
@ mtp_property_always_inline
Try to always inline this function, even if it seems nonprofitable.
Definition firm_types.h:257
@ mtp_property_private
All method invocations are known and inside the current compilation unit, the backend can freely choo...
Definition firm_types.h:255
@ mtp_property_no_write
This method does not change any memory known to the rest of the program.
Definition firm_types.h:229
@ mtp_property_pure
The behaviour of the method does not depend on any global/external state.
Definition firm_types.h:235
@ mtp_property_noinline
The function should not be inlined.
Definition firm_types.h:259
@ mtp_no_property
No additional properties.
Definition firm_types.h:226
@ mtp_temporary
Marker used by opt_funccall (really a hack)...
Definition firm_types.h:263
@ mtp_property_naked
This method is naked.
Definition firm_types.h:246
@ mtp_property_inline_recommended
The programmer recommends to inline the function.
Definition firm_types.h:261
@ mtp_property_terminates
The function is guaranteed not to end in an endless and to not abort the program.
Definition firm_types.h:242
@ mtp_property_nothrow
This method cannot throw an exception.
Definition firm_types.h:244
A input/output constraint attribute.
Definition firm_types.h:272
ident * constraint
The constraint for this input/output.
Definition firm_types.h:275
int out_pos
The output position for this constraint.
Definition firm_types.h:274
int in_pos
The input position for this constraint.
Definition firm_types.h:273
ir_mode * mode
The mode of the constraint.
Definition firm_types.h:276
ir_builtin_kind
Supported libFirm builtins.
Definition firm_types.h:282
@ ir_bk_may_alias
replaced by 0 if args cannot alias, 1 otherwise
Definition firm_types.h:300
@ ir_bk_ctz
GCC __builtin_ctz(): count trailing zero.
Definition firm_types.h:291
@ ir_bk_outport
out port
Definition firm_types.h:297
@ ir_bk_parity
GCC __builtin_parity(): parity.
Definition firm_types.h:294
@ ir_bk_debugbreak
MS __debugbreak(): insert debug break.
Definition firm_types.h:284
@ ir_bk_last
Definition firm_types.h:304
@ ir_bk_va_start
va_start from <stdarg.h>
Definition firm_types.h:302
@ ir_bk_popcount
GCC __builtin_popcount(): population count.
Definition firm_types.h:292
@ ir_bk_return_address
GCC __builtin_return_address()
Definition firm_types.h:285
@ ir_bk_clz
GCC __builtin_clz(): count leading zero.
Definition firm_types.h:290
@ ir_bk_bswap
byte swap
Definition firm_types.h:295
@ ir_bk_compare_swap
compare exchange (aka.
Definition firm_types.h:299
@ ir_bk_saturating_increment
saturating increment
Definition firm_types.h:298
@ ir_bk_va_arg
va_arg from <stdarg.h>
Definition firm_types.h:303
@ ir_bk_trap
GCC __builtin_trap(): insert trap.
Definition firm_types.h:283
@ ir_bk_inport
in port
Definition firm_types.h:296
@ ir_bk_prefetch
GCC __builtin_prefetch()
Definition firm_types.h:287
@ ir_bk_frame_address
GCC __builtin_frame_address()
Definition firm_types.h:286
@ ir_bk_ffs
GCC __builtin_ffs(): find first (least) significant 1 bit.
Definition firm_types.h:288
cond_jmp_predicate
A type to express conditional jump predictions.
Definition firm_types.h:212
@ COND_JMP_PRED_NONE
No jump prediction.
Definition firm_types.h:213
@ COND_JMP_PRED_FALSE
The False case is predicted.
Definition firm_types.h:215
@ COND_JMP_PRED_TRUE
The True case is predicted.
Definition firm_types.h:214
struct ir_switch_table ir_switch_table
A switch table mapping integer numbers to proj-numbers of a Switch-node.
Definition firm_types.h:105