libFirm
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
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 
34 typedef unsigned long ir_visited_t;
36 typedef unsigned long ir_label_t;
37 
40 typedef struct dbg_info dbg_info;
50 typedef const char ident;
53 typedef struct ir_node ir_node;
56 typedef struct ir_op ir_op;
59 typedef struct ir_mode ir_mode;
62 typedef struct ir_edge_t ir_edge_t;
65 typedef struct ir_heights_t ir_heights_t;
68 typedef struct ir_tarval ir_tarval;
71 typedef struct ir_type ir_type;
74 typedef struct ir_graph ir_graph;
77 typedef struct ir_prog ir_prog;
80 typedef struct ir_loop ir_loop;
83 typedef struct ir_entity ir_entity;
86 typedef struct ir_cdep ir_cdep;
90 
94 typedef void irg_walk_func(ir_node *, void *);
95 
103 
121 
122 #ifdef __cplusplus
123 # define ENUM_BITSET(type) \
124  extern "C++" { \
125  static inline type operator ~ (type a) { return (type)~(int)a; } \
126  static inline type operator & (type a, type b) { return (type)((int)a & (int)b); } \
127  static inline type operator &= (type& a, type b) { return a = (type)((int)a & (int)b); } \
128  static inline type operator ^ (type a, type b) { return (type)((int)a ^ (int)b); } \
129  static inline type operator ^= (type& a, type b) { return a = (type)((int)a ^ (int)b); } \
130  static inline type operator | (type a, type b) { return (type)((int)a | (int)b); } \
131  static inline type operator |= (type& a, type b) { return a = (type)((int)a | (int)b); } \
132  }
133 #else
134 
138 # define ENUM_BITSET(type)
139 #endif
140 
141 #ifdef __cplusplus
142 # define ENUM_COUNTABLE(type) \
143  extern "C++" { \
144  static inline type operator ++(type& a) { return a = (type)((int)a + 1); } \
145  static inline type operator --(type& a) { return a = (type)((int)a - 1); } \
146  }
147 #else
148 
152 # define ENUM_COUNTABLE(type)
153 #endif
154 
159 typedef enum ir_relation {
161  ir_relation_equal = 1u << 0,
162  ir_relation_less = 1u << 1,
176 } ir_relation;
177 ENUM_BITSET(ir_relation)
178 
179 
183 typedef enum ir_cons_flags {
184  cons_none = 0,
185  cons_volatile = 1U << 0,
186  cons_unaligned = 1U << 1,
187  cons_floats = 1U << 2,
191 } ir_cons_flags;
192 ENUM_BITSET(ir_cons_flags)
193 
194 
198 typedef enum op_pin_state {
203 } op_pin_state;
204 
209 typedef enum cond_jmp_predicate {
214 
232  mtp_property_pure = 1u << 1,
260  mtp_temporary = 1u << 12,
262 ENUM_BITSET(mtp_additional_properties)
263 
264 
267 typedef struct ir_asm_constraint {
268  unsigned pos;
272 
276 typedef enum ir_builtin_kind {
300 
304 typedef enum {
305  volatility_non_volatile,
306  volatility_is_volatile
307 } ir_volatility;
308 
312 typedef enum {
313  align_is_aligned = 0,
314  align_non_aligned,
315 } ir_align;
316 
317 typedef struct hook_entry hook_entry_t;
318 
319 #include "end.h"
320 
321 #endif
struct ir_type ir_type
Type.
Definition: firm_types.h:71
struct dbg_info dbg_info
Source Reference.
Definition: firm_types.h:40
always true
Definition: firm_types.h:175
in port
Definition: firm_types.h:290
less or greater ('not equal' for integer numbers)
Definition: firm_types.h:167
ident * constraint
The constraint for this input/output.
Definition: firm_types.h:269
ir_builtin_kind
Supported libFirm builtins.
Definition: firm_types.h:276
less or equal
Definition: firm_types.h:165
GCC __builtin_frame_address()
Definition: firm_types.h:280
union ir_initializer_t ir_initializer_t
Initializer (for entities)
Definition: firm_types.h:89
This method is naked.
Definition: firm_types.h:243
Nodes of this opcode can be placed in any basic block.
Definition: firm_types.h:199
struct ir_heights_t ir_heights_t
Computed graph Heights.
Definition: firm_types.h:65
unordered or equal
Definition: firm_types.h:169
Memory operation is unaligned.
Definition: firm_types.h:186
GCC __builtin_popcount(): population count.
Definition: firm_types.h:286
unordered, greater or equal
Definition: firm_types.h:173
Memory operation is volatile.
Definition: firm_types.h:185
GCC __builtin_parity(): parity.
Definition: firm_types.h:288
va_start from <stdarg.h>
Definition: firm_types.h:296
struct ir_graph ir_graph
Procedure Graph.
Definition: firm_types.h:74
All method invocations are known and inside the current compilation unit, the backend can freely choo...
Definition: firm_types.h:252
unordered or greater
Definition: firm_types.h:172
The False case is predicted.
Definition: firm_types.h:212
struct ir_prog ir_prog
Program.
Definition: firm_types.h:77
unordered, less or greater ('not equal' for floatingpoint numbers)
Definition: firm_types.h:174
struct type_dbg_info type_dbg_info
Source Type Reference.
Definition: firm_types.h:43
This method does not change any memory known to the rest of the program.
Definition: firm_types.h:226
Nodes must remain in this basic block.
Definition: firm_types.h:200
struct ir_loop ir_loop
Loop.
Definition: firm_types.h:80
compare exchange (aka.
Definition: firm_types.h:293
Node must remain in this basic block if it can throw an exception, else can float.
Definition: firm_types.h:201
cond_jmp_predicate
A type to express conditional jump predictions.
Definition: firm_types.h:209
No jump prediction.
Definition: firm_types.h:210
GCC __builtin_ffs(): find first (least) significant 1 bit.
Definition: firm_types.h:282
always false
Definition: firm_types.h:160
GCC __builtin_prefetch()
Definition: firm_types.h:281
struct ir_edge_t ir_edge_t
Dynamic Reverse Edge.
Definition: firm_types.h:62
GCC __builtin_clz(): count leading zero.
Definition: firm_types.h:284
struct ir_switch_table ir_switch_table
A switch table mapping integer numbers to proj-numbers of a Switch-node.
Definition: firm_types.h:102
A input/output constraint attribute.
Definition: firm_types.h:267
Try to always inline this function, even if it seems nonprofitable.
Definition: firm_types.h:254
op_pin_state
pinned states.
Definition: firm_types.h:198
unordered, less or equal
Definition: firm_types.h:171
byte swap
Definition: firm_types.h:289
struct ir_op ir_op
Node Opcode.
Definition: firm_types.h:56
This method cannot throw an exception.
Definition: firm_types.h:241
The programmer recommends to inline the function.
Definition: firm_types.h:258
The behaviour of the method does not depend on any global/external state.
Definition: firm_types.h:232
struct ir_entity ir_entity
Entity.
Definition: firm_types.h:83
va_arg from <stdarg.h>
Definition: firm_types.h:297
GCC __builtin_ctz(): count trailing zero.
Definition: firm_types.h:285
Memory operation can float.
Definition: firm_types.h:187
saturating increment
Definition: firm_types.h:292
The function should not be inlined.
Definition: firm_types.h:256
GCC __builtin_return_address()
Definition: firm_types.h:279
less equal or greater ('not unordered')
Definition: firm_types.h:168
unsigned pos
The input/output position for this constraint.
Definition: firm_types.h:268
struct ir_tarval ir_tarval
Target Machine Value.
Definition: firm_types.h:68
unordered or less
Definition: firm_types.h:170
out port
Definition: firm_types.h:291
replaced by 0 if args cannot alias, 1 otherwise
Definition: firm_types.h:294
No additional properties.
Definition: firm_types.h:223
GCC __builtin_trap(): insert trap.
Definition: firm_types.h:277
The True case is predicted.
Definition: firm_types.h:211
This method never returns.
Definition: firm_types.h:236
ir_relation
Relations for comparing numbers.
Definition: firm_types.h:159
This method can return more than once (typically setjmp).
Definition: firm_types.h:249
fragile op throws exception (and produces X_regular and X_except values)
Definition: firm_types.h:188
greater or equal
Definition: firm_types.h:166
MS __debugbreak(): insert debug break.
Definition: firm_types.h:278
Marker used by opt_funccall (really a hack)...
Definition: firm_types.h:260
void irg_walk_func(ir_node *, void *)
type for graph-walk callbacks
Definition: firm_types.h:94
This method returns newly allocate memory.
Definition: firm_types.h:246
ir_cons_flags
constrained flags for memory operations.
Definition: firm_types.h:183
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
No constrains.
Definition: firm_types.h:184
const char ident
Identifier.
Definition: firm_types.h:50
The function is guaranteed not to end in an endless and to not abort the program. ...
Definition: firm_types.h:239
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:120
ir_mode * mode
The mode of the constraint.
Definition: firm_types.h:270
struct ir_cdep ir_cdep
Control Dependence Analysis Results.
Definition: firm_types.h:86
mtp_additional_properties
Additional method type properties: Tell about special properties of a method type.
Definition: firm_types.h:221