/** Sets the frame type of an IR graph. */
void set_irg_frame_type(ir_graph *irg, ir_type *ftp);
+/** Returns the value parameter type of an IR graph. */
+ir_type *get_irg_value_param_type(ir_graph *irg);
+
/** Returns the start block of an IR graph. */
ir_node *get_irg_start_block(const ir_graph *irg);
/** Sets the start block of an IR graph. */
/** Sets the node that represents the argument pointer of the given IR graph. */
void set_irg_args(ir_graph *irg, ir_node *node);
-/** Returns the node that represents the value parameter base pointer of the given IR graph. */
-ir_node *get_irg_value_param_base(const ir_graph *irg);
-/** Sets the node that represents the value parameter base pointer of the given IR graph. */
-void set_irg_value_param_base(ir_graph *irg, ir_node *node);
-
/** Returns the current block of an IR graph. */
ir_node *get_irg_current_block(const ir_graph *irg);
/** Sets the current block of an IR graph. */
/* global (irp) resources */
IR_RESOURCE_ENTITY_LINK = 1 << 8, /**< IR-entity link fields are used. */
+ IR_RESOURCE_TYPE_VISITED = 1 << 9, /**< type visited flags */
/* masks */
IR_RESOURCE_LOCAL_MASK = 0x00FF, /**< Mask for all local resources. */
void ir_free_resources(ir_graph *irg, ir_resources_t resources);
ir_resources_t ir_resources_reserved(const ir_graph *irg);
#else
-#define ir_reserve_resources(irg,resources)
-#define ir_free_resources(irg,resources)
+#define ir_reserve_resources(irg,resources) (void)0
+#define ir_free_resources(irg,resources) (void)0
#define ir_resources_reserved(irg) 0
#endif
+/**
+ * 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_t;
+
+/** set some state flags on the graph (this does not clear the other flags) */
+void set_irg_state(ir_graph *irg, ir_graph_state_t state);
+/** clear some state flags of the graph */
+void clear_irg_state(ir_graph *irg, ir_graph_state_t state);
+/** query wether a set of graph state flags are activated */
+int is_irg_state(const ir_graph *irg, ir_graph_state_t state);
+
/** Normalization: Move Proj nodes into the same block as its predecessors */
void normalize_proj_nodes(ir_graph *irg);