* represent a procedure in FIRM.
*
* It allocates an ir_graph and sets the field irg of the entity ent
- * as well as current_ir_graph to point to this graph.
- * Further it allocates the following nodes needed for every
- * procedure:
+ * to point to this graph. Further it allocates the following nodes needed
+ * for every procedure:
*
* - The start block containing a start node and Proj nodes for it's
* seven results (X, M, P, P, P, T, P).
/** Sets the node that represents the argument pointer of the given IR graph. */
FIRM_API void set_irg_args(ir_graph *irg, ir_node *node);
-/** Returns the current block of an IR graph. */
-FIRM_API ir_node *get_irg_current_block(const ir_graph *irg);
-/** Sets the current block of an IR graph. */
-FIRM_API void set_irg_current_block(ir_graph *irg, ir_node *node);
-
/** Returns the Bad node of the given IR graph. Use new_Bad() instead!! */
FIRM_API ir_node *get_irg_bad(const ir_graph *irg);
FIRM_API void set_irg_bad(ir_graph *irg, ir_node *node);
/** Sets the phase state of an IR graph. */
FIRM_API void set_irg_phase_state(ir_graph *irg, irg_phase_state state);
-/** Sets the phase of the given IR graph to low. */
-#define set_irg_phase_low(irg) set_irg_phase_state(irg, phase_low)
-
/** state: op_pin_state_pinned
The graph is "op_pin_state_pinned" if all nodes are associated with a basic block.
It is in state "op_pin_state_floats" if nodes are in arbitrary blocks. In state
/** state: extended basic block state. */
typedef enum {
- extblk_none = 0, /**< No extended basic block information is constructed. Default. */
- extblk_valid = 1, /**< Extended basic block information is valid. */
- extblk_invalid = 2 /**< Extended basic block information is constructed but invalid. */
-} irg_extblk_state;
-FIRM_API irg_extblk_state get_irg_extblk_state(const ir_graph *irg);
+ ir_extblk_info_none = 0, /**< No extended basic block information is constructed. Default. */
+ ir_extblk_info_valid = 1, /**< Extended basic block information is valid. */
+ ir_extblk_info_invalid = 2 /**< Extended basic block information is constructed but invalid. */
+} irg_extblk_info_state;
+FIRM_API irg_extblk_info_state get_irg_extblk_state(const ir_graph *irg);
FIRM_API void set_irg_extblk_inconsistent(ir_graph *irg);
/** state: dom_state
* Returns the mask of the additional graph properties.
* The properties are automatically inherited from the method type
* if they were not set using set_irg_additional_properties() or
- * set_irg_additional_property().
+ * set_irg_additional_properties().
*
- * @return a bitset of mtp_additional_property values
+ * @return a bitset of mtp_additional_properties values
*/
-FIRM_API unsigned get_irg_additional_properties(const ir_graph *irg);
+FIRM_API mtp_additional_properties get_irg_additional_properties(const ir_graph *irg);
/** Sets the mask of the additional graph properties. */
FIRM_API void set_irg_additional_properties(ir_graph *irg,
- unsigned property_mask);
+ mtp_additional_properties property_mask);
/** Sets one additional graph property. */
-FIRM_API void set_irg_additional_property(ir_graph *irg,
- mtp_additional_property flag);
+FIRM_API void add_irg_additional_properties(ir_graph *irg,
+ mtp_additional_properties flag);
/** A void * field to link arbitrary information to the node. */
FIRM_API void set_irg_link(ir_graph *irg, void *thing);
* block_visited flags. If NDEBUG is not defined, then the compiler will abort
* if 2 parties try to use the flags.
*/
-enum ir_resources_enum_t {
+typedef enum ir_resources_t {
/* local (irg) resources */
+ IR_RESOURCE_NONE = 0,
IR_RESOURCE_BLOCK_VISITED = 1 << 0, /**< Block visited flags are used. */
IR_RESOURCE_BLOCK_MARK = 1 << 1, /**< Block mark bits are used. */
IR_RESOURCE_IRN_VISITED = 1 << 2, /**< IR-node visited flags are used. */
/* masks */
IR_RESOURCE_LOCAL_MASK = 0x00FF, /**< Mask for all local resources. */
IR_RESOURCE_GLOBAL_MASK = 0xFF00 /**< Mask for all global resources. */
-};
-typedef unsigned ir_resources_t;
+} ir_resources_t;
+ENUM_BITSET(ir_resources_t)
#ifndef NDEBUG
FIRM_API void ir_reserve_resources(ir_graph *irg, ir_resources_t resources);
* Graph State
*/
typedef enum {
- IR_GRAPH_STATE_KEEP_MUX = 1 << 0, /**< should perform no further optimisations on Mux nodes */
- IR_GRAPH_STATE_ARCH_DEP = 1 << 1, /**< should not construct more nodes which irarch potentially breaks down */
+ IR_GRAPH_STATE_KEEP_MUX = 1U << 0, /**< should perform no further optimisations on Mux nodes */
+ IR_GRAPH_STATE_ARCH_DEP = 1U << 1, /**< should not construct more nodes which irarch potentially breaks down */
+ IR_GRAPH_STATE_BCONV_ALLOWED = 1U << 2, /**< Conv(mode_b) to Iu is allowed as set command */
} ir_graph_state_t;
+ENUM_BITSET(ir_graph_state_t)
/** set some state flags on the graph (this does not clear the other flags) */
FIRM_API void set_irg_state(ir_graph *irg, ir_graph_state_t state);
/** query wether a set of graph state flags are activated */
FIRM_API int is_irg_state(const ir_graph *irg, ir_graph_state_t state);
-/** Normalization: Move Proj nodes into the same block as its predecessors */
-FIRM_API void normalize_proj_nodes(ir_graph *irg);
-
/** Set a description for local value n. */
FIRM_API void set_irg_loc_description(ir_graph *irg, int n, void *description);