Rduced the number of files copied for INSTALL
[libfirm] / ir / ir / ircons.c
index e9b995c..18f1b53 100644 (file)
@@ -9,8 +9,13 @@
 **   by Goetz Lindenmaier
 */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 # include "irgraph_t.h"
 # include "irnode_t.h"
+# include "irmode_t.h"
 # include "ircons.h"
 # include "common.h"
 # include "irvrfy.h"
@@ -605,7 +610,6 @@ new_End (void)
   return res;
 }
 
-#if 1
 /* Constructs a Block with a fixed number of predecessors.
    Does set current_block.  Can be used with automatic Phi
    node construction. */
@@ -614,26 +618,19 @@ new_Block (int arity, ir_node **in)
 {
   ir_node *res;
 
-  res = new_r_Block (arity, in);
+  res = new_r_Block (current_ir_graph, arity, in);
   current_ir_graph->current_block = res;
 
   /* Create and initialize array for Phi-node construction. */
   res->attr.block.graph_arr = NEW_ARR_D (ir_node *, current_ir_graph->obst,
-                                         current_ir_graph->params);
-  memset(res->attr.block.graph_arr, 0, sizeof(ir_node *)*current_ir_graph->params);
+                                         current_ir_graph->n_loc);
+  memset(res->attr.block.graph_arr, 0, sizeof(ir_node *)*current_ir_graph->n_loc);
 
   res = optimize (res);
   irn_vrfy (res);
 
   return res;
 }
-#else
-ir_node *
-new_Block (void)
-{
-  return new_immBlock();
-}
-#endif
 
 /*************************************************************************/
 /* Methods necessary for automatic Phi node creation                     */
@@ -1525,8 +1522,8 @@ ir_node *new_immBlock (void) {
 
   /* Create and initialize array for Phi-node construction. */
   res->attr.block.graph_arr = NEW_ARR_D (ir_node *, current_ir_graph->obst,
-                                         current_ir_graph->params);
-  memset(res->attr.block.graph_arr, 0, sizeof(ir_node *)*current_ir_graph->params);
+                                         current_ir_graph->n_loc);
+  memset(res->attr.block.graph_arr, 0, sizeof(ir_node *)*current_ir_graph->n_loc);
 
   /* Immature block may not be optimized! */
   irn_vrfy (res);