fixed bugs in remove_bad_predecessors.
[libfirm] / ir / ir / irgraph_t.h
index 2d6482a..e5b3617 100644 (file)
@@ -27,6 +27,7 @@
 #include "firm_common_t.h"
 #include "irtypeinfo.h"
 #include "irprog.h"
+#include "pseudo_irg.h"
 
 #include "irloop.h"
 
@@ -59,6 +60,8 @@ struct ir_graph {
   struct ir_node *args;          /**< methods arguments */
   struct ir_node *bad;           /**< bad node of this ir_graph, the one and
                                    only in this graph */
+  struct ir_node *no_mem;        /**< NoMem node of this ir_graph, the one and
+                                   only in this graph */
   /* GL removed: we need unknown with mode for analyses. */
   /*   struct ir_node *unknown;*/           /**< unknown node of this ir_graph */
   struct obstack *obst;          /**< obstack where all of the ir_nodes live */
@@ -119,6 +122,9 @@ struct ir_graph {
  */
 void init_irgraph(void);
 
+/* Internal constructor that does not add to irp_irgs or the like. */
+ir_graph *new_r_ir_graph (entity *ent, int n_loc);
+
 /** Make a rudimentary ir graph for the constant code.
    Must look like a correct irg, spare everything else. */
 ir_graph *new_const_code_irg(void);
@@ -270,6 +276,15 @@ __set_irg_bad(ir_graph *irg, ir_node *node) {
   irg->bad = node;
 }
 
+static INLINE ir_node *
+__get_irg_no_mem(const ir_graph *irg) {
+  return irg->no_mem;
+}
+
+static INLINE void
+__set_irg_no_mem(ir_graph *irg, ir_node *node) {
+  irg->no_mem = node;
+}
 static INLINE ir_node *
 __get_irg_current_block(const ir_graph *irg) {
   return irg->current_block;
@@ -440,6 +455,8 @@ __inc_irg_block_visited(ir_graph *irg) {
 #define set_irg_args(irg, node)            __set_irg_args(irg, node)
 #define get_irg_bad(irg)                   __get_irg_bad(irg)
 #define set_irg_bad(irg, node)             __set_irg_bad(irg, node)
+#define get_irg_no_mem(irg)                __get_irg_no_mem(irg)
+#define set_irg_no_mem(irg, node)          __set_irg_no_mem(irg, node)
 #define get_irg_current_block(irg)         __get_irg_current_block(irg)
 #define set_irg_current_block(irg, node)   __set_irg_current_block(irg, node)
 #define get_irg_entity(irg)                __get_irg_entity(irg)