firmjni does not like two similar enums.
[libfirm] / ir / ir / ircons.c
index 8b5162b..53674ca 100644 (file)
@@ -25,6 +25,7 @@
 #include <string.h>
 #endif
 
+# include "irprog_t.h"
 # include "irgraph_t.h"
 # include "irnode_t.h"
 # include "irmode_t.h"
@@ -84,6 +85,7 @@ new_rd_Block (dbg_info* db, ir_graph *irg,  int arity, ir_node **in)
   res->attr.block.backedge    = new_backedge_arr(irg->obst, arity);
   res->attr.block.in_cg       = NULL;
   res->attr.block.cg_backedge = NULL;
+  res->attr.block.extblk      = NULL;
 
   IRN_VRFY_IRG(res, irg);
   return res;
@@ -926,6 +928,10 @@ ir_node *new_r_Const_long(ir_graph *irg, ir_node *block,
   return new_rd_Const_long(NULL, irg, block, mode, value);
 }
 
+ir_node *new_r_Const_type(ir_graph *irg, ir_node *block,
+               ir_mode *mode, tarval *con, type *tp) {
+  return new_rd_Const_type(NULL, irg, block, mode, con, tp);
+}
 
 ir_node *new_r_SymConst (ir_graph *irg, ir_node *block,
                        symconst_symbol value, symconst_kind symkind) {
@@ -1997,7 +2003,7 @@ new_d_Const_long(dbg_info* db, ir_mode *mode, long value)
   return new_rd_Const_long(db, current_ir_graph, current_ir_graph->start_block, mode, value);
 }
 
-    ir_node *
+ir_node *
 new_d_Const_type (dbg_info* db, ir_mode *mode, tarval *con, type *tp)
 {
   return new_rd_Const_type(db, current_ir_graph, current_ir_graph->start_block,
@@ -2559,10 +2565,21 @@ init_cons(uninitialized_local_variable_func_t *func)
 
 /* call for each graph */
 void
-finalize_cons (ir_graph *irg) {
+irg_finalize_cons (ir_graph *irg) {
   irg->phase_state = phase_high;
 }
 
+void
+irp_finalize_cons (void) {
+  int i, n_irgs = get_irp_n_irgs();
+  for (i = 0; i < n_irgs; i++) {
+    irg_finalize_cons(get_irp_irg(i));
+  }
+  irp->phase_state = phase_high;\
+}
+
+
+
 
 ir_node *new_Block(int arity, ir_node **in) {
   return new_d_Block(NULL, arity, in);