end block can not be optimized away any more.
[libfirm] / ir / ir / ircons.c
index 5b8e16f..5015199 100644 (file)
@@ -9,6 +9,10 @@
 **   by Goetz Lindenmaier
 */
 
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
 # include "irgraph_t.h"
 # include "irnode_t.h"
 # include "irmode_t.h"
@@ -32,7 +36,7 @@ struct Phi_in_stack {
 typedef struct Phi_in_stack Phi_in_stack;
 #endif
 
-/*********************************************** */
+/*** ******************************************** */
 /** privat interfaces, for professional use only */
 
 /* Constructs a Block with a fixed number of predecessors.
@@ -575,10 +579,24 @@ new_r_Bad ()
   return current_ir_graph->bad;
 }
 
-/***********************/
+/** ********************/
 /** public interfaces  */
 /** construction tools */
 
+/****f* ircons/new_Start
+ *
+ * NAME
+ *   new_Start -- create a new Start node in the current block
+ *
+ * SYNOPSIS
+ *   s = new_Start(void);
+ *   ir_node* new_Start(void);
+ *
+ * RESULT
+ *   s - pointer to the created Start node
+ *
+ ****
+ */
 ir_node *
 new_Start (void)
 {
@@ -606,7 +624,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. */
@@ -628,15 +645,8 @@ new_Block (int arity, ir_node **in)
 
   return res;
 }
-#else
-ir_node *
-new_Block (void)
-{
-  return new_immBlock();
-}
-#endif
 
-/*************************************************************************/
+/* ***********************************************************************/
 /* Methods necessary for automatic Phi node creation                     */
 /*
   ir_node *phi_merge            (ir_node *block, int pos, ir_mode *mode, ir_node **nin, int ins)
@@ -660,7 +670,7 @@ new_Block (void)
               \|/                \|/
            new_r_Phi0          new_r_Phi_in
 
-*****************************************************************************/
+* *************************************************************************** */
 
 /* Creates a Phi node with 0 predecessors */
 inline ir_node *
@@ -1198,7 +1208,7 @@ get_r_value_internal (ir_node *block, int pos, ir_mode *mode)
 
 #endif /* USE_FAST_PHI_CONSTRUCTION */
 
-/****************************************************************************/
+/* ************************************************************************** */
 
 /** Finalize a Block node, when all control flows are known.  */
 /** Acceptable parameters are only Block nodes.               */
@@ -1217,6 +1227,7 @@ mature_block (ir_node *block)
     /* turn the dynamic in-array into a static one. */
     ins = ARR_LEN (block->in)-1;
     NEW_ARR_A (ir_node *, nin, ins);
+    /*  @@@ something is strange here... why isn't the array copied? */
 
     /* Traverse a chain of Phi nodes attached to this block and mature
        these, too. **/
@@ -1508,10 +1519,10 @@ new_Bad (void)
   return current_ir_graph->bad;
 }
 
-/*************************************************************************/
+/* ********************************************************************* */
 /* Comfortable interface with automatic Phi node construction.           */
 /* (Uses also constructors of ?? interface, except new_Block.            */
-/*************************************************************************/
+/* ********************************************************************* */
 
 /** Block construction **/
 /* immature Block without predecessors */
@@ -1555,7 +1566,7 @@ switch_block (ir_node *target)
   current_ir_graph->current_block = target;
 }
 
-/****************************/
+/* ************************ */
 /* parameter administration */
 
 /* get a value from the parameter array from the current block by its index */
@@ -1590,7 +1601,7 @@ set_store (ir_node *store)
   current_ir_graph->current_block->attr.block.graph_arr[0] = store;
 }
 
-/*************************************************************************/
+/* ********************************************************************* */
 /* initialize */
 
 /* call once for each run of the library */