ir_node *get_irg_end_except(const ir_graph *irg);
void set_irg_end_except(ir_graph *irg, ir_node *node);
+/** Returns the node that represents the initial control flow of the given IR graph. */
+ir_node *get_irg_initial_exec(const ir_graph *irg);
+/** Sets the node that represents the initial control of the given IR graph. */
+void set_irg_initial_exec(ir_graph *irg, ir_node *node);
+
/** Returns the node that represents the frame pointer of the given IR graph. */
ir_node *get_irg_frame(const ir_graph *irg);
/** Sets the node that represents the frame pointer of the given IR graph. */
void set_irg_frame(ir_graph *irg, ir_node *node);
-/** Returns the node that represents the global pointer of the given IR graph. */
-ir_node *get_irg_globals(const ir_graph *irg);
-/** Sets the node that represents the global pointer of the given IR graph. */
-void set_irg_globals(ir_graph *irg, ir_node *node);
-
/** Returns the node that represents the tls pointer of the given IR graph. */
ir_node *get_irg_tls(const ir_graph *irg);
/** Sets the node that represents the tls pointer of the given IR graph. */
* if 2 parties try to use the flags.
*/
#ifndef NDEBUG
-void set_using_block_visited(ir_graph *irg);
-void clear_using_block_visited(ir_graph *irg);
-int using_block_visited(const ir_graph *irg);
-void set_using_irn_visited(ir_graph *irg);
-void clear_using_irn_visited(ir_graph *irg);
-int using_irn_visited(const ir_graph *irg);
-void set_using_irn_link(ir_graph *irg);
-void clear_using_irn_link(ir_graph *irg);
-int using_irn_link(const ir_graph *irg);
+enum ir_resources_enum_t {
+ IR_RESOURCE_BLOCK_VISITED = 1 << 0,
+ IR_RESOURCE_BLOCK_MARK = 1 << 1,
+ IR_RESOURCE_IRN_VISITED = 1 << 2,
+ IR_RESOURCE_IRN_LINK = 1 << 3,
+ IR_RESOURCE_LOOP_LINK = 1 << 4,
+};
+typedef unsigned ir_resources_t;
+
+void ir_reserve_resources(ir_graph *irg, ir_resources_t resources);
+void ir_free_resources(ir_graph *irg, ir_resources_t resources);
+ir_resources_t ir_resources_reserved(const ir_graph *irg);
#else
-static INLINE void set_using_block_visited(ir_graph *irg) { (void) irg; }
-static INLINE void clear_using_block_visited(ir_graph *irg) { (void) irg; }
-static INLINE int using_block_visited(const ir_graph *irg) { (void) irg; return 0; }
-static INLINE void set_using_visited(ir_graph *irg) { (void) irg; }
-static INLINE void clear_using_visited(ir_graph *irg) { (void) irg; }
-static INLINE int using_visited(const ir_graph *irg) { (void) irg; return 0; }
-static INLINE void set_using_irn_link(ir_graph *irg) { (void) irg; }
-static INLINE void clear_using_irn_link(ir_graph *irg) { (void) irg; }
-static INLINE int using_irn_link(const ir_graph *irg) { (void) irg; return 0; }
+#define ir_reserve_resources(irg,resources)
+#define ir_free_resources(irg,resources)
+#define ir_resources_reserved(irg) 0
#endif
/** Normalization: Move Proj nodes into the same block as its predecessors */