remove the unused/strange concept of a pseudo-irg
[libfirm] / ir / ir / irtypes.h
index b78cdd9..0df6d12 100644 (file)
@@ -39,7 +39,7 @@
 #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. */
@@ -161,8 +170,8 @@ typedef struct {
 
 /** 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. */
@@ -296,11 +305,11 @@ typedef struct {
 /** 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,
@@ -453,18 +462,18 @@ struct ir_graph {
        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. */
@@ -508,8 +517,10 @@ struct ir_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
@@ -542,7 +553,6 @@ struct ir_prog {
        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
@@ -585,6 +595,7 @@ struct ir_prog {
        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