** by Goetz Lindenmaier
*/
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
# include "irgraph_t.h"
# include "irnode_t.h"
# include "irmode_t.h"
typedef struct Phi_in_stack Phi_in_stack;
#endif
-/*********************************************** */
+/*** ******************************************** */
/** privat interfaces, for professional use only */
/* Constructs a Block with a fixed number of predecessors.
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)
{
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. */
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)
\|/ \|/
new_r_Phi0 new_r_Phi_in
-*****************************************************************************/
+* *************************************************************************** */
/* Creates a Phi node with 0 predecessors */
inline ir_node *
#endif /* USE_FAST_PHI_CONSTRUCTION */
-/****************************************************************************/
+/* ************************************************************************** */
/** Finalize a Block node, when all control flows are known. */
/** Acceptable parameters are only Block nodes. */
/* 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. **/
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 */
current_ir_graph->current_block = target;
}
-/****************************/
+/* ************************ */
/* parameter administration */
/* get a value from the parameter array from the current block by its index */
current_ir_graph->current_block->attr.block.graph_arr[0] = store;
}
-/*************************************************************************/
+/* ********************************************************************* */
/* initialize */
/* call once for each run of the library */