#include "callgraph.h"
#include "irprog.h"
#include "field_temperature.h"
-#include "irphases_t.h"
+#include "irphase.h"
#include "pset.h"
#include "set.h"
#include "list.h"
#include "obst.h"
+#include "vrp.h"
-struct ir_phase;
+/**
+ * List of phases. (We will add a register/unregister interface if managing
+ * this gets too tedious)
+ */
+typedef enum ir_phase_id {
+ PHASE_VRP,
+ PHASE_LAST = PHASE_VRP
+} ir_phase_id;
/** The type of an ir_op. */
struct ir_op {
/** Const attributes. */
typedef struct {
- tarval *tv; /**< the target value */
- ir_type *tp; /**< the source type, for analyses. default: type_unknown. */
+ tarval *tarval; /**< the target value */
+ ir_type *tp; /**< the source type, for analyses. default: type_unknown. */
} const_attr;
/** SymConst attributes. */
/** Inline Assembler support attribute. */
typedef struct {
/* BEWARE: pin state MUST be the first attribute */
- op_pin_state pin_state; /**< the pin state for operations that might generate a exception */
- ident *asm_text; /**< The inline assembler text. */
- ir_asm_constraint *inputs; /**< Input constraints. */
- ir_asm_constraint *outputs; /**< Output constraints. */
- ident **clobber; /**< List of clobbered registers. */
+ op_pin_state pin_state; /**< the pin state for operations that might generate a exception */
+ ident *text; /**< The inline assembler text. */
+ ir_asm_constraint *input_constraints; /**< Input constraints. */
+ ir_asm_constraint *output_constraints; /**< Output constraints. */
+ ident **clobbers; /**< List of clobbered registers. */
} asm_attr;
/** Some IR-nodes just have one attribute, these are stored here,
struct ir_node **deps; /**< Additional dependencies induced by state. */
void *backend_info;
irn_edges_info_t edge_info; /**< Everlasting out edges. */
+
/* ------- Opcode depending fields -------- */
attr attr; /**< The set of attributes of this node. Depends on opcode.
Must be last field of struct ir_node. */
unsigned additional_properties; /**< Additional graph properties. */
/* -- Fields indicating different states of irgraph -- */
- unsigned state;
- irg_phase_state phase_state; /**< Compiler phase. */
- op_pin_state irg_pinned_state; /**< Flag for status of nodes. */
- irg_outs_state outs_state; /**< Out edges. */
- irg_dom_state dom_state; /**< Dominator state information. */
- irg_dom_state pdom_state; /**< Post Dominator state information. */
- ir_typeinfo_state typeinfo_state; /**< Validity of type information. */
+ ir_graph_state_t state;
+ irg_phase_state phase_state; /**< Compiler phase. */
+ op_pin_state irg_pinned_state; /**< Flag for status of nodes. */
+ irg_outs_state outs_state; /**< Out edges. */
+ irg_dom_state dom_state; /**< Dominator state information. */
+ irg_dom_state pdom_state; /**< Post Dominator state information. */
+ ir_typeinfo_state typeinfo_state; /**< Validity of type information. */
irg_callee_info_state callee_info_state; /**< Validity of callee information. */
- irg_loopinfo_state loopinfo_state; /**< State of loop information. */
- ir_class_cast_state class_cast_state; /**< Kind of cast operations in code. */
+ irg_loopinfo_state loopinfo_state; /**< State of loop information. */
+ ir_class_cast_state class_cast_state; /**< Kind of cast operations in code. */
irg_extblk_info_state extblk_state; /**< State of extended basic block info. */
- exec_freq_state execfreq_state; /**< Execution frequency state. */
+ exec_freq_state execfreq_state; /**< Execution frequency state. */
ir_entity_usage_computed_state entity_usage_state;
unsigned mem_disambig_opt; /**< Options for the memory disambiguator. */
unsigned fp_model; /**< floating point model of the graph. */
ir_node **idx_irn_map; /**< Array mapping node indexes to nodes. */
int index; /**< a unique number for each graph */
- ir_phase *phases[PHASE_LAST]; /**< Phase information. */
+ ir_phase *phases[PHASE_LAST+1]; /**< Phase information. */
void *be_data; /**< backend can put in private data here */
#ifdef DEBUG_libfirm
int n_outs; /**< Size wasted for outs */