#include "callgraph.h"
#include "irprog.h"
#include "field_temperature.h"
-#include "irphases_t.h"
+#include "irphase.h"
#include "pset.h"
#include "set.h"
#include "obst.h"
#include "vrp.h"
+/**
+ * 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 {
unsigned code; /**< The unique opcode of the 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,
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 */
+
+ unsigned dump_nr; /**< number of graph dumps */
#ifdef DEBUG_libfirm
int n_outs; /**< Size wasted for outs */
long graph_nr; /**< a unique graph number for each
ir_graph *main_irg; /**< The entry point to the compiled program
or NULL if no point exists. */
ir_graph **graphs; /**< A list of all graphs in the ir. */
- ir_graph **pseudo_graphs; /**< A list of all pseudo graphs in the ir. See pseudo_irg.c */
ir_graph *const_code_irg; /**< This ir graph gives the proper environment
to allocate nodes the represent values
of constant entities. It is not meant as
ir_label_t last_label_nr; /**< The highest label number for generating unique labels. */
int max_irg_idx; /**< highest unused irg index */
long max_node_nr; /**< to generate unique numbers for nodes. */
+ unsigned dump_nr; /**< number of program info dumps */
#ifndef NDEBUG
ir_resources_t reserved_resources; /**< Bitset for tracking used global resources. */
#endif