libFirm
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;
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;
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;
107 
112 
116 
120 typedef void irg_walk_func(ir_node *, void *);
121 
129 
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 {
187  ir_relation_equal = 1u << 0,
188  ir_relation_less = 1u << 1,
193  ir_relation_less_greater = ir_relation_less|ir_relation_greater,
202 } 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,
217 } ir_cons_flags;
219 
220 
224 typedef enum op_pin_state {
231 } op_pin_state;
232 
237 typedef enum cond_jmp_predicate {
242 
264  mtp_property_pure = 1u << 1,
295  mtp_temporary = 1u << 14,
298 
299 
305 typedef enum symconst_kind {
317 } symconst_kind;
318 
326 typedef union symconst_symbol {
331 
336 typedef enum ir_where_alloc {
340 
344 typedef struct ir_asm_constraint {
345  unsigned pos;
349 
353 typedef enum ir_builtin_kind {
368  ir_bk_last = ir_bk_inner_trampoline,
370 
380 
384 typedef enum {
387 } ir_volatility;
388 
392 typedef enum {
395 } ir_align;
396 
397 #include "end.h"
398 
399 #endif