- remove all irg parameter from node constructors having a block
authorMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Sun, 5 Jul 2009 17:14:32 +0000 (17:14 +0000)
committerMichael Beck <beck@ipd.info.uni-karlsruhe.de>
Sun, 5 Jul 2009 17:14:32 +0000 (17:14 +0000)
- SymConst's are now ALWAYS placed in the start block

[r26236]

67 files changed:
include/libfirm/ircons.h
ir/ana/irconsconfirm.c
ir/ana/irmemory.c
ir/ana/structure.c
ir/be/arm/arm_optimize.c
ir/be/arm/arm_transform.c
ir/be/arm/bearch_arm.c
ir/be/beabi.c
ir/be/bechordal.c
ir/be/beflags.c
ir/be/beirgmod.c
ir/be/belower.c
ir/be/benewalloc.c
ir/be/benode.c
ir/be/benode_t.h
ir/be/bespill.c
ir/be/bespillslots.c
ir/be/bessaconstr.c
ir/be/bessadestr.c
ir/be/bestate.c
ir/be/ia32/bearch_ia32.c
ir/be/ia32/ia32_finish.c
ir/be/ia32/ia32_fpu.c
ir/be/ia32/ia32_intrinsics.c
ir/be/ia32/ia32_optimize.c
ir/be/ia32/ia32_transform.c
ir/be/ia32/ia32_x87.c
ir/be/mips/bearch_mips.c
ir/be/mips/mips_transform.c
ir/be/ppc32/bearch_ppc32.c
ir/be/ppc32/ppc32_transform.c
ir/be/ppc32/ppc32_transform_conv.c
ir/ir/instrument.c
ir/ir/irarch.c
ir/ir/ircons.c
ir/ir/irio.c
ir/ir/iropt.c
ir/ir/irprofile.c
ir/lower/lower_calls.c
ir/lower/lower_copyb.c
ir/lower/lower_dw.c
ir/lower/lower_hl.c
ir/lower/lower_intrinsics.c
ir/lower/lower_mode_b.c
ir/opt/boolopt.c
ir/opt/cfopt.c
ir/opt/combo.c
ir/opt/condeval.c
ir/opt/convopt.c
ir/opt/critical_edges.c
ir/opt/escape_ana.c
ir/opt/funccall.c
ir/opt/gvn_pre.c
ir/opt/ifconv.c
ir/opt/ldst2.c
ir/opt/ldstopt.c
ir/opt/opt_blocks.c
ir/opt/opt_inline.c
ir/opt/opt_ldst.c
ir/opt/opt_osr.c
ir/opt/proc_cloning.c
ir/opt/reassoc.c
ir/opt/return.c
ir/opt/tailrec.c
ir/opt/tropt.c
scripts/gen_ir.py
scripts/gen_ir_io.py

index 2ffb820..8853b0f 100644 (file)
@@ -1174,7 +1174,7 @@ typedef enum ir_cons_flags {
  * @param in[]   An array of control predecessors.  The length of
  *               the array must be 'arity'.  The constructor copies this array.
  */
-ir_node *new_rd_Block  (dbg_info *db, ir_graph *irg,  int arity, ir_node *in[]);
+ir_node *new_rd_Block(dbg_info *db, ir_graph *irg, int arity, ir_node *in[]);
 
 /** Constructor for a Start node.
  *
@@ -1182,7 +1182,7 @@ ir_node *new_rd_Block  (dbg_info *db, ir_graph *irg,  int arity, ir_node *in[]);
  * @param *irg   The IR graph the node belongs to.
  * @param *block The IR block the node belongs to.
  */
-ir_node *new_rd_Start  (dbg_info *db, ir_graph *irg, ir_node *block);
+ir_node *new_rd_Start(dbg_info *db, ir_graph *irg, ir_node *block);
 
 /** Constructor for a End node.
  *
@@ -1190,17 +1190,16 @@ ir_node *new_rd_Start  (dbg_info *db, ir_graph *irg, ir_node *block);
  * @param *irg   The IR graph the node  belongs to.
  * @param *block The IR block the node belongs to.
  */
-ir_node *new_rd_End    (dbg_info *db, ir_graph *irg, ir_node *block);
+ir_node *new_rd_End(dbg_info *db, ir_graph *irg, ir_node *block);
 
 /** Constructor for a Jmp node.
  *
  * Jmp represents control flow to a single control successor.
  *
  * @param *db     A pointer for debug information.
- * @param *irg    The IR graph the node belongs to.
  * @param *block  The IR block the node belongs to.
  */
-ir_node *new_rd_Jmp    (dbg_info *db, ir_graph *irg, ir_node *block);
+ir_node *new_rd_Jmp(dbg_info *db, ir_node *block);
 
 /** Constructor for an IJmp node.
  *
@@ -1208,11 +1207,10 @@ ir_node *new_rd_Jmp    (dbg_info *db, ir_graph *irg, ir_node *block);
  * statically known i.e. an indirect Jmp.
  *
  * @param *db     A pointer for debug information.
- * @param *irg    The IR graph the node belongs to.
  * @param *block  The IR block the node belongs to.
  * @param *tgt    The IR node representing the target address.
  */
-ir_node *new_rd_IJmp   (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *tgt);
+ir_node *new_rd_IJmp(dbg_info *db, ir_node *block, ir_node *tgt);
 
 /** Constructor for a Break node.
  *
@@ -1222,10 +1220,9 @@ ir_node *new_rd_IJmp   (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *tg
  * behind Call nodes to represent the control flow to called procedures.
  *
  * @param *db     A pointer for debug information.
- * @param *irg    The IR graph the node belong to.
  * @param *block  The block the node belong to.
  */
-ir_node *new_rd_Break  (dbg_info *db, ir_graph *irg, ir_node *block);
+ir_node *new_rd_Break(dbg_info *db, ir_node *block);
 
 /** Constructor for a Cond node.
  *
@@ -1237,11 +1234,10 @@ ir_node *new_rd_Break  (dbg_info *db, ir_graph *irg, ir_node *block);
  * longs.
  *
  * @param *db    A pointer for debug information.
- * @param *irg   The IR graph the node  belongs to.
  * @param *block The IR block the node belongs to.
  * @param *c     The conditions parameter. Can be of mode b or I_u.
  */
-ir_node *new_rd_Cond   (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *c);
+ir_node *new_rd_Cond(dbg_info *db, ir_node *block, ir_node *c);
 
 /** Constructor for a Return node.
  *
@@ -1249,14 +1245,13 @@ ir_node *new_rd_Cond   (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *c)
  * can end regular control flow.
  *
  * @param *db    A pointer for debug information.
- * @param *irg   The IR graph the node  belongs to.
  * @param *block The IR block the node belongs to.
  * @param *store The state of memory.
  * @param arity  Number of return values.
  * @param *in    Array of length arity with return values.  The constructor copies this array.
  */
-ir_node *new_rd_Return (dbg_info *db, ir_graph *irg, ir_node *block,
-                       ir_node *store, int arity, ir_node *in[]);
+ir_node *new_rd_Return(dbg_info *db, ir_node *block,
+                       ir_node *store, int arity, ir_node *in[]);
 
 /** Constructor for a Const_type node.
  *
@@ -1271,7 +1266,7 @@ ir_node *new_rd_Return (dbg_info *db, ir_graph *irg, ir_node *block,
  * @param *con   Points to an entry in the constant table.
  * @param *tp    The type of the constant.
  */
-ir_node *new_rd_Const_type (dbg_info *db, ir_graph *irg,
+ir_node *new_rd_Const_type(dbg_info *db, ir_graph *irg,
                             tarval *con, ir_type *tp);
 
 /** Constructor for a Const node.
@@ -1287,7 +1282,7 @@ ir_node *new_rd_Const_type (dbg_info *db, ir_graph *irg,
  * @param *irg   The IR graph the node  belongs to.
  * @param *con   Points to an entry in the constant table.
  */
-ir_node *new_rd_Const  (dbg_info *db, ir_graph *irg, tarval *con);
+ir_node *new_rd_Const(dbg_info *db, ir_graph *irg, tarval *con);
 
 /** Constructor for a Const node.
  *
@@ -1302,8 +1297,8 @@ ir_node *new_rd_Const  (dbg_info *db, ir_graph *irg, tarval *con);
  * @param *mode  The mode of the operands and results.
  * @param value  A value from which the tarval is made.
  */
-ir_node *new_rd_Const_long (dbg_info *db, ir_graph *irg,
-                                   ir_mode *mode, long value);
+ir_node *new_rd_Const_long(dbg_info *db, ir_graph *irg,
+                                  ir_mode *mode, long value);
 
 /** Constructor for a SymConst_type node.
  *
@@ -1334,13 +1329,12 @@ ir_node *new_rd_Const_long (dbg_info *db, ir_graph *irg,
  *
  * @param *db     A pointer for debug information.
  * @param *irg    The IR graph the node  belongs to.
- * @param *block  The IR block the node belongs to.
  * @param mode    The mode for the SymConst.
  * @param symkind The kind of the symbolic constant: type_tag, size, addr_name or addr_ent.
  * @param value   A type, entity or a ident depending on the SymConst kind.
  * @param tp      The source type of the constant.
  */
-ir_node *new_rd_SymConst_type(dbg_info *db, ir_graph *irg, ir_node *block, ir_mode *mode,
+ir_node *new_rd_SymConst_type(dbg_info *db, ir_graph *irg, ir_mode *mode,
                               union symconst_symbol value,
                               symconst_kind symkind, ir_type *tp);
 
@@ -1348,7 +1342,7 @@ ir_node *new_rd_SymConst_type(dbg_info *db, ir_graph *irg, ir_node *block, ir_mo
  *
  *  Same as new_rd_SymConst_type, except that it sets the type to type_unknown.
  */
-ir_node *new_rd_SymConst(dbg_info *db, ir_graph *irg, ir_node *block, ir_mode *mode,
+ir_node *new_rd_SymConst(dbg_info *db, ir_graph *irg, ir_mode *mode,
                          union symconst_symbol value, symconst_kind symkind);
 
 /** Constructor for a SymConst addr_ent node.
@@ -1410,7 +1404,6 @@ ir_node *new_rd_SymConst_align(dbg_info *db, ir_graph *irg, ir_mode *mode,
  *  inputs.  It adds the two parameters 0, NULL.
  *
  * @param   *db        A pointer for debug information.
- * @param   *irg       The IR graph the node  belongs to.
  * @param   *block     The IR block the node belongs to.
  * @param   *store     The memory in which the object the entity should be
  *                     selected from is allocated.
@@ -1418,8 +1411,8 @@ ir_node *new_rd_SymConst_align(dbg_info *db, ir_graph *irg, ir_mode *mode,
  *                     single attribute out.
  * @param   *ent       The entity to select.
  */
-ir_node *new_rd_simpleSel (dbg_info *db, ir_graph *irg, ir_node *block,
-                           ir_node *store, ir_node *objptr, ir_entity *ent);
+ir_node *new_rd_simpleSel(dbg_info *db, ir_node *block,
+                          ir_node *store, ir_node *objptr, ir_entity *ent);
 
 /** Constructor for a Sel node.
  *
@@ -1430,7 +1423,6 @@ ir_node *new_rd_simpleSel (dbg_info *db, ir_graph *irg, ir_node *block,
  * node takes the required array indices as inputs.
  *
  * @param   *db        A pointer for debug information.
- * @param   *irg       The IR graph the node  belongs to.
  * @param   *block     The IR block the node belongs to.
  * @param   *store     The memory in which the object the entity should be selected
  *                     from is allocated.
@@ -1441,15 +1433,14 @@ ir_node *new_rd_simpleSel (dbg_info *db, ir_graph *irg, ir_node *block,
  *                     element entity.  The constructor copies this array.
  * @param   *ent       The entity to select.
  */
-ir_node *new_rd_Sel    (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store,
-                                   ir_node *objptr, int n_index, ir_node *index[], ir_entity *ent);
+ir_node *new_rd_Sel(dbg_info *db, ir_node *block, ir_node *store,
+                    ir_node *objptr, int n_index, ir_node *index[], ir_entity *ent);
 
 /** Constructor for a Call node.
  *
  * Represents all kinds of method and function calls.
  *
  * @param   *db     A pointer for debug information.
- * @param   *irg    The IR graph the node  belongs to.
  * @param   *block  The IR block the node belongs to.
  * @param   *store  The current memory state.
  * @param   *callee A pointer to the called procedure.
@@ -1457,15 +1448,14 @@ ir_node *new_rd_Sel    (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *st
  * @param   *in[]   An array with the procedure parameters. The constructor copies this array.
  * @param   *tp     Type information of the procedure called.
  */
-ir_node *new_rd_Call   (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store,
-                                   ir_node *callee, int arity, ir_node *in[], ir_type *tp);
+ir_node *new_rd_Call(dbg_info *db, ir_node *block, ir_node *store,
+                     ir_node *callee, int arity, ir_node *in[], ir_type *tp);
 
 /** Constructor for a Â´Builtin node.
  *
  * Represents a call of a backend-specific builtin..
  *
  * @param   *db     A pointer for debug information.
- * @param   *irg    The IR graph the node  belongs to.
  * @param   *block  The IR block the node belongs to.
  * @param   *store  The current memory state.
  * @param   arity   The number of procedure parameters.
@@ -1473,72 +1463,66 @@ ir_node *new_rd_Call   (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *st
  * @param   kind    The kind of the called builtin.
  * @param   *tp     Type information of the procedure called.
  */
-ir_node *new_rd_Builtin(dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store,
-                                   int arity, ir_node *in[], ir_builtin_kind kind, ir_type *tp);
+ir_node *new_rd_Builtin(dbg_info *db, ir_node *block, ir_node *store,
+                        int arity, ir_node *in[], ir_builtin_kind kind, ir_type *tp);
 
 /** Constructor for a Add node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op1   The first operand.
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_rd_Add    (dbg_info *db, ir_graph *irg, ir_node *block,
-                                   ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_rd_Add(dbg_info *db, ir_node *block,
+                    ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Sub node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op1   The first operand.
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_rd_Sub    (dbg_info *db, ir_graph *irg, ir_node *block,
-                                   ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_rd_Sub(dbg_info *db, ir_node *block,
+                    ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Minus node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op    The operand .
  * @param   *mode  The mode of the operand and the result.
  */
-ir_node *new_rd_Minus  (dbg_info *db, ir_graph *irg, ir_node *block,
-                       ir_node *op,  ir_mode *mode);
+ir_node *new_rd_Minus(dbg_info *db, ir_node *block,
+                      ir_node *op, ir_mode *mode);
 
 /** Constructor for a Mul node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op1   The first operand.
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_rd_Mul    (dbg_info *db, ir_graph *irg, ir_node *block,
-               ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_rd_Mul(dbg_info *db, ir_node *block,
+                    ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Mulh node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op1   The first operand.
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_rd_Mulh   (dbg_info *db, ir_graph *irg, ir_node *block,
-               ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_rd_Mulh(dbg_info *db, ir_node *block,
+                     ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Quot node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *memop The store needed to model exceptions
  * @param   *op1   The first operand.
@@ -1546,13 +1530,12 @@ ir_node *new_rd_Mulh   (dbg_info *db, ir_graph *irg, ir_node *block,
  * @param   *mode  The mode of the result.
  * @param   state  The pinned state.
  */
-ir_node *new_rd_Quot   (dbg_info *db, ir_graph *irg, ir_node *block,
-               ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_rd_Quot(dbg_info *db, ir_node *block, ir_node *memop,
+                     ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
 
 /** Constructor for a DivMod node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *memop The store needed to model exceptions
  * @param   *op1   The first operand.
@@ -1560,13 +1543,12 @@ ir_node *new_rd_Quot   (dbg_info *db, ir_graph *irg, ir_node *block,
  * @param   *mode  The mode of the results.
  * @param   state  The pinned state.
  */
-ir_node *new_rd_DivMod (dbg_info *db, ir_graph *irg, ir_node *block,
-               ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_rd_DivMod(dbg_info *db, ir_node *block, ir_node *memop,
+                       ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
 
 /** Constructor for a Div node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *memop The store needed to model exceptions
  * @param   *op1   The first operand.
@@ -1574,13 +1556,12 @@ ir_node *new_rd_DivMod (dbg_info *db, ir_graph *irg, ir_node *block,
  * @param   *mode  The mode of the result.
  * @param   state  The pinned state.
  */
-ir_node *new_rd_Div    (dbg_info *db, ir_graph *irg, ir_node *block,
-               ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_rd_Div(dbg_info *db, ir_node *block, ir_node *memop,
+                    ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
 
 /** Constructor for a remainderless Div node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *memop The store needed to model exceptions
  * @param   *op1   The first operand.
@@ -1588,13 +1569,12 @@ ir_node *new_rd_Div    (dbg_info *db, ir_graph *irg, ir_node *block,
  * @param   *mode  The mode of the result.
  * @param   state  The pinned state.
  */
-ir_node *new_rd_DivRL  (dbg_info *db, ir_graph *irg, ir_node *block,
-               ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_rd_DivRL(dbg_info *db, ir_node *block, ir_node *memop,
+                      ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
 
 /** Constructor for a Mod node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *memop The store needed to model exceptions
  * @param   *op1   The first operand.
@@ -1602,238 +1582,215 @@ ir_node *new_rd_DivRL  (dbg_info *db, ir_graph *irg, ir_node *block,
  * @param   *mode  The mode of the result.
  * @param   state  The pinned state.
  */
-ir_node *new_rd_Mod    (dbg_info *db, ir_graph *irg, ir_node *block,
-                       ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_rd_Mod(dbg_info *db, ir_node *block, ir_node *memop,
+                    ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
 
 /** Constructor for a Abs node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op    The operand
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_rd_Abs    (dbg_info *db, ir_graph *irg, ir_node *block,
-                       ir_node *op, ir_mode *mode);
+ir_node *new_rd_Abs(dbg_info *db, ir_node *block, ir_node *op, ir_mode *mode);
 
 /** Constructor for a And node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op1   The first operand.
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_rd_And    (dbg_info *db, ir_graph *irg, ir_node *block,
-                       ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_rd_And(dbg_info *db, ir_node *block,
+                    ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Or node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op1   The first operand.
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_rd_Or     (dbg_info *db, ir_graph *irg, ir_node *block,
-                       ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_rd_Or(dbg_info *db, ir_node *block,
+                   ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Eor node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op1   The first operand.
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the results.
  */
-ir_node *new_rd_Eor    (dbg_info *db, ir_graph *irg, ir_node *block,
-                       ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_rd_Eor(dbg_info *db, ir_node *block,
+                    ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Not node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op    The operand.
  * @param   *mode  The mode of the operand and the result.
  */
-ir_node *new_rd_Not    (dbg_info *db, ir_graph *irg, ir_node *block,
-               ir_node *op, ir_mode *mode);
+ir_node *new_rd_Not(dbg_info *db, ir_node *block, ir_node *op, ir_mode *mode);
 
 /** Constructor for a Cmp node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op1   The first operand.
  * @param   *op2   The second operand.
  */
-ir_node *new_rd_Cmp    (dbg_info *db, ir_graph *irg, ir_node *block,
-               ir_node *op1, ir_node *op2);
+ir_node *new_rd_Cmp(dbg_info *db, ir_node *block, ir_node *op1, ir_node *op2);
 
 /** Constructor for a Shl node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op    The operand.
  * @param   *k     The number of bits to  shift the operand .
  * @param   *mode  The mode of the operand and the result.
  */
-ir_node *new_rd_Shl    (dbg_info *db, ir_graph *irg, ir_node *block,
-               ir_node *op, ir_node *k, ir_mode *mode);
+ir_node *new_rd_Shl(dbg_info *db, ir_node *block,
+                    ir_node *op, ir_node *k, ir_mode *mode);
 
 /** Constructor for a Shr node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op    The operand.
  * @param   *k     The number of bits to shift the operand .
  * @param   *mode  The mode of the operand and the result.
  */
-ir_node *new_rd_Shr    (dbg_info *db, ir_graph *irg, ir_node *block,
-               ir_node *op, ir_node *k, ir_mode *mode);
+ir_node *new_rd_Shr(dbg_info *db, ir_node *block,
+                    ir_node *op, ir_node *k, ir_mode *mode);
 
 /** Constructor for a Shrs node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op    The operand.
  * @param   *k     The number of bits to shift the operand.
  * @param   *mode  The mode of the operand and the result.
  */
-ir_node *new_rd_Shrs   (dbg_info *db, ir_graph *irg, ir_node *block,
-               ir_node *op, ir_node *k, ir_mode *mode);
+ir_node *new_rd_Shrs(dbg_info *db, ir_node *block,
+                     ir_node *op, ir_node *k, ir_mode *mode);
 
 /** Constructor for a Rotl node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op    The operand.
  * @param   *k     The number of bits to rotate the operand.
  * @param   *mode  The mode of the operand.
  */
-ir_node *new_rd_Rotl    (dbg_info *db, ir_graph *irg, ir_node *block,
-               ir_node *op, ir_node *k, ir_mode *mode);
+ir_node *new_rd_Rotl(dbg_info *db, ir_node *block,
+                     ir_node *op, ir_node *k, ir_mode *mode);
 
 
 /** Constructor for a Conv node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op    The operand.
  * @param   *mode  The mode of this the operand muss be converted .
  */
-ir_node *new_rd_Conv   (dbg_info *db, ir_graph *irg, ir_node *block,
-               ir_node *op, ir_mode *mode);
+ir_node *new_rd_Conv(dbg_info *db, ir_node *block, ir_node *op, ir_mode *mode);
 
 /** Constructor for a strictConv node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op    The operand.
  * @param   *mode  The mode of this the operand muss be converted .
  */
-ir_node *new_rd_strictConv   (dbg_info *db, ir_graph *irg, ir_node *block,
-               ir_node *op, ir_mode *mode);
+ir_node *new_rd_strictConv(dbg_info *db, ir_node *block,
+                           ir_node *op, ir_mode *mode);
 
 /** Constructor for a Cast node.
  *
  * High level type cast.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op    The operand.
  * @param   *to_tp The type of this the operand muss be casted .
  */
-ir_node *new_rd_Cast   (dbg_info *db, ir_graph *irg, ir_node *block,
-                       ir_node *op, ir_type *to_tp);
+ir_node *new_rd_Cast(dbg_info *db, ir_node *block,
+                     ir_node *op, ir_type *to_tp);
 
 /** Constructor for a Carry node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op1   The first operand.
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_rd_Carry  (dbg_info *db, ir_graph *irg, ir_node *block,
-                       ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_rd_Carry(dbg_info *db, ir_node *block,
+                      ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Borrow node.
  *
  * @param   *db    A pointer for debug information.
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op1   The first operand.
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_rd_Borrow (dbg_info *db, ir_graph *irg, ir_node *block,
-                       ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_rd_Borrow(dbg_info *db, ir_node *block,
+                       ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Phi node.
  *
  * @param *db    A pointer for debug information.
- * @param *irg   The IR graph the node  belongs to.
  * @param *block The IR block the node belongs to.
  * @param arity  The number of predecessors
  * @param *in[]  Array with predecessors.  The constructor copies this array.
  * @param *mode  The mode of it's inputs and output.
  */
-ir_node *new_rd_Phi    (dbg_info *db, ir_graph *irg, ir_node *block, int arity,
-                       ir_node *in[], ir_mode *mode);
+ir_node *new_rd_Phi(dbg_info *db, ir_node *block, int arity,
+                    ir_node *in[], ir_mode *mode);
 
 /** Constructor for a Load node.
  *
  * @param *db    A pointer for debug information.
- * @param *irg   The IR graph the node  belongs to.
  * @param *block The IR block the node belongs to.
  * @param *store The current memory
  * @param *adr   A pointer to the variable to be read in this memory.
  * @param *mode  The mode of the value to be loaded.
  * @param  flags Additional flags for alignment, volatility and pin state.
  */
-ir_node *new_rd_Load   (dbg_info *db, ir_graph *irg, ir_node *block,
-                       ir_node *store, ir_node *adr, ir_mode *mode, ir_cons_flags flags);
+ir_node *new_rd_Load(dbg_info *db, ir_node *block, ir_node *store,
+                     ir_node *adr, ir_mode *mode, ir_cons_flags flags);
 
 /** Constructor for a Store node.
  *
  * @param *db    A pointer for debug information.
- * @param *irg   The IR graph the node  belongs to.
  * @param *block The IR block the node belongs to.
  * @param *store The current memory
  * @param *adr   A pointer to the variable to be read in this memory.
  * @param *val   The value to write to this variable.
  * @param  flags Additional flags for alignment, volatility and pin state.
  */
-ir_node *new_rd_Store  (dbg_info *db, ir_graph *irg, ir_node *block,
-               ir_node *store, ir_node *adr, ir_node *val, ir_cons_flags flags);
+ir_node *new_rd_Store(dbg_info *db, ir_node *block, ir_node *store,
+                      ir_node *adr, ir_node *val, ir_cons_flags flags);
 
 /** Constructor for a Alloc node.
  *
  * The Alloc node extends the memory by space for an entity of type alloc_type.
  *
  * @param *db         A pointer for debug information.
- * @param *irg        The IR graph the node  belongs to.
  * @param *block      The IR block the node belongs to.
  * @param *store      The memory which shall contain the new variable.
  * @param *size       The number of bytes to allocate.
  * @param *alloc_type The type of the allocated variable.
  * @param where       Where to allocate the variable, either heap_alloc or stack_alloc.
  */
-ir_node *new_rd_Alloc  (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store,
-               ir_node *size, ir_type *alloc_type, ir_where_alloc where);
+ir_node *new_rd_Alloc(dbg_info *db, ir_node *block, ir_node *store,
+                      ir_node *size, ir_type *alloc_type, ir_where_alloc where);
 
 /** Constructor for a Free node.
  *
@@ -1841,7 +1798,6 @@ ir_node *new_rd_Alloc  (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *st
  * arg.  Type indicates the type of the entity the argument points to.
  *
  * @param *db         A pointer for debug information.
- * @param *irg        The IR graph the node  belongs to.
  * @param *block      The IR block the node belongs to.
  * @param *store      The memory which shall contain the new variable.
  * @param *ptr        The pointer to the object to free.
@@ -1849,8 +1805,8 @@ ir_node *new_rd_Alloc  (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *st
  * @param *free_type  The type of the freed variable.
  * @param where       Where the variable was allocated, either heap_alloc or stack_alloc.
  */
-ir_node *new_rd_Free   (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store,
-                       ir_node *ptr, ir_node *size, ir_type *free_type, ir_where_alloc where);
+ir_node *new_rd_Free(dbg_info *db, ir_node *block, ir_node *store,
+                     ir_node *ptr, ir_node *size, ir_type *free_type, ir_where_alloc where);
 
 /** Constructor for a Sync node.
  *
@@ -1859,13 +1815,12 @@ ir_node *new_rd_Free   (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *st
  * value in all memories where it occurs.
  *
  * @param *db       A pointer for debug information.
- * @param *irg      The IR graph the node  belongs to.
  * @param *block    The IR block the node belongs to.
  * @param  arity    The number of memories to synchronize.
  * @param  *in[]    An array of pointers to nodes that produce an output of type
  *                  memory.  The constructor copies this array.
  */
-ir_node *new_rd_Sync   (dbg_info *db, ir_graph *irg, ir_node *block, int arity, ir_node *in[]);
+ir_node *new_rd_Sync(dbg_info *db, ir_node *block, int arity, ir_node *in[]);
 
 /** Constructor for a Proj node.
  *
@@ -1873,27 +1828,25 @@ ir_node *new_rd_Sync   (dbg_info *db, ir_graph *irg, ir_node *block, int arity,
  * position of the value within the tuple.
  *
  * @param *db    A pointer for debug information.
- * @param *irg   The IR graph the node  belongs to.
  * @param *block The IR block the node belongs to.
  * @param arg    A node producing a tuple.  The node must have mode_T.
  * @param *mode  The mode of the value to project.
  * @param proj   The position of the value in the tuple.
  */
-ir_node *new_rd_Proj   (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *arg,
-                       ir_mode *mode, long proj);
+ir_node *new_rd_Proj(dbg_info *db, ir_node *block, ir_node *arg,
+                     ir_mode *mode, long proj);
 
 /** Constructor for a defaultProj node.
  *
  * Represents the default control flow of a Switch-Cond node.
  *
  * @param *db       A pointer for debug information.
- * @param *irg      The IR graph the node  belongs to.
  * @param *block    The IR block the node belongs to.
  * @param arg       A node producing a tuple.
  * @param max_proj  The end position of the value in the tuple.
  */
-ir_node *new_rd_defaultProj (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *arg,
-                            long max_proj);
+ir_node *new_rd_defaultProj(dbg_info *db, ir_node *block,
+                            ir_node *arg, long max_proj);
 
 /** Constructor for a Tuple node.
  *
@@ -1901,14 +1854,13 @@ ir_node *new_rd_defaultProj (dbg_info *db, ir_graph *irg, ir_node *block, ir_nod
  * without changing the corresponding Proj nodes.
  *
  * @param *db     A pointer for debug information.
- * @param *irg    The IR graph the node  belongs to.
  * @param *block  The IR block the node belongs to.
  * @param arity   The number of tuple elements.
  * @param *in[]   An array containing pointers to the nodes producing the tuple
  *                elements. The constructor copies this array.
  */
-ir_node *new_rd_Tuple  (dbg_info *db, ir_graph *irg, ir_node *block,
-                       int arity, ir_node *in[]);
+ir_node *new_rd_Tuple(dbg_info *db, ir_node *block,
+                      int arity, ir_node *in[]);
 
 /** Constructor for a Id node.
  *
@@ -1916,13 +1868,12 @@ ir_node *new_rd_Tuple  (dbg_info *db, ir_graph *irg, ir_node *block,
  * value.
  *
  * @param *db     A pointer for debug information.
- * @param *irg    The IR graph the node  belongs to.
  * @param *block  The IR block the node belongs to.
  * @param *val    The value
  * @param *mode   The mode of *val.
  */
-ir_node *new_rd_Id     (dbg_info *db, ir_graph *irg, ir_node *block,
-                       ir_node *val, ir_mode *mode);
+ir_node *new_rd_Id(dbg_info *db, ir_node *block,
+                   ir_node *val, ir_mode *mode);
 
 /** Constructor for a Confirm node.
  *
@@ -1931,15 +1882,14 @@ ir_node *new_rd_Id     (dbg_info *db, ir_graph *irg, ir_node *block,
  * Example: If the value never exceeds '100' this is expressed by placing a
  * Confirm node val = new_d_Confirm(db, val, 100, '<=') on the dataflow edge.
  *
- * @param *irg    The IR graph the node belong to.
- * @param *block  The IR block the node belong to.
  * @param *db     A pointer for debug information.
+ * @param *block  The IR block the node belong to.
  * @param *val    The value we express a constraint for
  * @param *bound  The value to compare against. Must be a firm node, typically a constant.
  * @param cmp     The compare operation.
  */
-ir_node *new_rd_Confirm (dbg_info *db, ir_graph *irg, ir_node *block,
-             ir_node *val, ir_node *bound, pn_Cmp cmp);
+ir_node *new_rd_Confirm(dbg_info *db, ir_node *block,
+                        ir_node *val, ir_node *bound, pn_Cmp cmp);
 
 /** Constructor for an Unknown node.
  *
@@ -1958,11 +1908,10 @@ ir_node *new_rd_Unknown(dbg_info *db, ir_graph *irg, ir_mode *m);
  * node.
  *
  * @param *db     A pointer for debug information.
- * @param *irg    The IR graph the node belong to.
  * @param *block  The block the node belong to.
  * @param *callee The call node visible in the intra procedural view.
  */
-ir_node *new_rd_CallBegin(dbg_info *db, ir_graph *irg, ir_node *block, ir_node *ptr, ir_node *call);
+ir_node *new_rd_CallBegin(dbg_info *db, ir_node *block, ir_node *ptr, ir_node *call);
 
 /** Constructor for a EndReg node.
  *
@@ -1972,7 +1921,7 @@ ir_node *new_rd_CallBegin(dbg_info *db, ir_graph *irg, ir_node *block, ir_node *
  * @param *irg    The IR graph the node belong to.
  * @param *block  The block the node belong to.
  */
-ir_node *new_rd_EndReg (dbg_info *db, ir_graph *irg, ir_node *block);
+ir_node *new_rd_EndReg(dbg_info *db, ir_graph *irg, ir_node *block);
 
 /** Constructor for a EndExcept node.
  *
@@ -1996,97 +1945,88 @@ ir_node *new_rd_EndExcept(dbg_info *db, ir_graph *irg, ir_node *block);
  * The constructor builds the Filter in intraprocedural view.
  *
  * @param *db     A pointer for debug information.
- * @param *irg    The IR graph the node belong to.
  * @param *block  The block the node belong to.
  * @param *arg  The tuple value to project from.
  * @param *mode The mode of the projected value.
  * @param proj  The position in the tuple to project from.
  */
-ir_node *new_rd_Filter (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *arg,
-                       ir_mode *mode, long proj);
+ir_node *new_rd_Filter(dbg_info *db,ir_node *block, ir_node *arg,
+                       ir_mode *mode, long proj);
 
 /** Constructor for a Mux node.
  *
  * @param *db       A pointer for debug information.
- * @param *irg      The IR graph the node belong to.
  * @param *block    The block the node belong to.
  * @param *sel      The ir_node that calculates the boolean select.
  * @param *ir_true  The ir_node that calculates the true result.
  * @param *ir_false The ir_node that calculates the false result.
  * @param *mode     The mode of the node (and it_true and ir_false).
  */
-ir_node *new_rd_Mux  (dbg_info *db, ir_graph *irg, ir_node *block,
-    ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode);
+ir_node *new_rd_Mux(dbg_info *db, ir_node *block, ir_node *sel,
+                    ir_node *ir_false, ir_node *ir_true, ir_mode *mode);
 
 /** Constructor for a CopyB node.
  *
  * @param *db         A pointer for debug information.
- * @param *irg        The IR graph the node belong to.
  * @param *block      The block the node belong to.
  * @param *store      The current memory
  * @param *dst        The ir_node that represents the destination address.
  * @param *src        The ir_node that represents the source address.
  * @param *data_type  The type of the copied data
  */
-ir_node *new_rd_CopyB(dbg_info *db, ir_graph *irg, ir_node *block,
-    ir_node *store, ir_node *dst, ir_node *src, ir_type *data_type);
+ir_node *new_rd_CopyB(dbg_info *db, ir_node *block, ir_node *store,
+                      ir_node *dst, ir_node *src, ir_type *data_type);
 
 /** Constructor for a InstOf node.
  *
  * A High-Level Type check.
  *
  * @param   *db        A pointer for debug information.
- * @param   *irg       The IR graph the node  belongs to.
  * @param   *block     The IR block the node belongs to.
  * @param   *store     The memory in which the object the entity should be selected
  *                     from is allocated.
  * @param   *objptr    A pointer to a object of a class type.
  * @param   *type      The type of which objptr must be.
  */
-ir_node *new_rd_InstOf (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store,
-                       ir_node *objptr, ir_type *type);
+ir_node *new_rd_InstOf(dbg_info *db, ir_node *block, ir_node *store,
+                       ir_node *objptr, ir_type *type);
 
 /** Constructor for a Raise node.
  *
  * A High-Level Exception throw.
  *
  * @param *db    A pointer for debug information.
- * @param *irg   The IR graph the node  belongs to.
  * @param *block The IR block the node belongs to.
  * @param *store The current memory.
  * @param *obj   A pointer to the Except variable.
  */
-ir_node *new_rd_Raise  (dbg_info *db, ir_graph *irg, ir_node *block,
-                       ir_node *store, ir_node *obj);
+ir_node *new_rd_Raise(dbg_info *db, ir_node *block, ir_node *store, ir_node *obj);
 
 /** Constructor for a Bound node.
  *
  * A High-Level bounds check. Checks whether lower <= idx && idx < upper.
  *
  * @param *db         A pointer for debug information.
- * @param *irg        The IR graph the node belong to.
  * @param *block      The block the node belong to.
  * @param *store      The current memory.
  * @param *idx        The ir_node that represents an index.
  * @param *lower      The ir_node that represents the lower bound for the index.
  * @param *upper      The ir_node that represents the upper bound for the index.
  */
-ir_node *new_rd_Bound(dbg_info *db, ir_graph *irg, ir_node *block,
-    ir_node *store, ir_node *idx, ir_node *lower, ir_node *upper);
+ir_node *new_rd_Bound(dbg_info *db, ir_node *block,
+                      ir_node *store, ir_node *idx, ir_node *lower, ir_node *upper);
 
 /** Constructor for a Pin node.
  *
  * @param *db         A pointer for debug information.
- * @param *irg        The IR graph the node belong to.
  * @param *block      The block the node belong to.
  * @param *node       The node which value should be pinned.
  */
-ir_node *new_rd_Pin(dbg_info *db, ir_graph *irg, ir_node *block, ir_node *node);
+ir_node *new_rd_Pin(dbg_info *db, ir_node *block, ir_node *node);
 
 /** Constructor for an ASM pseudo node.
  *
  * @param *db         A pointer for debug information.
- * @param *irg        The IR graph the node belong to.
  * @param *block      The block the node belong to.
  * @param arity       The number of data inputs to the node.
  * @param *in         The array of length arity of data inputs.
@@ -2097,7 +2037,7 @@ ir_node *new_rd_Pin(dbg_info *db, ir_graph *irg, ir_node *block, ir_node *node);
  * @param *clobber    The array of length n_clobber of clobbered registers.
  * @param *asm_text   The assembler text.
  */
-ir_node *new_rd_ASM(dbg_info *db, ir_graph *irg, ir_node *block,
+ir_node *new_rd_ASM(dbg_info *db, ir_node *block,
                     int arity, ir_node *in[], ir_asm_constraint *inputs,
                     int n_outs, ir_asm_constraint *outputs,
                     int n_clobber, ident *clobber[], ident *asm_text);
@@ -2120,41 +2060,39 @@ ir_node *new_rd_ASM(dbg_info *db, ir_graph *irg, ir_node *block,
  * @param in[]   An array of control predecessors.  The length of
  *               the array must be 'arity'. The constructor copies this array.
  */
-ir_node *new_r_Block  (ir_graph *irg,  int arity, ir_node *in[]);
+ir_node *new_r_Block(ir_graph *irg, int arity, ir_node *in[]);
 
 /** Constructor for a Start node.
  *
  * @param *irg   The IR graph the node belongs to.
  * @param *block The IR block the node belongs to.
  */
-ir_node *new_r_Start  (ir_graph *irg, ir_node *block);
+ir_node *new_r_Start(ir_graph *irg, ir_node *block);
 
 /** Constructor for a End node.
  *
  * @param *irg   The IR graph the node  belongs to.
  * @param *block The IR block the node belongs to.
  */
-ir_node *new_r_End    (ir_graph *irg, ir_node *block);
+ir_node *new_r_End(ir_graph *irg, ir_node *block);
 
 /** Constructor for a Jmp node.
  *
  * Jmp represents control flow to a single control successor.
  *
- * @param *irg    The IR graph the node belongs to.
  * @param *block  The IR block the node belongs to.
  */
-ir_node *new_r_Jmp    (ir_graph *irg, ir_node *block);
+ir_node *new_r_Jmp(ir_node *block);
 
 /** Constructor for an IJmp node.
  *
  * IJmp represents control flow to a single control successor not
  * statically known i.e. an indirect Jmp.
  *
- * @param *irg    The IR graph the node belongs to.
  * @param *block  The IR block the node belongs to.
  * @param *tgt    The IR node representing the target address.
  */
-ir_node *new_r_IJmp   (ir_graph *irg, ir_node *block, ir_node *tgt);
+ir_node *new_r_IJmp(ir_node *block, ir_node *tgt);
 
 /** Constructor for a Cond node.
  *
@@ -2165,25 +2103,22 @@ ir_node *new_r_IJmp   (ir_graph *irg, ir_node *block, ir_node *tgt);
  * This is not consistent:  Input to Cond is Is, Proj has as proj number
  * longs.
  *
- * @param *irg   The IR graph the node  belongs to.
  * @param *block The IR block the node belongs to.
  * @param *c     The conditions parameter.Can be of mode b or I_u.
  */
-ir_node *new_r_Cond   (ir_graph *irg, ir_node *block, ir_node *c);
+ir_node *new_r_Cond(ir_node *block, ir_node *c);
 
 /** Constructor for a Return node.
  *
  * Returns the memory and zero or more return values.  Only node that
  * can end regular control flow.
  *
- * @param *irg   The IR graph the node  belongs to.
  * @param *block The IR block the node belongs to.
  * @param *store The state of memory.
  * @param arity  Number of array indices.
  * @param *in[]   Array with index inputs to the node. The constructor copies this array.
  */
-ir_node *new_r_Return (ir_graph *irg, ir_node *block,
-                      ir_node *store, int arity, ir_node *in[]);
+ir_node *new_r_Return(ir_node *block, ir_node *store, int arity, ir_node *in[]);
 
 /** Constructor for a Const node.
  *
@@ -2198,7 +2133,7 @@ ir_node *new_r_Return (ir_graph *irg, ir_node *block,
  * @param *block The IR block the node belongs to.
  * @param *con   Points to an entry in the constant table.
  */
-ir_node *new_r_Const  (ir_graph *irg, tarval *con);
+ir_node *new_r_Const(ir_graph *irg, tarval *con);
 
 /** Constructor for a Const node.
  *
@@ -2212,8 +2147,7 @@ ir_node *new_r_Const  (ir_graph *irg, tarval *con);
  * @param *mode  The mode of the operands and the results.
  * @param value  A value from which the tarval is made.
  */
-ir_node *new_r_Const_long(ir_graph *irg,
-                      ir_mode *mode, long value);
+ir_node *new_r_Const_long(ir_graph *irg, ir_mode *mode, long value);
 
 /** Constructor for a Const_type node.
  *
@@ -2251,12 +2185,11 @@ ir_node *new_r_Const_type(ir_graph *irg, tarval *con, ir_type *tp);
  *      An unsigned integer (I_u) or a pointer (P).
  *
  * @param *irg    The IR graph the node  belongs to.
- * @param *block  The IR block the node belongs to.
  * @param mode    The mode for the SymConst.
  * @param value   A type, entity or a ident depending on the SymConst kind.
  * @param symkind The kind of the symbolic constant: type_tag, size or link_info.
  */
-ir_node *new_r_SymConst(ir_graph *irg, ir_node *block, ir_mode *mode,
+ir_node *new_r_SymConst(ir_graph *irg, ir_mode *mode,
                         union symconst_symbol value, symconst_kind symkind);
 
 /** Constructor for a simpleSel node.
@@ -2265,15 +2198,14 @@ ir_node *new_r_SymConst(ir_graph *irg, ir_node *block, ir_mode *mode,
  *  Sel nodes that do not select from an array, i.e., have no index
  *  inputs.  It adds the two parameters 0, NULL.
  *
- * @param   *irg       The IR graph the node  belongs to.
- * @param   *block     The IR block the node belongs to.
- * @param   *store     The memory in which the object the entity should be selected
- *                     from is allocated.
- * @param   *objptr    The object from that the Sel operation selects a
- *                     single attribute out.
- * @param   *ent       The entity to select.
+ * @param *block     The IR block the node belongs to.
+ * @param *store     The memory in which the object the entity should be selected
+ *                   from is allocated.
+ * @param *objptr    The object from that the Sel operation selects a
+ *                   single attribute out.
+ * @param *ent       The entity to select.
  */
-ir_node *new_r_simpleSel(ir_graph *irg, ir_node *block, ir_node *store,
+ir_node *new_r_simpleSel(ir_node *block, ir_node *store,
                          ir_node *objptr, ir_entity *ent);
 
 /** Constructor for a Sel node.
@@ -2284,389 +2216,338 @@ ir_node *new_r_simpleSel(ir_graph *irg, ir_node *block, ir_node *store,
  * entity.  If the selected entity is an array element entity the Sel
  * node takes the required array indices as inputs.
  *
- * @param   *irg       The IR graph the node  belongs to.
- * @param   *block     The IR block the node belongs to.
- * @param   *store     The memory in which the object the entity should be selected
- *                     from is allocated.
- * @param   *objptr    A pointer to a compound entity the Sel operation selects a
- *                     single attribute from.
- * @param   *n_index   The number of array indices needed to select an array element entity.
- * @param   *index[]   If the compound entity is an array the indices of the selected
- *                     element entity.  The constructor copies this array.
- * @param   *ent       The entity to select.
+ * @param *block     The IR block the node belongs to.
+ * @param *store     The memory in which the object the entity should be selected
+ *                   from is allocated.
+ * @param *objptr    A pointer to a compound entity the Sel operation selects a
+ *                   single attribute from.
+ * @param *n_index   The number of array indices needed to select an array element entity.
+ * @param *index[]   If the compound entity is an array the indices of the selected
+ *                   element entity.  The constructor copies this array.
+ * @param *ent       The entity to select.
  */
-ir_node *new_r_Sel    (ir_graph *irg, ir_node *block, ir_node *store,
-                       ir_node *objptr, int n_index, ir_node *index[],
-               ir_entity *ent);
+ir_node *new_r_Sel(ir_node *block, ir_node *store,
+                   ir_node *objptr, int n_index, ir_node *index[],
+                   ir_entity *ent);
 
 /** Constructor for a Call node.
  *
  * Represents all kinds of method and function calls.
  *
- * @param   *irg    The IR graph the node  belongs to.
- * @param   *block  The IR block the node belongs to.
- * @param   *store  The actual store.
- * @param   *callee A pointer to the called procedure.
- * @param   arity   The number of procedure parameters.
- * @param   *in[]   An array with the pointers to the parameters. The constructor copies this array.
- * @param   *tp     Type information of the procedure called.
+ * @param *block  The IR block the node belongs to.
+ * @param *store  The actual store.
+ * @param *callee A pointer to the called procedure.
+ * @param arity   The number of procedure parameters.
+ * @param *in[]   An array with the pointers to the parameters. The constructor copies this array.
+ * @param *tp     Type information of the procedure called.
  */
-ir_node *new_r_Call   (ir_graph *irg, ir_node *block, ir_node *store,
-                       ir_node *callee, int arity, ir_node *in[], ir_type *tp);
+ir_node *new_r_Call(ir_node *block, ir_node *store,
+                    ir_node *callee, int arity, ir_node *in[], ir_type *tp);
 
 /** Constructor for a Builtin node.
  *
  * Represents a call of a backend-specific builtin..
  *
- * @param   *irg    The IR graph the node  belongs to.
- * @param   *block  The IR block the node belongs to.
- * @param   *store  The actual store.
- * @param   arity   The number of procedure parameters.
- * @param   *in[]   An array with the pointers to the parameters. The constructor copies this array.
- * @param   kind    The kind of the called builtin.
- * @param   *tp     Type information of the procedure called.
+ * @param *block  The IR block the node belongs to.
+ * @param *store  The actual store.
+ * @param arity   The number of procedure parameters.
+ * @param *in[]   An array with the pointers to the parameters. The constructor copies this array.
+ * @param kind    The kind of the called builtin.
+ * @param *tp     Type information of the procedure called.
  */
-ir_node *new_r_Builtin(ir_graph *irg, ir_node *block, ir_node *store,
+ir_node *new_r_Builtin(ir_node *block, ir_node *store,
                        int arity, ir_node *in[], ir_builtin_kind kind, ir_type *tp);
 
 /** Constructor for a Add node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *op1   The first operand.
- * @param   *op2   The second operand.
- * @param   *mode  The mode of the operands and the result.
+ * @param *block The IR block the node belongs to.
+ * @param *op1   The first operand.
+ * @param *op2   The second operand.
+ * @param *mode  The mode of the operands and the result.
  */
-ir_node *new_r_Add    (ir_graph *irg, ir_node *block,
-               ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_r_Add(ir_node *block, ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /**
  * Constructor for a Sub node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *op1   The first operand.
- * @param   *op2   The second operand.
- * @param   *mode  The mode of the operands and the results.
+ * @param *block The IR block the node belongs to.
+ * @param *op1   The first operand.
+ * @param *op2   The second operand.
+ * @param *mode  The mode of the operands and the results.
  */
-ir_node *new_r_Sub    (ir_graph *irg, ir_node *block,
-               ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_r_Sub(ir_node *block, ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Minus node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *op   The operand.
- * @param   *mode  The mode of the operand and the result.
+ * @param *irg   The IR graph the node  belongs to.
+ * @param *block The IR block the node belongs to.
+ * @param *op    The operand.
+ * @param *mode  The mode of the operand and the result.
  */
-ir_node *new_r_Minus  (ir_graph *irg, ir_node *block,
-               ir_node *op,  ir_mode *mode);
+ir_node *new_r_Minus(ir_node *block, ir_node *op, ir_mode *mode);
 
 /** Constructor for a Mul node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *op1   The first operand.
- * @param   *op2   The second operand.
- * @param   *mode  The mode of the operands and the result.
+ * @param *irg   The IR graph the node  belongs to.
+ * @param *block The IR block the node belongs to.
+ * @param *op1   The first operand.
+ * @param *op2   The second operand.
+ * @param *mode  The mode of the operands and the result.
  */
-ir_node *new_r_Mul    (ir_graph *irg, ir_node *block,
-               ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_r_Mul(ir_node *block, ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Mulh node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *op1   The first operand.
- * @param   *op2   The second operand.
- * @param   *mode  The mode of the operands and the result.
+ * @param *irg   The IR graph the node  belongs to.
+ * @param *block The IR block the node belongs to.
+ * @param *op1   The first operand.
+ * @param *op2   The second operand.
+ * @param *mode  The mode of the operands and the result.
  */
-ir_node *new_r_Mulh   (ir_graph *irg, ir_node *block,
-               ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_r_Mulh(ir_node *block, ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Quot node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *memop The store needed to model exceptions
- * @param   *op1   The first operand.
- * @param   *op2   The second operand.
- * @param   *mode  The mode of the result.
- * @param   state  The pinned state.
+ * @param *block The IR block the node belongs to.
+ * @param *memop The store needed to model exceptions
+ * @param *op1   The first operand.
+ * @param *op2   The second operand.
+ * @param *mode  The mode of the result.
+ * @param state  The pinned state.
  */
-ir_node *new_r_Quot   (ir_graph *irg, ir_node *block,
-               ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_r_Quot(ir_node *block, ir_node *memop, ir_node *op1, ir_node *op2,
+                    ir_mode *mode, op_pin_state state);
 
 /** Constructor for a DivMod node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *memop The store needed to model exceptions
- * @param   *op1   The first operand.
- * @param   *op2   The second operand.
- * @param   *mode  The mode of the results.
- * @param   state  The pinned state.
+ * @param *block The IR block the node belongs to.
+ * @param *memop The store needed to model exceptions
+ * @param *op1   The first operand.
+ * @param *op2   The second operand.
+ * @param *mode  The mode of the results.
+ * @param state  The pinned state.
  */
-ir_node *new_r_DivMod (ir_graph *irg, ir_node *block,
-               ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_r_DivMod(ir_node *block, ir_node *memop, ir_node *op1, ir_node *op2,
+                      ir_mode *mode, op_pin_state state);
 
 /** Constructor for a Div node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *memop The store needed to model exceptions
- * @param   *op1   The first operand.
- * @param   *op2   The second operand.
- * @param   *mode  The mode of the result.
- * @param   state  The pinned state.
+ * @param *block The IR block the node belongs to.
+ * @param *memop The store needed to model exceptions
+ * @param *op1   The first operand.
+ * @param *op2   The second operand.
+ * @param *mode  The mode of the result.
+ * @param state  The pinned state.
  */
-ir_node *new_r_Div    (ir_graph *irg, ir_node *block,
-               ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_r_Div(ir_node *block, ir_node *memop, ir_node *op1, ir_node *op2,
+                   ir_mode *mode, op_pin_state state);
 
 /** Constructor for a remainderless Div node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *memop The store needed to model exceptions
- * @param   *op1   The first operand.
- * @param   *op2   The second operand.
- * @param   *mode  The mode of the result.
- * @param   state  The pinned state.
+ * @param *block The IR block the node belongs to.
+ * @param *memop The store needed to model exceptions
+ * @param *op1   The first operand.
+ * @param *op2   The second operand.
+ * @param *mode  The mode of the result.
+ * @param state  The pinned state.
  */
-ir_node *new_r_DivRL  (ir_graph *irg, ir_node *block,
-               ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_r_DivRL(ir_node *block, ir_node *memop, ir_node *op1, ir_node *op2,
+                     ir_mode *mode, op_pin_state state);
 
 /** Constructor for a Mod node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *memop The store needed to model exceptions
- * @param   *op1   The first operand.
- * @param   *op2   The second operand.
- * @param   *mode  The mode of the result.
- * @param   state  The pinned state.
+ * @param *block The IR block the node belongs to.
+ * @param *memop The store needed to model exceptions
+ * @param *op1   The first operand.
+ * @param *op2   The second operand.
+ * @param *mode  The mode of the result.
+ * @param state  The pinned state.
  */
-ir_node *new_r_Mod    (ir_graph *irg, ir_node *block,
-               ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_r_Mod(ir_node *block, ir_node *memop, ir_node *op1, ir_node *op2,
+                   ir_mode *mode, op_pin_state state);
 
 /** Constructor for a Abs node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *op    The operand
- * @param   *mode  The mode of the operands and the result.
+ * @param *block The IR block the node belongs to.
+ * @param *op    The operand
+ * @param *mode  The mode of the operands and the result.
  */
-ir_node *new_r_Abs    (ir_graph *irg, ir_node *block,
-                       ir_node *op, ir_mode *mode);
+ir_node *new_r_Abs(ir_node *block, ir_node *op, ir_mode *mode);
 
 /** Constructor for a And node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *op1   The first operand.
- * @param   *op2   The second operand.
- * @param   *mode  The mode of the operands and the result.
+ * @param *block The IR block the node belongs to.
+ * @param *op1   The first operand.
+ * @param *op2   The second operand.
+ * @param *mode  The mode of the operands and the result.
  */
-ir_node *new_r_And    (ir_graph *irg, ir_node *block,
-               ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_r_And(ir_node *block, ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Or node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *op1   The first operand.
- * @param   *op2   The second operand.
- * @param   *mode  The mode of the operands and the result.
+ * @param *block The IR block the node belongs to.
+ * @param *op1   The first operand.
+ * @param *op2   The second operand.
+ * @param *mode  The mode of the operands and the result.
  */
-ir_node *new_r_Or     (ir_graph *irg, ir_node *block,
-               ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_r_Or(ir_node *block, ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Eor node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *op1   The first operand.
- * @param   *op2   The second operand.
- * @param   *mode  The mode of the operands and the results.
+ * @param *block The IR block the node belongs to.
+ * @param *op1   The first operand.
+ * @param *op2   The second operand.
+ * @param *mode  The mode of the operands and the results.
  */
-ir_node *new_r_Eor    (ir_graph *irg, ir_node *block,
-               ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_r_Eor(ir_node *block, ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Not node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *op    The operand.
- * @param   *mode  The mode of the operand and the result.
+ * @param *block The IR block the node belongs to.
+ * @param *op    The operand.
+ * @param *mode  The mode of the operand and the result.
  */
-ir_node *new_r_Not    (ir_graph *irg, ir_node *block,
-               ir_node *op, ir_mode *mode);
+ir_node *new_r_Not(ir_node *block, ir_node *op, ir_mode *mode);
 
 /** Constructor for a Cmp node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *op1   The first operand.
- * @param   *op2   The second operand.
+ * @param *block The IR block the node belongs to.
+ * @param *op1   The first operand.
+ * @param *op2   The second operand.
  */
-ir_node *new_r_Cmp    (ir_graph *irg, ir_node *block,
-               ir_node *op1, ir_node *op2);
+ir_node *new_r_Cmp(ir_node *block, ir_node *op1, ir_node *op2);
 
 /** Constructor for a Shl node.
  *
- * @param   *irg   The IR graph the node  belongs to.
  * @param   *block The IR block the node belongs to.
  * @param   *op    The operand.
  * @param   *k     The number of bits to  shift the operand .
  * @param   *mode  The mode of the operand and the result.
  */
-ir_node *new_r_Shl    (ir_graph *irg, ir_node *block,
-               ir_node *op, ir_node *k, ir_mode *mode);
+ir_node *new_r_Shl(ir_node *block, ir_node *op, ir_node *k, ir_mode *mode);
 
 /** Constructor for a Shr node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *op    The operand.
- * @param   *k     The number of bits to shift the operand .
- * @param   *mode  The mode of the operand and the result.
+ * @param *block The IR block the node belongs to.
+ * @param *op    The operand.
+ * @param *k     The number of bits to shift the operand .
+ * @param *mode  The mode of the operand and the result.
  */
-ir_node *new_r_Shr    (ir_graph *irg, ir_node *block,
-               ir_node *op, ir_node *k, ir_mode *mode);
+ir_node *new_r_Shr(ir_node *block, ir_node *op, ir_node *k, ir_mode *mode);
 
 /**
  * Constructor for a Shrs node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *op    The operand.
- * @param   *k     The number of bits to shift the operand.
- * @param   *mode  The mode of the operand and the result.
+ * @param  *block The IR block the node belongs to.
+ * @param  *op    The operand.
+ * @param  *k     The number of bits to shift the operand.
+ * @param  *mode  The mode of the operand and the result.
  */
-ir_node *new_r_Shrs   (ir_graph *irg, ir_node *block,
-               ir_node *op, ir_node *k, ir_mode *mode);
+ir_node *new_r_Shrs(ir_node *block, ir_node *op, ir_node *k, ir_mode *mode);
 
 /** Constructor for a Rotl node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *op    The operand.
- * @param   *k     The number of bits to rotate the operand.
- * @param   *mode  The mode of the operand.
+ * @param *block The IR block the node belongs to.
+ * @param *op    The operand.
+ * @param *k     The number of bits to rotate the operand.
+ * @param *mode  The mode of the operand.
  */
-ir_node *new_r_Rotl   (ir_graph *irg, ir_node *block,
-               ir_node *op, ir_node *k, ir_mode *mode);
+ir_node *new_r_Rotl(ir_node *block, ir_node *op, ir_node *k, ir_mode *mode);
 
 /** Constructor for a Conv node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *op    The operand.
- * @param   *mode  The mode of this the operand muss be converted .
+ * @param *block The IR block the node belongs to.
+ * @param *op    The operand.
+ * @param *mode  The mode of this the operand muss be converted .
  */
-ir_node *new_r_Conv   (ir_graph *irg, ir_node *block,
-               ir_node *op, ir_mode *mode);
+ir_node *new_r_Conv(ir_node *block, ir_node *op, ir_mode *mode);
 
 /** Constructor for a strict Conv node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *op    The operand.
- * @param   *mode  The mode of this the operand muss be converted .
+ * @param *block The IR block the node belongs to.
+ * @param *op    The operand.
+ * @param *mode  The mode of this the operand muss be converted .
  */
-ir_node *new_r_strictConv   (ir_graph *irg, ir_node *block,
-               ir_node *op, ir_mode *mode);
+ir_node *new_r_strictConv(ir_node *block, ir_node *op, ir_mode *mode);
 
 /** Constructor for a Cast node.
  *
  * High level type cast
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *op    The operand.
- * @param   *to_tp The type of this the operand muss be casted .
+ * @param *block The IR block the node belongs to.
+ * @param *op    The operand.
+ * @param *to_tp The type of this the operand muss be casted .
  */
-ir_node *new_r_Cast   (ir_graph *irg, ir_node *block,
-               ir_node *op, ir_type *to_tp);
+ir_node *new_r_Cast(ir_node *block, ir_node *op, ir_type *to_tp);
 
 /** Constructor for a Carry node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *op1   The first operand.
- * @param   *op2   The second operand.
- * @param   *mode  The mode of the operands and the result.
+ * @param *block The IR block the node belongs to.
+ * @param *op1   The first operand.
+ * @param *op2   The second operand.
+ * @param *mode  The mode of the operands and the result.
  */
-ir_node *new_r_Carry  (ir_graph *irg, ir_node *block,
-               ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_r_Carry(ir_node *block, ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /**
  * Constructor for a Borrow node.
  *
- * @param   *irg   The IR graph the node  belongs to.
- * @param   *block The IR block the node belongs to.
- * @param   *op1   The first operand.
- * @param   *op2   The second operand.
- * @param   *mode  The mode of the operands and the results.
+ * @param *block The IR block the node belongs to.
+ * @param *op1   The first operand.
+ * @param *op2   The second operand.
+ * @param *mode  The mode of the operands and the results.
  */
-ir_node *new_r_Borrow (ir_graph *irg, ir_node *block,
-               ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_r_Borrow(ir_node *block, ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Phi node.
  *
- * @param *irg   The IR graph the node  belongs to.
  * @param *block The IR block the node belongs to.
  * @param arity  The number of predecessors
- * @param *in[]    Array with predecessors. The constructor copies this array.
+ * @param *in[]  Array with predecessors. The constructor copies this array.
  * @param *mode  The mode of it's inputs and output.
  */
-ir_node *new_r_Phi    (ir_graph *irg, ir_node *block, int arity,
-                      ir_node *in[], ir_mode *mode);
+ir_node *new_r_Phi(ir_node *block, int arity, ir_node *in[], ir_mode *mode);
 
 /** Constructor for a Load node.
  *
- * @param *irg   The IR graph the node  belongs to.
  * @param *block The IR block the node belongs to.
  * @param *store The current memory
  * @param *adr   A pointer to the variable to be read in this memory.
  * @param *mode  The mode of the value to be loaded.
  * @param  flags Additional flags for alignment, volatility and pin state.
  */
-ir_node *new_r_Load   (ir_graph *irg, ir_node *block,
-               ir_node *store, ir_node *adr, ir_mode *mode, ir_cons_flags flags);
+ir_node *new_r_Load(ir_node *block, ir_node *store,
+                    ir_node *adr, ir_mode *mode, ir_cons_flags flags);
 
 /** Constructor for a Store node.
  *
- * @param *irg   The IR graph the node  belongs to.
  * @param *block The IR block the node belongs to.
  * @param *store The current memory
  * @param *adr   A pointer to the variable to be read in this memory.
  * @param *val   The value to write to this variable.
  * @param  flags Additional flags for alignment, volatility and pin state.
  */
-ir_node *new_r_Store  (ir_graph *irg, ir_node *block,
-                      ir_node *store, ir_node *adr, ir_node *val, ir_cons_flags flags);
+ir_node *new_r_Store(ir_node *block, ir_node *store,
+                     ir_node *adr, ir_node *val, ir_cons_flags flags);
 
 /** Constructor for a Alloc node.
  *
  * The Alloc node extends the memory by space for an entity of type alloc_type.
  *
- * @param *irg        The IR graph the node  belongs to.
  * @param *block      The IR block the node belongs to.
  * @param *store      The memory which shall contain the new variable.
  * @param *size       The number of bytes to allocate.
  * @param *alloc_type The type of the allocated variable.
  * @param where       Where to allocate the variable, either heap_alloc or stack_alloc.
  */
-ir_node *new_r_Alloc  (ir_graph *irg, ir_node *block, ir_node *store,
-               ir_node *size, ir_type *alloc_type, ir_where_alloc where);
+ir_node *new_r_Alloc(ir_node *block, ir_node *store,
+                     ir_node *size, ir_type *alloc_type, ir_where_alloc where);
 
 /** Constructor for a Free node.
  *
  * Frees the memory occupied by the entity pointed to by the pointer
  * arg.  Type indicates the type of the entity the argument points to.
  *
- * @param *irg        The IR graph the node  belongs to.
  * @param *block      The IR block the node belongs to.
  * @param *store      The memory which shall contain the new variable.
  * @param *ptr        The pointer to the object to free.
@@ -2674,8 +2555,8 @@ ir_node *new_r_Alloc  (ir_graph *irg, ir_node *block, ir_node *store,
  * @param *free_type  The type of the freed variable.
  * @param where       Where the variable was allocated, either heap_alloc or stack_alloc.
  */
-ir_node *new_r_Free   (ir_graph *irg, ir_node *block, ir_node *store,
-               ir_node *ptr, ir_node *size, ir_type *free_type, ir_where_alloc where);
+ir_node *new_r_Free(ir_node *block, ir_node *store,
+                    ir_node *ptr, ir_node *size, ir_type *free_type, ir_where_alloc where);
 
 /** Constructor for a Sync node.
  *
@@ -2683,38 +2564,35 @@ ir_node *new_r_Free   (ir_graph *irg, ir_node *block, ir_node *store,
  * either occurs only in one of the memories, or it contains the same
  * value in all memories where it occurs.
  *
- * @param *irg      The IR graph the node  belongs to.
- * @param *block    The IR block the node belongs to.
- * @param  arity    The number of memories to synchronize.
- * @param  *in[]    An array of pointers to nodes that produce an output of  type memory.
- *                  The constructor copies this array.
+ * @param *block   The IR block the node belongs to.
+ * @param arity    The number of memories to synchronize.
+ * @param *in[]    An array of pointers to nodes that produce an output of  type memory.
+ *                 The constructor copies this array.
  */
-ir_node *new_r_Sync (ir_graph *irg, ir_node *block, int arity, ir_node *in[]);
+ir_node *new_r_Sync(ir_node *block, int arity, ir_node *in[]);
 
 /** Constructor for a Proj node.
  *
  * Projects a single value out of a tuple.  The parameter proj gives the
  * position of the value within the tuple.
  *
- * @param *irg   The IR graph the node  belongs to.
  * @param *block The IR block the node belongs to.
  * @param arg    A node producing a tuple.
  * @param *mode  The mode of the value to project.
  * @param proj   The position of the value in the tuple.
  */
-ir_node *new_r_Proj   (ir_graph *irg, ir_node *block, ir_node *arg,
-                      ir_mode *mode, long proj);
+ir_node *new_r_Proj(ir_node *block, ir_node *arg,
+                    ir_mode *mode, long proj);
 
 /** Constructor for a defaultProj node.
  *
  * Represents the default control flow of a Switch-Cond node.
  *
- * @param *irg      The IR graph the node  belongs to.
  * @param *block    The IR block the node belongs to.
  * @param arg       A node producing a tuple.
  * @param max_proj  The end  position of the value in the tuple.
  */
-ir_node *new_r_defaultProj (ir_graph *irg, ir_node *block, ir_node *arg, long max_proj);
+ir_node *new_r_defaultProj(ir_node *block, ir_node *arg, long max_proj);
 
 
 /** Constructor for a Tuple node.
@@ -2722,26 +2600,23 @@ ir_node *new_r_defaultProj (ir_graph *irg, ir_node *block, ir_node *arg, long ma
  * This is an auxiliary node to replace a node that returns a tuple
  * without changing the corresponding Proj nodes.
  *
- * @param *irg    The IR graph the node  belongs to.
  * @param *block  The IR block the node belongs to.
  * @param arity   The number of tuple elements.
  * @param *in[]   An array containing pointers to the nodes producing the tuple elements.
  *                The constructor copies this array.
  */
-ir_node *new_r_Tuple  (ir_graph *irg, ir_node *block, int arity, ir_node *in[]);
+ir_node *new_r_Tuple(ir_node *block, int arity, ir_node *in[]);
 
 /** Constructor for a Id node.
  *
  * This is an auxiliary node to replace a node that returns a single
  * value.
  *
- * @param *irg    The IR graph the node  belongs to.
  * @param *block  The IR block the node belongs to.
  * @param *val    The operand to Id.
  * @param *mode   The mode of *val.
  */
-ir_node *new_r_Id     (ir_graph *irg, ir_node *block,
-               ir_node *val, ir_mode *mode);
+ir_node *new_r_Id(ir_node *block, ir_node *val, ir_mode *mode);
 
 /** Constructor for a Bad node.
  *
@@ -2749,9 +2624,8 @@ ir_node *new_r_Id     (ir_graph *irg, ir_node *block,
  * get_irg_bad().
  *
  * @param *irg    The IR graph the node  belongs to.
- *
  */
-ir_node *new_r_Bad    (ir_graph *irg);
+ir_node *new_r_Bad(ir_graph *irg);
 
 /** Constructor for a Confirm node.
  *
@@ -2760,14 +2634,12 @@ ir_node *new_r_Bad    (ir_graph *irg);
  * Example: If the value never exceeds '100' this is expressed by placing a
  * Confirm node val = new_d_Confirm(db, val, 100, '<=') on the dataflow edge.
  *
- * @param *irg    The IR graph the node belong to.
  * @param *block  The IR block the node belong to.
  * @param *val    The value we express a constraint for
  * @param *bound  The value to compare against. Must be a firm node, typically a constant.
  * @param cmp     The compare operation.
  */
-ir_node *new_r_Confirm(ir_graph *irg, ir_node *block,
-            ir_node *val, ir_node *bound, pn_Cmp cmp);
+ir_node *new_r_Confirm(ir_node *block, ir_node *val, ir_node *bound, pn_Cmp cmp);
 
 /** Constructor for a Unknown node.
  *
@@ -2786,11 +2658,10 @@ ir_node *new_r_Unknown(ir_graph *irg, ir_mode *m);
  * constructor copies the method pointer input from the passed Call
  * node.
  *
- * @param *irg    The IR graph the node belong to.
  * @param *block  The block the node belong to.
  * @param *callee The call node visible in the  intra procedural view.
  */
-ir_node *new_r_CallBegin(ir_graph *irg, ir_node *block, ir_node *ptr, ir_node *call);
+ir_node *new_r_CallBegin(ir_node *block, ir_node *ptr, ir_node *call);
 
 /** Constructor for a EndReg node.
  *
@@ -2817,10 +2688,9 @@ ir_node *new_r_EndExcept(ir_graph *irg, ir_node *block);
  * It is used for the interprocedural representation where blocks are parted
  * behind Call nodes to represent the control flow to called procedures.
  *
- * @param *irg    The IR graph the node belong to.
  * @param *block  The block the node belong to.
  */
-ir_node *new_r_Break  (ir_graph *irg, ir_node *block);
+ir_node *new_r_Break(ir_node *block);
 
 /** Constructor for a Filter node.
  *
@@ -2833,14 +2703,12 @@ ir_node *new_r_Break  (ir_graph *irg, ir_node *block);
  *
  * The constructor builds the Filter in intraprocedural view.
  *
- * @param *irg    The IR graph the node belong to.
  * @param *block  The block the node belong to.
- * @param *arg  The tuple value to project from.
- * @param *mode The mode of the projected value.
- * @param proj  The position in the tuple to project from.
+ * @param *arg    The tuple value to project from.
+ * @param *mode   The mode of the projected value.
+ * @param proj    The position in the tuple to project from.
  */
-ir_node *new_r_Filter (ir_graph *irg, ir_node *block, ir_node *arg,
-               ir_mode *mode, long proj);
+ir_node *new_r_Filter(ir_node *block, ir_node *arg, ir_mode *mode, long proj);
 
 /** Constructor for a NoMem node.
  *
@@ -2849,83 +2717,75 @@ ir_node *new_r_Filter (ir_graph *irg, ir_node *block, ir_node *arg,
  *
  * @param *irg    The IR graph the node belongs to.
  */
-ir_node *new_r_NoMem  (ir_graph *irg);
+ir_node *new_r_NoMem(ir_graph *irg);
 
 /** Constructor for a Mux node.
  *
- * @param *irg      The IR graph the node belong to.
  * @param *block    The block the node belong to.
  * @param *sel      The ir_node that calculates the boolean select.
  * @param *ir_true  The ir_node that calculates the true result.
  * @param *ir_false The ir_node that calculates the false result.
  * @param *mode     The mode of the node (and it_true and ir_false).
  */
-ir_node *new_r_Mux  (ir_graph *irg, ir_node *block,
-    ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode);
+ir_node *new_r_Mux(ir_node *block, ir_node *sel,
+                   ir_node *ir_false, ir_node *ir_true, ir_mode *mode);
 
 /** Constructor for a CopyB node.
  *
- * @param *irg        The IR graph the node belong to.
  * @param *block      The block the node belong to.
  * @param *store      The current memory
  * @param *dst        The ir_node that represents the destination address.
  * @param *src        The ir_node that represents the source address.
  * @param *data_type  The type of the copied data
  */
-ir_node *new_r_CopyB(ir_graph *irg, ir_node *block,
-    ir_node *store, ir_node *dst, ir_node *src, ir_type *data_type);
+ir_node *new_r_CopyB(ir_node *block, ir_node *store,
+                     ir_node *dst, ir_node *src, ir_type *data_type);
 
 /** Constructor for a InstOf node.
  *
  * A High-Level Type check.
  *
- * @param   *irg       The IR graph the node  belongs to.
- * @param   *block     The IR block the node belongs to.
- * @param   *store     The memory in which the object the entity should be selected
- *                     from is allocated.
- * @param   *objptr    A pointer to a object of a class type.
- * @param   *type      The type of which objptr must be.
+ * @param *block     The block the node belong to.
+ * @param *store     The memory in which the object the entity should be selected
+ *                   from is allocated.
+ * @param *objptr    A pointer to a object of a class type.
+ * @param *type      The type of which objptr must be.
  */
-ir_node *new_r_InstOf(ir_graph *irg, ir_node *block, ir_node *store,
+ir_node *new_r_InstOf(ir_node *block, ir_node *store,
                       ir_node *objptr, ir_type *type);
 
 /** Constructor for a Raise node.
  *
  * A High-Level Exception throw.
  *
- * @param *irg   The IR graph the node  belongs to.
  * @param *block The IR block the node belongs to.
  * @param *store The current memory.
  * @param *obj   A pointer to the Except variable.
  */
-ir_node *new_r_Raise(ir_graph *irg, ir_node *block,
-                     ir_node *store, ir_node *obj);
+ir_node *new_r_Raise(ir_node *block, ir_node *store, ir_node *obj);
 
 /** Constructor for a Bound node.
  *
  * A High-Level bounds check. Checks whether lower <= idx && idx < upper.
  *
- * @param *irg        The IR graph the node belong to.
  * @param *block      The block the node belong to.
  * @param *store      The current memory.
  * @param *idx        The ir_node that represents an index.
  * @param *lower      The ir_node that represents the lower bound for the index.
  * @param *upper      The ir_node that represents the upper bound for the index.
  */
-ir_node *new_r_Bound(ir_graph *irg, ir_node *block,
-    ir_node *store, ir_node *idx, ir_node *lower, ir_node *upper);
+ir_node *new_r_Bound(ir_node *block, ir_node *store,
+                     ir_node *idx, ir_node *lower, ir_node *upper);
 
 /** Constructor for a Pin node.
  *
- * @param *irg        The IR graph the node belong to.
  * @param *block      The block the node belong to.
  * @param *node       The node which value should be pinned.
  */
-ir_node *new_r_Pin(ir_graph *irg, ir_node *block, ir_node *node);
+ir_node *new_r_Pin(ir_node *block, ir_node *node);
 
 /** Constructor for an ASM pseudo node.
  *
- * @param *irg        The IR graph the node belong to.
  * @param *block      The block the node belong to.
  * @param arity       The number of data inputs to the node.
  * @param *in         The array of length arity of data inputs.
@@ -2936,7 +2796,7 @@ ir_node *new_r_Pin(ir_graph *irg, ir_node *block, ir_node *node);
  * @param *clobber    The array of length n_clobber of clobbered registers.
  * @param *asm_text   The assembler text.
  */
-ir_node *new_r_ASM(ir_graph *irg, ir_node *block,
+ir_node *new_r_ASM(ir_node *block,
                    int arity, ir_node *in[], ir_asm_constraint *inputs,
                    int n_outs, ir_asm_constraint *outputs,
                    int n_clobber, ident *clobber[], ident *asm_text);
@@ -2950,7 +2810,7 @@ ir_node *new_r_ASM(ir_graph *irg, ir_node *block,
  *
  *  @param target  The new current block.
  */
-void     set_cur_block (ir_node *target);
+void     set_cur_block(ir_node *target);
 
 /** Returns the current block of the current graph. */
 ir_node *get_cur_block(void);
@@ -2980,7 +2840,7 @@ ir_node *new_d_Block(dbg_info *db, int arity, ir_node *in[]);
  *
  * @param *db    A pointer for debug information.
  */
-ir_node *new_d_Start  (dbg_info *db);
+ir_node *new_d_Start(dbg_info *db);
 
 /** Constructor for a End node.
  *
@@ -2988,7 +2848,7 @@ ir_node *new_d_Start  (dbg_info *db);
  *
  * @param *db     A pointer for debug information.
  */
-ir_node *new_d_End    (dbg_info *db);
+ir_node *new_d_End(dbg_info *db);
 
 /** Constructor for a Jmp node.
  *
@@ -2998,7 +2858,7 @@ ir_node *new_d_End    (dbg_info *db);
  *
  * @param *db     A pointer for debug information.
  */
-ir_node *new_d_Jmp    (dbg_info *db);
+ir_node *new_d_Jmp(dbg_info *db);
 
 /** Constructor for an IJmp node.
  *
@@ -3008,7 +2868,7 @@ ir_node *new_d_Jmp    (dbg_info *db);
  * @param *db     A pointer for debug information.
  * @param *tgt    The IR node representing the target address.
  */
-ir_node *new_d_IJmp   (dbg_info *db, ir_node *tgt);
+ir_node *new_d_IJmp(dbg_info *db, ir_node *tgt);
 
 /** Constructor for a Cond node.
  *
@@ -3024,7 +2884,7 @@ ir_node *new_d_IJmp   (dbg_info *db, ir_node *tgt);
  * @param *db    A pointer for debug information.
  * @param *c     The conditions parameter.Can be of mode b or I_u.
  */
-ir_node *new_d_Cond   (dbg_info *db, ir_node *c);
+ir_node *new_d_Cond(dbg_info *db, ir_node *c);
 
 /** Constructor for a Return node.
  *
@@ -3038,7 +2898,7 @@ ir_node *new_d_Cond   (dbg_info *db, ir_node *c);
  * @param arity  Number of array indices.
  * @param *in    Array with index inputs to the node.
  */
-ir_node *new_d_Return (dbg_info *db, ir_node *store, int arity, ir_node *in[]);
+ir_node *new_d_Return(dbg_info *db, ir_node *store, int arity, ir_node *in[]);
 
 /** Constructor for a Const_type node.
  *
@@ -3053,7 +2913,7 @@ ir_node *new_d_Return (dbg_info *db, ir_node *store, int arity, ir_node *in[]);
                  added to the attributes of the node.
  * @param *tp    The type of the constant.
  */
-ir_node *new_d_Const_type (dbg_info *db, tarval *con, ir_type *tp);
+ir_node *new_d_Const_type(dbg_info *db, tarval *con, ir_type *tp);
 
 /** Constructor for a Const node.
  *
@@ -3068,7 +2928,7 @@ ir_node *new_d_Const_type (dbg_info *db, tarval *con, ir_type *tp);
  * @param *con   Points to an entry in the constant table. This pointer is added
  *               to the attributes of the node.
  */
-ir_node *new_d_Const  (dbg_info *db, tarval *con);
+ir_node *new_d_Const(dbg_info *db, tarval *con);
 
 /** Constructor for a SymConst_type node.
  *
@@ -3143,8 +3003,8 @@ ir_node *new_d_simpleSel(dbg_info *db, ir_node *store, ir_node *objptr, ir_entit
  *                     element entity.  The constructor copies this array.
  * @param   *ent       The entity to select.
  */
-ir_node *new_d_Sel    (dbg_info *db, ir_node *store, ir_node *objptr, int arity, ir_node *in[],
-                       ir_entity *ent);
+ir_node *new_d_Sel(dbg_info *db, ir_node *store, ir_node *objptr, int arity, ir_node *in[],
+                   ir_entity *ent);
 
 /** Constructor for a Call node.
  *
@@ -3158,8 +3018,8 @@ ir_node *new_d_Sel    (dbg_info *db, ir_node *store, ir_node *objptr, int arity,
  * @param   *in[]   An array with the pointers to the parameters. The constructor copies this array.
  * @param   *tp     Type information of the procedure called.
  */
-ir_node *new_d_Call   (dbg_info *db, ir_node *store, ir_node *callee, int arity, ir_node *in[],
-                       ir_type *tp);
+ir_node *new_d_Call(dbg_info *db, ir_node *store, ir_node *callee, int arity, ir_node *in[],
+                    ir_type *tp);
 
 /** Constructor for a Builtin node.
  *
@@ -3184,7 +3044,7 @@ ir_node *new_d_Builtin(dbg_info *db, ir_node *store, int arity, ir_node *in[], i
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_d_Add    (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_d_Add(dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Sub node.
  *
@@ -3195,7 +3055,7 @@ ir_node *new_d_Add    (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_d_Sub    (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_d_Sub(dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Minus node.
  *
@@ -3205,7 +3065,7 @@ ir_node *new_d_Sub    (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
  * @param   *op    The operand .
  * @param   *mode  The mode of the operand and the result.
  */
-ir_node *new_d_Minus  (dbg_info *db, ir_node *op,  ir_mode *mode);
+ir_node *new_d_Minus(dbg_info *db, ir_node *op,  ir_mode *mode);
 
 /** Constructor for a Mul node.
  *
@@ -3216,7 +3076,7 @@ ir_node *new_d_Minus  (dbg_info *db, ir_node *op,  ir_mode *mode);
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_d_Mul    (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_d_Mul(dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Mulh node.
  *
@@ -3227,7 +3087,7 @@ ir_node *new_d_Mul    (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_d_Mulh   (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_d_Mulh(dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Quot node.
  *
@@ -3240,7 +3100,7 @@ ir_node *new_d_Mulh   (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
  * @param   *mode  The mode of the result.
  * @param   state  The pinned state.
  */
-ir_node *new_d_Quot   (dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_d_Quot(dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
 
 /** Constructor for a DivMod node.
  *
@@ -3253,7 +3113,7 @@ ir_node *new_d_Quot   (dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2,
  * @param   *mode  The mode of the results.
  * @param   state  The pinned state.
  */
-ir_node *new_d_DivMod (dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_d_DivMod(dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
 
 /** Constructor for a Div node.
  *
@@ -3266,7 +3126,7 @@ ir_node *new_d_DivMod (dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2,
  * @param   *mode  The mode of the result.
  * @param   state  The pinned state.
  */
-ir_node *new_d_Div    (dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_d_Div(dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
 
 /** Constructor for a remainderless Div node.
  *
@@ -3279,7 +3139,7 @@ ir_node *new_d_Div    (dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2,
  * @param   *mode  The mode of the result.
  * @param   state  The pinned state.
  */
-ir_node *new_d_DivRL  (dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_d_DivRL(dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
 
 /** Constructor for a Mod node.
  *
@@ -3292,7 +3152,7 @@ ir_node *new_d_DivRL  (dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2,
  * @param   *mode  The mode of the result.
  * @param   state  The pinned state.
  */
-ir_node *new_d_Mod    (dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_d_Mod(dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
 
 /** Constructor for a Abs node.
  *
@@ -3302,7 +3162,7 @@ ir_node *new_d_Mod    (dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2,
  * @param   *op    The operand
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_d_Abs    (dbg_info *db, ir_node *op,                ir_mode *mode);
+ir_node *new_d_Abs(dbg_info *db, ir_node *op, ir_mode *mode);
 
 /** Constructor for a And node.
  *
@@ -3313,7 +3173,7 @@ ir_node *new_d_Abs    (dbg_info *db, ir_node *op,                ir_mode *mode);
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_d_And    (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_d_And(dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Or node.
  *
@@ -3324,7 +3184,7 @@ ir_node *new_d_And    (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_d_Or     (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_d_Or(dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Eor node.
  *
@@ -3335,7 +3195,7 @@ ir_node *new_d_Or     (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the results.
  */
-ir_node *new_d_Eor    (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_d_Eor(dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Not node.
  *
@@ -3345,7 +3205,7 @@ ir_node *new_d_Eor    (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
  * @param   *op    The operand.
  * @param   *mode  The mode of the operand and the result.
  */
-ir_node *new_d_Not    (dbg_info *db, ir_node *op,                ir_mode *mode);
+ir_node *new_d_Not(dbg_info *db, ir_node *op, ir_mode *mode);
 
 /** Constructor for a Shl node.
  *
@@ -3356,7 +3216,7 @@ ir_node *new_d_Not    (dbg_info *db, ir_node *op,                ir_mode *mode);
  * @param   *k     The number of bits to  shift the operand .
  * @param   *mode  The mode of the operand and the result.
  */
-ir_node *new_d_Shl    (dbg_info *db, ir_node *op,  ir_node *k,   ir_mode *mode);
+ir_node *new_d_Shl(dbg_info *db, ir_node *op, ir_node *k, ir_mode *mode);
 
 /** Constructor for a Shr node.
  *
@@ -3367,7 +3227,7 @@ ir_node *new_d_Shl    (dbg_info *db, ir_node *op,  ir_node *k,   ir_mode *mode);
  * @param   *k     The number of bits to  shift the operand .
  * @param   *mode  The mode of the operand and the result.
  */
-ir_node *new_d_Shr    (dbg_info *db, ir_node *op,  ir_node *k,   ir_mode *mode);
+ir_node *new_d_Shr(dbg_info *db, ir_node *op, ir_node *k, ir_mode *mode);
 
 /** Constructor for a Shrs node.
  *
@@ -3378,7 +3238,7 @@ ir_node *new_d_Shr    (dbg_info *db, ir_node *op,  ir_node *k,   ir_mode *mode);
  * @param   *k     The number of bits to  shift the operand .
  * @param   *mode  The mode of the operand and the result.
  */
-ir_node *new_d_Shrs   (dbg_info *db, ir_node *op,  ir_node *k,   ir_mode *mode);
+ir_node *new_d_Shrs(dbg_info *db, ir_node *op, ir_node *k, ir_mode *mode);
 
 /** Constructor for a Rotl node.
  *
@@ -3389,7 +3249,7 @@ ir_node *new_d_Shrs   (dbg_info *db, ir_node *op,  ir_node *k,   ir_mode *mode);
  * @param   *k     The number of bits to rotate the operand.
  * @param   *mode  The mode of the operand.
  */
-ir_node *new_d_Rotl   (dbg_info *db, ir_node *op,  ir_node *k,   ir_mode *mode);
+ir_node *new_d_Rotl(dbg_info *db, ir_node *op, ir_node *k, ir_mode *mode);
 
 /** Constructor for a Cmp node.
  *
@@ -3399,7 +3259,7 @@ ir_node *new_d_Rotl   (dbg_info *db, ir_node *op,  ir_node *k,   ir_mode *mode);
  * @param   *op1   The first operand.
  * @param   *op2   The second operand.
  */
-ir_node *new_d_Cmp    (dbg_info *db, ir_node *op1, ir_node *op2);
+ir_node *new_d_Cmp(dbg_info *db, ir_node *op1, ir_node *op2);
 
 /** Constructor for a Conv node.
  *
@@ -3409,7 +3269,7 @@ ir_node *new_d_Cmp    (dbg_info *db, ir_node *op1, ir_node *op2);
  * @param   *op    The operand.
  * @param   *mode  The mode of this the operand muss be converted .
  */
-ir_node *new_d_Conv   (dbg_info *db, ir_node *op, ir_mode *mode);
+ir_node *new_d_Conv(dbg_info *db, ir_node *op, ir_mode *mode);
 
 /** Constructor for a strict Conv node.
  *
@@ -3419,7 +3279,7 @@ ir_node *new_d_Conv   (dbg_info *db, ir_node *op, ir_mode *mode);
  * @param   *op    The operand.
  * @param   *mode  The mode of this the operand muss be converted .
  */
-ir_node *new_d_strictConv   (dbg_info *db, ir_node *op, ir_mode *mode);
+ir_node *new_d_strictConv(dbg_info *db, ir_node *op, ir_mode *mode);
 
 /** Constructor for a Cast node.
  *
@@ -3430,7 +3290,7 @@ ir_node *new_d_strictConv   (dbg_info *db, ir_node *op, ir_mode *mode);
  * @param   *op    The operand.
  * @param   *to_tp The type of this the operand muss be casted .
  */
-ir_node *new_d_Cast   (dbg_info *db, ir_node *op, ir_type *to_tp);
+ir_node *new_d_Cast(dbg_info *db, ir_node *op, ir_type *to_tp);
 
 /** Constructor for a Carry node.
  *
@@ -3441,7 +3301,7 @@ ir_node *new_d_Cast   (dbg_info *db, ir_node *op, ir_type *to_tp);
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_d_Carry  (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_d_Carry(dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Borrow node.
  *
@@ -3452,7 +3312,7 @@ ir_node *new_d_Carry  (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_d_Borrow (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_d_Borrow(dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Phi node.
  *
@@ -3463,7 +3323,7 @@ ir_node *new_d_Borrow (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
  * @param *in    Array with predecessors
  * @param *mode  The mode of it's inputs and output.
  */
-ir_node *new_d_Phi    (dbg_info *db, int arity, ir_node *in[], ir_mode *mode);
+ir_node *new_d_Phi(dbg_info *db, int arity, ir_node *in[], ir_mode *mode);
 
 /** Constructor for a Load node.
  *
@@ -3500,8 +3360,8 @@ ir_node *new_d_Store(dbg_info *db, ir_node *store, ir_node *addr, ir_node *val,
  * @param *alloc_type The type of the allocated variable.
  * @param where       Where to allocate the variable, either heap_alloc or stack_alloc.
  */
-ir_node *new_d_Alloc  (dbg_info *db, ir_node *store, ir_node *size, ir_type *alloc_type,
-                       ir_where_alloc where);
+ir_node *new_d_Alloc(dbg_info *db, ir_node *store, ir_node *size, ir_type *alloc_type,
+                     ir_where_alloc where);
 
  /** Constructor for a Free node.
  *
@@ -3516,8 +3376,8 @@ ir_node *new_d_Alloc  (dbg_info *db, ir_node *store, ir_node *size, ir_type *all
  * @param *free_type  The type of the freed variable.
  * @param where       Where the variable was allocated, either heap_alloc or stack_alloc.
  */
-ir_node *new_d_Free   (dbg_info *db, ir_node *store, ir_node *ptr, ir_node *size,
-             ir_type *free_type, ir_where_alloc where);
+ir_node *new_d_Free(dbg_info *db, ir_node *store, ir_node *ptr, ir_node *size,
+                    ir_type *free_type, ir_where_alloc where);
 
 /** Constructor for a Sync node.
  *
@@ -3531,7 +3391,7 @@ ir_node *new_d_Free   (dbg_info *db, ir_node *store, ir_node *ptr, ir_node *size
  * @param  **in     An array of pointers to nodes that produce an output of type
  *                  memory.  The constructor copies this array.
  */
-ir_node *new_d_Sync   (dbg_info *db, int arity, ir_node *in[]);
+ir_node *new_d_Sync(dbg_info *db, int arity, ir_node *in[]);
 
 /** Constructor for a Proj node.
  *
@@ -3544,7 +3404,7 @@ ir_node *new_d_Sync   (dbg_info *db, int arity, ir_node *in[]);
  * @param *mode  The mode of the value to project.
  * @param proj   The position of the value in the tuple.
  */
-ir_node *new_d_Proj   (dbg_info *db, ir_node *arg, ir_mode *mode, long proj);
+ir_node *new_d_Proj(dbg_info *db, ir_node *arg, ir_mode *mode, long proj);
 
 /** Constructor for a defaultProj node.
  *
@@ -3555,7 +3415,7 @@ ir_node *new_d_Proj   (dbg_info *db, ir_node *arg, ir_mode *mode, long proj);
  * @param arg       A node producing a tuple.
  * @param max_proj  The end  position of the value in the tuple.
  */
-ir_node *new_d_defaultProj (dbg_info *db, ir_node *arg, long max_proj);
+ir_node *new_d_defaultProj(dbg_info *db, ir_node *arg, long max_proj);
 
 /** Constructor for a Tuple node.
  *
@@ -3567,7 +3427,7 @@ ir_node *new_d_defaultProj (dbg_info *db, ir_node *arg, long max_proj);
  * @param arity   The number of tuple elements.
  * @param **in    An array containing pointers to the nodes producing the tuple elements.
  */
-ir_node *new_d_Tuple  (dbg_info *db, int arity, ir_node *in[]);
+ir_node *new_d_Tuple(dbg_info *db, int arity, ir_node *in[]);
 
 /** Constructor for a Id node.
  *
@@ -3578,7 +3438,7 @@ ir_node *new_d_Tuple  (dbg_info *db, int arity, ir_node *in[]);
  * @param *val    The operand to Id.
  * @param *mode   The mode of *val.
  */
-ir_node *new_d_Id     (dbg_info *db, ir_node *val, ir_mode *mode);
+ir_node *new_d_Id(dbg_info *db, ir_node *val, ir_mode *mode);
 
 /** Constructor for a Confirm node.
  *
@@ -3593,7 +3453,7 @@ ir_node *new_d_Id     (dbg_info *db, ir_node *val, ir_mode *mode);
  * @param *bound  The value to compare against. Must be a firm node, typically a constant.
  * @param cmp     The compare operation.
  */
-ir_node *new_d_Confirm (dbg_info *db, ir_node *val, ir_node *bound, pn_Cmp cmp);
+ir_node *new_d_Confirm(dbg_info *db, ir_node *val, ir_node *bound, pn_Cmp cmp);
 
 /** Constructor for an Unknown node.
  *
@@ -3622,7 +3482,7 @@ ir_node *new_d_CallBegin(dbg_info *db, ir_node *ptr, ir_node *call);
  *
  * @param *db     A pointer for debug information.
  */
-ir_node *new_d_EndReg (dbg_info *db);
+ir_node *new_d_EndReg(dbg_info *db);
 
 /** Constructor for an EndExcept node.
  *
@@ -3645,7 +3505,7 @@ ir_node *new_d_EndExcept(dbg_info *db);
  *
  * @param *db     A pointer for debug information.
  */
-ir_node *new_d_Break (dbg_info *db);
+ir_node *new_d_Break(dbg_info *db);
 
 /** Constructor for a Filter node.
  *
@@ -3664,7 +3524,7 @@ ir_node *new_d_Break (dbg_info *db);
  * @param *mode The mode of the projected value.
  * @param proj  The position in the tuple to project from.
  */
-ir_node *new_d_Filter (dbg_info *db, ir_node *arg, ir_mode *mode, long proj);
+ir_node *new_d_Filter(dbg_info *db, ir_node *arg, ir_mode *mode, long proj);
 
 /** Constructor for a Mux node.
  *
@@ -3674,8 +3534,8 @@ ir_node *new_d_Filter (dbg_info *db, ir_node *arg, ir_mode *mode, long proj);
  * @param *ir_false The ir_node that calculates the false result.
  * @param *mode     The mode of the node (and it_true and ir_false).
  */
-ir_node *new_d_Mux  (dbg_info *db, ir_node *sel,
-    ir_node *ir_false, ir_node *ir_true, ir_mode *mode);
+ir_node *new_d_Mux(dbg_info *db, ir_node *sel,
+                   ir_node *ir_false, ir_node *ir_true, ir_mode *mode);
 
 /** Constructor for a CopyB node.
  *
@@ -3697,7 +3557,7 @@ ir_node *new_d_CopyB(dbg_info *db, ir_node *store, ir_node *dst, ir_node *src, i
  * @param   *objptr    A pointer to a object of a class type.
  * @param   *type      The type of which objptr must be.
  */
-ir_node *new_d_InstOf (dbg_info *db, ir_node *store, ir_node *objptr, ir_type *type);
+ir_node *new_d_InstOf(dbg_info *db, ir_node *store, ir_node *objptr, ir_type *type);
 
 /** Constructor for a Raise node.
  *
@@ -3707,7 +3567,7 @@ ir_node *new_d_InstOf (dbg_info *db, ir_node *store, ir_node *objptr, ir_type *t
  * @param *store The current memory.
  * @param *obj   A pointer to the Except variable.
  */
-ir_node *new_d_Raise  (dbg_info *db, ir_node *store, ir_node *obj);
+ir_node *new_d_Raise(dbg_info *db, ir_node *store, ir_node *obj);
 
 /** Constructor for a Bound node.
  *
@@ -3769,20 +3629,20 @@ ir_node *new_Block(int arity, ir_node *in[]);
  * Adds the node to the block in current_ir_block.
  *
  */
-ir_node *new_Start  (void);
+ir_node *new_Start(void);
 
 /** Constructor for an End node.
  *
  * Adds the node to the block in current_ir_block.
  */
-ir_node *new_End    (void);
+ir_node *new_End(void);
 
 /** Constructor for an EndReg node.
  *
  * Used to represent regular procedure end in interprocedual view.
  * Adds the node to the block in current_ir_block.
  */
-ir_node *new_EndReg (void);
+ir_node *new_EndReg(void);
 
 /** Constructor for an EndExpcept node.
  *
@@ -3797,7 +3657,7 @@ ir_node *new_EndExcept(void);
  *
  * Jmp represents control flow to a single control successor.
  */
-ir_node *new_Jmp    (void);
+ir_node *new_Jmp(void);
 
 /** Constructor for an IJmp node.
  *
@@ -3806,7 +3666,7 @@ ir_node *new_Jmp    (void);
  *
  * @param *tgt    The IR node representing the target address.
  */
-ir_node *new_IJmp   (ir_node *tgt);
+ir_node *new_IJmp(ir_node *tgt);
 
 /** Constructor for a Break node.
  * Break represents control flow to a single control successor just as Jmp.
@@ -3815,7 +3675,7 @@ ir_node *new_IJmp   (ir_node *tgt);
  * behind Call nodes to represent the control flow to called procedures.
  * Adds the node to the block in current_ir_block.
  */
-ir_node *new_Break  (void);
+ir_node *new_Break(void);
 
 /** Constructor for a Cond node.
  *
@@ -3829,7 +3689,7 @@ ir_node *new_Break  (void);
  *
  * @param *c     The conditions parameter.Can be of mode b or I_u.
  */
-ir_node *new_Cond   (ir_node *c);
+ir_node *new_Cond(ir_node *c);
 
 /** Constructor for a Return node.
  *
@@ -3840,7 +3700,7 @@ ir_node *new_Cond   (ir_node *c);
  * @param arity  Number of array indices.
  * @param *in    Array with index inputs to the node.
  */
-ir_node *new_Return (ir_node *store, int arity, ir_node *in[]);
+ir_node *new_Return(ir_node *store, int arity, ir_node *in[]);
 
 /** Constructor for a Const node.
  *
@@ -3853,7 +3713,7 @@ ir_node *new_Return (ir_node *store, int arity, ir_node *in[]);
  * @param *con   Points to an entry in the constant table. This pointer is
  *               added to the attributes of  the node.
  */
-ir_node *new_Const (tarval *con);
+ir_node *new_Const(tarval *con);
 
 /**
  * Make a const from a long.
@@ -3968,8 +3828,8 @@ ir_node *new_simpleSel(ir_node *store, ir_node *objptr, ir_entity *ent);
  *                     element entity.  The constructor copies this array.
  * @param   *ent       The entity to select.
  */
-ir_node *new_Sel    (ir_node *store, ir_node *objptr, int arity, ir_node *in[],
-                     ir_entity *ent);
+ir_node *new_Sel(ir_node *store, ir_node *objptr, int arity, ir_node *in[],
+                 ir_entity *ent);
 
 /** Constructor for a Call node.
  *
@@ -3982,8 +3842,8 @@ ir_node *new_Sel    (ir_node *store, ir_node *objptr, int arity, ir_node *in[],
  * @param   *in[]   An array with the pointers to the parameters. The constructor copies this array.
  * @param   *tp     Type information of the procedure called.
  */
-ir_node *new_Call   (ir_node *store, ir_node *callee, int arity, ir_node *in[],
-                     ir_type *tp);
+ir_node *new_Call(ir_node *store, ir_node *callee, int arity, ir_node *in[],
+                  ir_type *tp);
 
 /** Constructor for a Builtin node.
  *
@@ -4018,7 +3878,7 @@ ir_node *new_CallBegin(ir_node *ptr, ir_node *call);
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_Add    (ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_Add(ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Sub node.
  *
@@ -4028,7 +3888,7 @@ ir_node *new_Add    (ir_node *op1, ir_node *op2, ir_mode *mode);
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_Sub    (ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_Sub(ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Minus node.
  *
@@ -4037,7 +3897,7 @@ ir_node *new_Sub    (ir_node *op1, ir_node *op2, ir_mode *mode);
  * @param   *op    The operand .
  * @param   *mode  The mode of the operand and the result.
  */
-ir_node *new_Minus  (ir_node *op,  ir_mode *mode);
+ir_node *new_Minus(ir_node *op,  ir_mode *mode);
 
 /**
  * Constructor for a Mul node. Adds the node to the block in current_ir_block.
@@ -4046,7 +3906,7 @@ ir_node *new_Minus  (ir_node *op,  ir_mode *mode);
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_Mul    (ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_Mul(ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /**
  * Constructor for a Mulh node. Adds the node to the block in current_ir_block.
@@ -4055,7 +3915,7 @@ ir_node *new_Mul    (ir_node *op1, ir_node *op2, ir_mode *mode);
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_Mulh   (ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_Mulh(ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Quot node.
  *
@@ -4067,7 +3927,7 @@ ir_node *new_Mulh   (ir_node *op1, ir_node *op2, ir_mode *mode);
  * @param   *mode  The mode of the result.
  * @param   state  The pinned state.
  */
-ir_node *new_Quot   (ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_Quot(ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
 
 /** Constructor for a DivMod node.
  *
@@ -4079,7 +3939,7 @@ ir_node *new_Quot   (ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode,
  * @param   *mode  The mode of the results.
  * @param   state  The pinned state.
  */
-ir_node *new_DivMod (ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_DivMod(ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
 
 /** Constructor for a Div node.
  *
@@ -4091,7 +3951,7 @@ ir_node *new_DivMod (ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode,
  * @param   *mode  The mode of the result.
  * @param   state  The pinned state.
  */
-ir_node *new_Div    (ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_Div(ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
 
 /** Constructor for a remainderless Div node.
  *
@@ -4103,7 +3963,7 @@ ir_node *new_Div    (ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode,
  * @param   *mode  The mode of the result.
  * @param   state  The pinned state.
  */
-ir_node *new_DivRL  (ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_DivRL(ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
 
 /** Constructor for a Mod node.
  *
@@ -4115,7 +3975,7 @@ ir_node *new_DivRL  (ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode,
  * @param   *mode  The mode of the result.
  * @param   state  The pinned state.
  */
-ir_node *new_Mod    (ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
+ir_node *new_Mod(ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode, op_pin_state state);
 
 /** Constructor for a Abs node.
  *
@@ -4124,7 +3984,7 @@ ir_node *new_Mod    (ir_node *memop, ir_node *op1, ir_node *op2, ir_mode *mode,
  * @param   *op    The operand
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_Abs    (ir_node *op,                ir_mode *mode);
+ir_node *new_Abs(ir_node *op, ir_mode *mode);
 
 /** Constructor for a And node.
  *
@@ -4134,7 +3994,7 @@ ir_node *new_Abs    (ir_node *op,                ir_mode *mode);
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_And    (ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_And(ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /**
  * Constructor for a Or node. Adds the node to the block in current_ir_block.
@@ -4143,7 +4003,7 @@ ir_node *new_And    (ir_node *op1, ir_node *op2, ir_mode *mode);
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_Or     (ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_Or(ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /**
  * Constructor for a Eor node. Adds the node to the block in current_ir_block.
@@ -4152,7 +4012,7 @@ ir_node *new_Or     (ir_node *op1, ir_node *op2, ir_mode *mode);
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the results.
  */
-ir_node *new_Eor    (ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_Eor(ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Not node.
  *
@@ -4161,7 +4021,7 @@ ir_node *new_Eor    (ir_node *op1, ir_node *op2, ir_mode *mode);
  * @param   *op    The operand.
  * @param   *mode  The mode of the operand and the result.
  */
-ir_node *new_Not    (ir_node *op,                ir_mode *mode);
+ir_node *new_Not(ir_node *op, ir_mode *mode);
 
 /** Constructor for a Shl node.
  *
@@ -4171,7 +4031,7 @@ ir_node *new_Not    (ir_node *op,                ir_mode *mode);
  * @param   *k     The number of bits to  shift the operand .
  * @param   *mode  The mode of the operand and the result.
  */
-ir_node *new_Shl    (ir_node *op,  ir_node *k,   ir_mode *mode);
+ir_node *new_Shl(ir_node *op, ir_node *k, ir_mode *mode);
 
 /**
  * Constructor for a Shr node. Adds the node to the block in current_ir_block.
@@ -4180,7 +4040,7 @@ ir_node *new_Shl    (ir_node *op,  ir_node *k,   ir_mode *mode);
  * @param   *k     The number of bits to  shift the operand .
  * @param   *mode  The mode of the operand and the result.
  */
-ir_node *new_Shr    (ir_node *op,  ir_node *k,   ir_mode *mode);
+ir_node *new_Shr(ir_node *op, ir_node *k, ir_mode *mode);
 
 /** Constructor for a Shrs node.
  *
@@ -4190,7 +4050,7 @@ ir_node *new_Shr    (ir_node *op,  ir_node *k,   ir_mode *mode);
  * @param   *k     The number of bits to  shift the operand .
  * @param   *mode  The mode of the operand and the result.
  */
-ir_node *new_Shrs   (ir_node *op,  ir_node *k,   ir_mode *mode);
+ir_node *new_Shrs(ir_node *op, ir_node *k, ir_mode *mode);
 
 /** Constructor for a Rotl node.
  *
@@ -4200,7 +4060,7 @@ ir_node *new_Shrs   (ir_node *op,  ir_node *k,   ir_mode *mode);
  * @param   *k     The number of bits to rotate the operand.
  * @param   *mode  The mode of the operand.
  */
-ir_node *new_Rotl   (ir_node *op,  ir_node *k,   ir_mode *mode);
+ir_node *new_Rotl(ir_node *op, ir_node *k, ir_mode *mode);
 
 /** Constructor for a Cmp node.
  *
@@ -4209,7 +4069,7 @@ ir_node *new_Rotl   (ir_node *op,  ir_node *k,   ir_mode *mode);
  * @param   *op1   The first operand.
  * @param   *op2   The second operand.
  */
-ir_node *new_Cmp    (ir_node *op1, ir_node *op2);
+ir_node *new_Cmp(ir_node *op1, ir_node *op2);
 
 /** Constructor for a Conv node.
  *
@@ -4218,7 +4078,7 @@ ir_node *new_Cmp    (ir_node *op1, ir_node *op2);
  * @param   *op          The operand.
  * @param   *mode        The mode of this the operand muss be converted.
  */
-ir_node *new_Conv   (ir_node *op, ir_mode *mode);
+ir_node *new_Conv(ir_node *op, ir_mode *mode);
 
 /** Constructor for a strict Conv node.
  *
@@ -4227,7 +4087,7 @@ ir_node *new_Conv   (ir_node *op, ir_mode *mode);
  * @param   *op          The operand.
  * @param   *mode        The mode of this the operand muss be converted.
  */
-ir_node *new_strictConv   (ir_node *op, ir_mode *mode);
+ir_node *new_strictConv(ir_node *op, ir_mode *mode);
 
 /** Constructor for a Cast node.
  *
@@ -4237,7 +4097,7 @@ ir_node *new_strictConv   (ir_node *op, ir_mode *mode);
  * @param   *op    The operand.
  * @param   *to_tp The type of this the operand muss be casted .
  */
-ir_node *new_Cast   (ir_node *op, ir_type *to_tp);
+ir_node *new_Cast(ir_node *op, ir_type *to_tp);
 
 /** Constructor for a Carry node.
  *
@@ -4247,7 +4107,7 @@ ir_node *new_Cast   (ir_node *op, ir_type *to_tp);
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_Carry  (ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_Carry(ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Borrow node.
  *
@@ -4257,7 +4117,7 @@ ir_node *new_Carry  (ir_node *op1, ir_node *op2, ir_mode *mode);
  * @param   *op2   The second operand.
  * @param   *mode  The mode of the operands and the result.
  */
-ir_node *new_Borrow (ir_node *op1, ir_node *op2, ir_mode *mode);
+ir_node *new_Borrow(ir_node *op1, ir_node *op2, ir_mode *mode);
 
 /** Constructor for a Phi node.
  *
@@ -4267,7 +4127,7 @@ ir_node *new_Borrow (ir_node *op1, ir_node *op2, ir_mode *mode);
  * @param *in    Array with predecessors.
  * @param *mode  The mode of it's inputs and output.
  */
-ir_node *new_Phi    (int arity, ir_node *in[], ir_mode *mode);
+ir_node *new_Phi(int arity, ir_node *in[], ir_mode *mode);
 
 /** Constructor for a Load node.
  *
@@ -4297,8 +4157,8 @@ ir_node *new_Store(ir_node *store, ir_node *addr, ir_node *val, ir_cons_flags fl
  * @param *alloc_type The type of the allocated variable.
  * @param where       Where to allocate the variable, either heap_alloc or stack_alloc.
  */
-ir_node *new_Alloc  (ir_node *store, ir_node *size, ir_type *alloc_type,
-                     ir_where_alloc where);
+ir_node *new_Alloc(ir_node *store, ir_node *size, ir_type *alloc_type,
+                   ir_where_alloc where);
 
 /** Constructor for a Free node.
  *
@@ -4312,8 +4172,8 @@ ir_node *new_Alloc  (ir_node *store, ir_node *size, ir_type *alloc_type,
  * @param *free_type  The type of the freed variable.
  * @param where       Where the variable was allocated, either heap_alloc or stack_alloc.
  */
-ir_node *new_Free   (ir_node *store, ir_node *ptr, ir_node *size,
-                            ir_type *free_type, ir_where_alloc where);
+ir_node *new_Free(ir_node *store, ir_node *ptr, ir_node *size,
+                  ir_type *free_type, ir_where_alloc where);
 
 /** Constructor for a Sync node.
  *
@@ -4326,7 +4186,7 @@ ir_node *new_Free   (ir_node *store, ir_node *ptr, ir_node *size,
  * @param  **in     An array of pointers to nodes that produce an output of type
  *                  memory.  The constructor copies this array.
  */
-ir_node *new_Sync   (int arity, ir_node *in[]);
+ir_node *new_Sync(int arity, ir_node *in[]);
 
 /** Constructor for a Proj node.
  *
@@ -4338,7 +4198,7 @@ ir_node *new_Sync   (int arity, ir_node *in[]);
  * @param *mode  The mode of the value to project.
  * @param proj   The position of the value in the tuple.
  */
-ir_node *new_Proj   (ir_node *arg, ir_mode *mode, long proj);
+ir_node *new_Proj(ir_node *arg, ir_mode *mode, long proj);
 
 /** Constructor for a Filter node.
  *
@@ -4355,7 +4215,7 @@ ir_node *new_Proj   (ir_node *arg, ir_mode *mode, long proj);
  * @param *mode The mode of the projected value.
  * @param proj  The position in the tuple to project from.
  */
-ir_node *new_Filter (ir_node *arg, ir_mode *mode, long proj);
+ir_node *new_Filter(ir_node *arg, ir_mode *mode, long proj);
 
 /** Constructor for a defaultProj node.
  *
@@ -4365,7 +4225,7 @@ ir_node *new_Filter (ir_node *arg, ir_mode *mode, long proj);
  * @param arg       A node producing a tuple.
  * @param max_proj  The end  position of the value in the tuple.
  */
-ir_node *new_defaultProj (ir_node *arg, long max_proj);
+ir_node *new_defaultProj(ir_node *arg, long max_proj);
 
 /** Constructor for a Tuple node.
  *
@@ -4376,7 +4236,7 @@ ir_node *new_defaultProj (ir_node *arg, long max_proj);
  * @param arity   The number of tuple elements.
  * @param **in    An array containing pointers to the nodes producing the tuple elements.
  */
-ir_node *new_Tuple  (int arity, ir_node *in[]);
+ir_node *new_Tuple(int arity, ir_node *in[]);
 
 /** Constructor for an Id node.
  *
@@ -4386,14 +4246,14 @@ ir_node *new_Tuple  (int arity, ir_node *in[]);
  * @param *val    The operand to Id.
  * @param *mode   The mode of *val.
  */
-ir_node *new_Id     (ir_node *val, ir_mode *mode);
+ir_node *new_Id(ir_node *val, ir_mode *mode);
 
 /** Constructor for a Bad node.
  *
  * Returns the unique Bad node of the graph.  The same as
  * get_irg_bad().
  */
-ir_node *new_Bad    (void);
+ir_node *new_Bad(void);
 
 /** Constructor for a Confirm node.
  *
@@ -4407,7 +4267,7 @@ ir_node *new_Bad    (void);
  * @param *bound  The value to compare against. Must be a firm node, typically a constant.
  * @param cmp     The compare operation.
  */
-ir_node *new_Confirm (ir_node *val, ir_node *bound, pn_Cmp cmp);
+ir_node *new_Confirm(ir_node *val, ir_node *bound, pn_Cmp cmp);
 
 /** Constructor for an Unknown node.
  *
@@ -4423,7 +4283,7 @@ ir_node *new_Unknown(ir_mode *m);
  * Returns the unique NoMem node of the graph.  The same as
  * get_irg_no_mem().
  */
-ir_node *new_NoMem  (void);
+ir_node *new_NoMem(void);
 
 /** Constructor for a Mux node.
  *
@@ -4434,7 +4294,7 @@ ir_node *new_NoMem  (void);
  * @param *ir_false The ir_node that calculates the false result.
  * @param *mode     The mode of the node (and it_true and ir_false).
  */
-ir_node *new_Mux  (ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode);
+ir_node *new_Mux(ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode);
 
 /** Constructor for a CopyB node.
  *
@@ -4456,7 +4316,7 @@ ir_node *new_CopyB(ir_node *store, ir_node *dst, ir_node *src, ir_type *data_typ
  * @param   *objptr    A pointer to a object of a class type.
  * @param   *type      The type of which objptr must be.
  */
-ir_node *new_InstOf (ir_node *store, ir_node *objptr, ir_type *type);
+ir_node *new_InstOf(ir_node *store, ir_node *objptr, ir_type *type);
 
 /**Constructor for a Raise node.
  *
@@ -4465,7 +4325,7 @@ ir_node *new_InstOf (ir_node *store, ir_node *objptr, ir_type *type);
  * @param *store The current memory.
  * @param *obj   A pointer to the Except variable.
  */
-ir_node *new_Raise  (ir_node *store, ir_node *obj);
+ir_node *new_Raise(ir_node *store, ir_node *obj);
 
 /** Constructor for a Bound node.
  *
@@ -4478,13 +4338,13 @@ ir_node *new_Raise  (ir_node *store, ir_node *obj);
  * @param *lower      The ir_node that represents the lower bound for the index.
  * @param *upper      The ir_node that represents the upper bound for the index.
  */
-ir_node *new_Bound  (ir_node *store, ir_node *idx, ir_node *lower, ir_node *upper);
+ir_node *new_Bound(ir_node *store, ir_node *idx, ir_node *lower, ir_node *upper);
 
 /** Constructor for a Pin node.
  *
  * @param *node       The node which value should be pinned.
  */
-ir_node *new_Pin    (ir_node *node);
+ir_node *new_Pin(ir_node *node);
 
 /** Constructor for an ASM pseudo node.
  *
index ceb4c87..c8986f3 100644 (file)
@@ -225,7 +225,7 @@ static void handle_modeb(ir_node *block, ir_node *selector, pn_Cond pnc, env_t *
                                        else
                                                in[i] = c_o;
                                }
-                               phi = new_r_Phi(current_ir_graph, user_blk, n, in, mode_b);
+                               phi = new_r_Phi(user_blk, n, in, mode_b);
                                set_irn_n(user, pos, phi);
                        }
                }
@@ -344,7 +344,7 @@ static void handle_if(ir_node *block, ir_node *cmp, pn_Cmp pnc, env_t *env) {
                                 * We can replace the input with a Confirm(left, pnc, right).
                                 */
                                if (! c)
-                                       c = new_r_Confirm(current_ir_graph, block, left, right, pnc);
+                                       c = new_r_Confirm(block, left, right, pnc);
 
                                pos = get_edge_src_pos(edge);
                                set_irn_n(succ, pos, c);
@@ -377,7 +377,7 @@ static void handle_if(ir_node *block, ir_node *cmp, pn_Cmp pnc, env_t *env) {
                                         * We can replace the input with a Confirm(right, pnc^-1, left).
                                         */
                                        if (! rc)
-                                               rc = new_r_Confirm(current_ir_graph, block, right, left, pnc);
+                                               rc = new_r_Confirm(block, right, left, pnc);
 
                                        pos = get_edge_src_pos(edge);
                                        set_irn_n(succ, pos, rc);
@@ -509,7 +509,7 @@ static void insert_non_null(ir_node *ptr, ir_node *block, env_t *env) {
                                ir_mode *mode = get_irn_mode(ptr);
                                c = new_Const(get_mode_null(mode));
 
-                               c = new_r_Confirm(current_ir_graph, block, ptr, c, pn_Cmp_Lg);
+                               c = new_r_Confirm(block, ptr, c, pn_Cmp_Lg);
                        }
 
                        set_irn_n(succ, pos, c);
index 1c37358..a442fdd 100644 (file)
@@ -1275,7 +1275,6 @@ static ir_type *clone_type_and_cache(ir_type *tp) {
 
        res = clone_type_method(tp, prefix);
        pmap_insert(mtp_map, tp, res);
-       DB((dbgcall, LEVEL_2, "cloned type %+F into %+F\n", tp, res));
 
        return res;
 }  /* clone_type_and_cache */
@@ -1298,7 +1297,7 @@ static void update_calls_to_private(ir_node *call, void *env) {
                                        ctp = clone_type_and_cache(ctp);
                                        set_method_additional_property(ctp, mtp_property_private);
                                        set_Call_type(call, ctp);
-                                       DB((dbgcall, LEVEL_1, "changed call to private method %+F\n", ent));
+                                       DB((dbgcall, LEVEL_1, "changed call to private method %+F using cloned type %+F\n", ent, ctp));
                                }
                        }
                }
@@ -1332,8 +1331,9 @@ void mark_private_methods(void) {
                        if ((get_method_additional_properties(mtp) & mtp_property_private) == 0) {
                                /* need a new type */
                                mtp = clone_type_and_cache(mtp);
-                               set_entity_type(ent, mtp);
                                set_method_additional_property(mtp, mtp_property_private);
+                               set_entity_type(ent, mtp);
+                               DB((dbgcall, LEVEL_2, "changed entity type of %+F to %+F\n", ent, mtp));
                                changed = 1;
                        }
                }
index fe90fb4..06ab7d3 100644 (file)
@@ -114,7 +114,7 @@ ir_region *get_irn_region(ir_node *n) {
 }
 
 /**
- * Return non-if a given firm thing is a region.
+ * Return non-zero if a given firm thing is a region.
  */
 int is_region(const void *thing) {
        const firm_kind *kind = thing;
@@ -122,7 +122,7 @@ int is_region(const void *thing) {
 }
 
 /**
- * Return the number of predecessors in a region.
+ * Return the number of predecessors of a region.
  */
 int get_region_n_preds(const ir_region *reg) {
        return ARR_LEN(reg->pred);
@@ -171,13 +171,13 @@ void set_region_succ(ir_region *reg, int pos, ir_region *n) {
 
 /** Walker environment. */
 typedef struct walk_env {
-       struct obstack *obst;  /**< an obstack to allocate from. */
+       struct obstack *obst;  /**< An obstack to allocate from. */
        ir_region **post;      /**< The list of all currently existent top regions. */
-       unsigned l_post;       /**< length of the allocated regions array. */
+       unsigned l_post;       /**< The length of the allocated regions array. */
        unsigned premax;       /**< maximum pre counter */
        unsigned postmax;      /**< maximum post counter */
-       ir_node *start_block;  /**< the start block of the graph. */
-       ir_node *end_block;    /**< the end block of the graph. */
+       ir_node *start_block;  /**< The start block of the graph. */
+       ir_node *end_block;    /**< The end block of the graph. */
 } walk_env;
 
 /**
@@ -248,7 +248,7 @@ static void wrap_BasicBlocks(ir_node *block, void *ctx) {
 }  /* wrap_BasicBlocks */
 
 /**
- * Create the pred and succ edges for Block wrapper.
+ * Post-walker: Create the pred and succ edges for Block wrapper.
  * Kill edges to the Start and End blocks.
  */
 static void update_BasicBlock_regions(ir_node *blk, void *ctx) {
@@ -257,7 +257,7 @@ static void update_BasicBlock_regions(ir_node *blk, void *ctx) {
        int i, j, len;
 
        if (blk == env->start_block) {
-               /* handle Firm's self loop */
+               /* handle Firm's self loop: Start block has no predecessors */
                reg->pred = NEW_ARR_D(ir_region *, env->obst, 0);
        } else {
                len = get_Block_n_cfgpreds(blk);
@@ -278,7 +278,7 @@ static void update_BasicBlock_regions(ir_node *blk, void *ctx) {
        ARR_SHRINKLEN(reg->succ, j);
 }  /* update_BasicBlock_regions */
 
-/** Allocate a new region of a obstack */
+/** Allocate a new region on an obstack */
 #define ALLOC_REG(obst, reg, tp) \
        do { \
                (reg)          = obstack_alloc((obst), sizeof(*(reg))); \
@@ -597,14 +597,14 @@ static ir_region *new_NaturalLoop(struct obstack *obst, ir_region *head) {
 }  /* new_NaturalLoop */
 
 /**
- * Return true if a is an ancestor of b in DFS search.
+ * Return true if region a is an ancestor of region b in DFS search.
  */
 static int is_ancestor(const ir_region *a, const ir_region *b) {
        return (a->prenum <= b->prenum && a->postnum > b->postnum);
 }
 
 /**
- *  Return true if region pred is a predecessor of region n.
+ * Return true if region pred is a predecessor of region n.
  */
 static int pred_of(const ir_region *pred, const ir_region *n) {
        int i;
@@ -616,7 +616,7 @@ static int pred_of(const ir_region *pred, const ir_region *n) {
 }
 
 /**
- *  Return true if region succ is a successor of region n.
+ * Return true if region succ is a successor of region n.
  */
 static int succ_of(const ir_region *succ, const ir_region *n) {
        int i;
@@ -628,7 +628,7 @@ static int succ_of(const ir_region *succ, const ir_region *n) {
 }
 
 /**
- *  Reverse linked list.
+ * Reverse a linked list of regions.
  */
 static struct ir_region *reverse_list(ir_region *n) {
        ir_region *prev = NULL, *next;
@@ -719,7 +719,7 @@ static ir_region *cyclic_region_type(struct obstack *obst, ir_region *node) {
 }
 
 /**
- * Clear all links on a list. Needed, because we expect cleared links-
+ * Clear all links on a list. Needed, because we expect cleared links.
  */
 static void clear_list(ir_region *list) {
        ir_region *next;
@@ -977,7 +977,7 @@ static void reduce(walk_env *env, ir_region *reg) {
                replace_pred(succ, reg);
        }
 
-       /* second third: replace all succs in predessors */
+       /* third step: replace all succs in predessors */
        for (i = get_region_n_preds(reg) - 1; i >= 0; --i) {
                ir_region *pred = get_region_pred(reg, i);
 
@@ -1038,7 +1038,7 @@ ir_reg_tree *construct_region_tree(ir_graph *irg) {
                do {
                        ir_region *reg, *n = env.post[postctr];
                        do {
-                               if (n->parent) {
+                               if (n->parent != NULL) {
                                        /* already folded */
                                        break;
                                }
index 883c03b..3bbd683 100644 (file)
@@ -114,7 +114,6 @@ static int allowed_arm_immediate(int offset, arm_vals *result) {
  * Fix an IncSP node if the offset gets too big
  */
 static void peephole_be_IncSP(ir_node *node) {
-       ir_graph *irg;
        ir_node  *block;
        int      offset, cnt, align, sign = 1;
        arm_vals v;
@@ -133,12 +132,11 @@ static void peephole_be_IncSP(ir_node *node) {
 
        be_set_IncSP_offset(node, (int)arm_rol(v.values[0], v.shifts[0]) * sign);
 
-       irg   = current_ir_graph;
        block = get_nodes_block(node);
        align = be_get_IncSP_align(node);
        for (cnt = 1; cnt < v.ops; ++cnt) {
                int value = (int)arm_rol(v.values[cnt], v.shifts[cnt]);
-               ir_node *next = be_new_IncSP(&arm_gp_regs[REG_SP], irg, block, node, value * sign, align);
+               ir_node *next = be_new_IncSP(&arm_gp_regs[REG_SP], block, node, value * sign, align);
                sched_add_after(node, next);
                node = next;
        }
@@ -252,7 +250,6 @@ static void peephole_be_Reload(ir_node *node) {
        ir_node   *block, *ptr, *frame, *load, *mem, *proj;
        ir_mode   *mode;
        dbg_info  *dbg;
-       ir_graph  *irg;
        arm_vals  v;
        const arch_register_t *reg;
 
@@ -273,7 +270,6 @@ static void peephole_be_Reload(ir_node *node) {
        reg   = arch_get_irn_register(node);
        mem   = be_get_Reload_mem(node);
        mode  = get_irn_mode(node);
-       irg   = current_ir_graph;
        dbg   = get_irn_dbg_info(node);
        block = get_nodes_block(node);
 
@@ -282,7 +278,7 @@ static void peephole_be_Reload(ir_node *node) {
                        /* transform into fpaLdf */
                        load = new_bd_arm_fpaLdf(dbg, block, ptr, mem, mode);
                        sched_add_before(node, load);
-                       proj = new_rd_Proj(dbg, irg, block, load, mode, pn_arm_fpaLdf_res);
+                       proj = new_rd_Proj(dbg, block, load, mode, pn_arm_fpaLdf_res);
                        arch_set_irn_register(proj, reg);
                } else {
                        panic("peephole_be_Spill: spill not supported for this mode");
@@ -291,7 +287,7 @@ static void peephole_be_Reload(ir_node *node) {
                /* transform into Store */;
                load = new_bd_arm_Load(dbg, block, ptr, mem);
                sched_add_before(node, load);
-               proj = new_rd_Proj(dbg, irg, block, load, mode_Iu, pn_arm_Load_res);
+               proj = new_rd_Proj(dbg, block, load, mode_Iu, pn_arm_Load_res);
                arch_set_irn_register(proj, reg);
        } else {
                panic("peephole_be_Spill: spill not supported for this mode");
index bbd52a5..cb4dda8 100644 (file)
@@ -855,8 +855,8 @@ static ir_node *gen_Load(ir_node *node) {
                ir_graph *irg = current_ir_graph;
 
                /* add a result proj and a Keep to produce a pseudo use */
-               ir_node *proj = new_r_Proj(irg, block, new_load, mode_Iu, pn_arm_Load_res);
-               be_new_Keep(arch_get_irn_reg_class_out(proj), irg, block, 1, &proj);
+               ir_node *proj = new_r_Proj(block, new_load, mode_Iu, pn_arm_Load_res);
+               be_new_Keep(arch_get_irn_reg_class_out(proj), block, 1, &proj);
        }
 
        return new_load;
@@ -1111,8 +1111,8 @@ static ir_node *gen_CopyB(ir_node *node) {
        ir_node  *src_copy;
        ir_node  *dst_copy;
 
-       src_copy = be_new_Copy(&arm_reg_classes[CLASS_arm_gp], irg, block, new_src);
-       dst_copy = be_new_Copy(&arm_reg_classes[CLASS_arm_gp], irg, block, new_dst);
+       src_copy = be_new_Copy(&arm_reg_classes[CLASS_arm_gp], block, new_src);
+       dst_copy = be_new_Copy(&arm_reg_classes[CLASS_arm_gp], block, new_dst);
 
        return new_bd_arm_CopyB(dbg, block, dst_copy, src_copy,
                        new_bd_arm_EmptyReg(dbg, block, mode_Iu),
@@ -1274,7 +1274,6 @@ static ir_node *gen_Proj_Load(ir_node *node) {
        ir_node  *block    = be_transform_node(get_nodes_block(node));
        ir_node  *load     = get_Proj_pred(node);
        ir_node  *new_load = be_transform_node(load);
-       ir_graph *irg      = current_ir_graph;
        dbg_info *dbgi     = get_irn_dbg_info(node);
        long     proj      = get_Proj_proj(node);
 
@@ -1287,17 +1286,17 @@ static ir_node *gen_Proj_Load(ir_node *node) {
        case iro_arm_Loadhs:
                /* handle all gp loads equal: they have the same proj numbers. */
                if (proj == pn_Load_res) {
-                       return new_rd_Proj(dbgi, irg, block, new_load, mode_Iu, pn_arm_Load_res);
+                       return new_rd_Proj(dbgi, block, new_load, mode_Iu, pn_arm_Load_res);
                } else if (proj == pn_Load_M) {
-                       return new_rd_Proj(dbgi, irg, block, new_load, mode_M, pn_arm_Load_M);
+                       return new_rd_Proj(dbgi, block, new_load, mode_M, pn_arm_Load_M);
                }
                break;
        case iro_arm_fpaLdf:
                if (proj == pn_Load_res) {
                        ir_mode *mode = get_Load_mode(load);
-                       return new_rd_Proj(dbgi, irg, block, new_load, mode, pn_arm_fpaLdf_res);
+                       return new_rd_Proj(dbgi, block, new_load, mode, pn_arm_fpaLdf_res);
                } else if (proj == pn_Load_M) {
-                       return new_rd_Proj(dbgi, irg, block, new_load, mode_M, pn_arm_fpaLdf_M);
+                       return new_rd_Proj(dbgi, block, new_load, mode_M, pn_arm_fpaLdf_M);
                }
                break;
        default:
@@ -1313,14 +1312,13 @@ static ir_node *gen_Proj_CopyB(ir_node *node) {
        ir_node  *block    = be_transform_node(get_nodes_block(node));
        ir_node  *pred     = get_Proj_pred(node);
        ir_node  *new_pred = be_transform_node(pred);
-       ir_graph *irg      = current_ir_graph;
        dbg_info *dbgi     = get_irn_dbg_info(node);
        long     proj      = get_Proj_proj(node);
 
        switch(proj) {
        case pn_CopyB_M_regular:
                if (is_arm_CopyB(new_pred)) {
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_arm_CopyB_M);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_M, pn_arm_CopyB_M);
                }
                break;
        default:
@@ -1336,7 +1334,6 @@ static ir_node *gen_Proj_Quot(ir_node *node) {
        ir_node  *block    = be_transform_node(get_nodes_block(node));
        ir_node  *pred     = get_Proj_pred(node);
        ir_node  *new_pred = be_transform_node(pred);
-       ir_graph *irg      = current_ir_graph;
        dbg_info *dbgi     = get_irn_dbg_info(node);
        ir_mode  *mode     = get_irn_mode(node);
        long     proj      = get_Proj_proj(node);
@@ -1344,24 +1341,24 @@ static ir_node *gen_Proj_Quot(ir_node *node) {
        switch (proj) {
        case pn_Quot_M:
                if (is_arm_fpaDvf(new_pred) || is_arm_fpaDvf_i(new_pred)) {
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_arm_fpaDvf_M);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_M, pn_arm_fpaDvf_M);
                } else if (is_arm_fpaRdf(new_pred) || is_arm_fpaRdf_i(new_pred)) {
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_arm_fpaRdf_M);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_M, pn_arm_fpaRdf_M);
                } else if (is_arm_fpaFdv(new_pred) || is_arm_fpaFdv_i(new_pred)) {
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_arm_fpaFdv_M);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_M, pn_arm_fpaFdv_M);
                } else if (is_arm_fpaFrd(new_pred) || is_arm_fpaFrd_i(new_pred)) {
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_arm_fpaFrd_M);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_M, pn_arm_fpaFrd_M);
                }
                break;
        case pn_Quot_res:
                if (is_arm_fpaDvf(new_pred) || is_arm_fpaDvf_i(new_pred)) {
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode, pn_arm_fpaDvf_res);
+                       return new_rd_Proj(dbgi, block, new_pred, mode, pn_arm_fpaDvf_res);
                } else if (is_arm_fpaRdf(new_pred) || is_arm_fpaRdf_i(new_pred)) {
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode, pn_arm_fpaRdf_res);
+                       return new_rd_Proj(dbgi, block, new_pred, mode, pn_arm_fpaRdf_res);
                } else if (is_arm_fpaFdv(new_pred) || is_arm_fpaFdv_i(new_pred)) {
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode, pn_arm_fpaFdv_res);
+                       return new_rd_Proj(dbgi, block, new_pred, mode, pn_arm_fpaFdv_res);
                } else if (is_arm_fpaFrd(new_pred) || is_arm_fpaFrd_i(new_pred)) {
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode, pn_arm_fpaFrd_res);
+                       return new_rd_Proj(dbgi, block, new_pred, mode, pn_arm_fpaFrd_res);
                }
                break;
        default:
@@ -1377,20 +1374,18 @@ static ir_node *gen_Proj_be_AddSP(ir_node *node) {
        ir_node  *block    = be_transform_node(get_nodes_block(node));
        ir_node  *pred     = get_Proj_pred(node);
        ir_node  *new_pred = be_transform_node(pred);
-       ir_graph *irg      = current_ir_graph;
        dbg_info *dbgi     = get_irn_dbg_info(node);
        long     proj      = get_Proj_proj(node);
 
        if (proj == pn_be_AddSP_sp) {
-               ir_node *res = new_rd_Proj(dbgi, irg, block, new_pred, mode_Iu,
+               ir_node *res = new_rd_Proj(dbgi, block, new_pred, mode_Iu,
                                           pn_arm_SubSPandCopy_stack);
                arch_set_irn_register(res, &arm_gp_regs[REG_SP]);
                return res;
        } else if(proj == pn_be_AddSP_res) {
-               return new_rd_Proj(dbgi, irg, block, new_pred, mode_Iu,
-                                  pn_arm_SubSPandCopy_addr);
+               return new_rd_Proj(dbgi, block, new_pred, mode_Iu, pn_arm_SubSPandCopy_addr);
        } else if (proj == pn_be_AddSP_M) {
-               return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_arm_SubSPandCopy_M);
+               return new_rd_Proj(dbgi, block, new_pred, mode_M, pn_arm_SubSPandCopy_M);
        }
        panic("Unsupported Proj from AddSP");
 }
@@ -1402,17 +1397,16 @@ static ir_node *gen_Proj_be_SubSP(ir_node *node) {
        ir_node  *block    = be_transform_node(get_nodes_block(node));
        ir_node  *pred     = get_Proj_pred(node);
        ir_node  *new_pred = be_transform_node(pred);
-       ir_graph *irg      = current_ir_graph;
        dbg_info *dbgi     = get_irn_dbg_info(node);
        long     proj      = get_Proj_proj(node);
 
        if (proj == pn_be_SubSP_sp) {
-               ir_node *res = new_rd_Proj(dbgi, irg, block, new_pred, mode_Iu,
+               ir_node *res = new_rd_Proj(dbgi, block, new_pred, mode_Iu,
                                           pn_arm_AddSP_stack);
                arch_set_irn_register(res, &arm_gp_regs[REG_SP]);
                return res;
        } else if (proj == pn_be_SubSP_M) {
-               return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_arm_AddSP_M);
+               return new_rd_Proj(dbgi,  block, new_pred, mode_M, pn_arm_AddSP_M);
        }
        panic("Unsupported Proj from SubSP");
 }
@@ -1470,7 +1464,7 @@ static ir_node *gen_Proj(ir_node *node) {
 
                        /* we exchange the ProjX with a jump */
                        block = be_transform_node(block);
-                       jump  = new_rd_Jmp(dbgi, irg, block);
+                       jump  = new_rd_Jmp(dbgi, block);
                        return jump;
                }
                if (node == get_irg_anchor(irg, anchor_tls)) {
@@ -1481,7 +1475,7 @@ static ir_node *gen_Proj(ir_node *node) {
                ir_mode *mode     = get_irn_mode(node);
                if (mode_needs_gp_reg(mode)) {
                        ir_node *block    = be_transform_node(get_nodes_block(node));
-                       ir_node *new_proj = new_r_Proj(irg, block, new_pred, mode_Iu,
+                       ir_node *new_proj = new_r_Proj(block, new_pred, mode_Iu,
                                                       get_Proj_proj(node));
                        new_proj->node_nr = node->node_nr;
                        return new_proj;
index 3f12b5f..49f0226 100644 (file)
@@ -302,9 +302,9 @@ static ir_node *convert_dbl_to_int(ir_node *bl, ir_node *arg, ir_node *mem,
 
                conv = new_bd_arm_fpaDbl2GP(NULL, bl, arg, mem);
                /* move high/low */
-               *resL = new_r_Proj(irg, bl, conv, mode_Is, pn_arm_fpaDbl2GP_low);
-               *resH = new_r_Proj(irg, bl, conv, mode_Is, pn_arm_fpaDbl2GP_high);
-               mem   = new_r_Proj(irg, bl, conv, mode_M,  pn_arm_fpaDbl2GP_M);
+               *resL = new_r_Proj(bl, conv, mode_Is, pn_arm_fpaDbl2GP_low);
+               *resH = new_r_Proj(bl, conv, mode_Is, pn_arm_fpaDbl2GP_high);
+               mem   = new_r_Proj(bl, conv, mode_M,  pn_arm_fpaDbl2GP_M);
        }
        return mem;
 }
@@ -836,15 +836,15 @@ static const arch_register_t *arm_abi_prologue(void *self, ir_node **mem, pmap *
                                     arch_register_req_type_ignore);
 
        /* copy SP to IP (so we can spill it */
-       ip = be_new_Copy(gp, irg, block, sp);
+       ip = be_new_Copy(gp, block, sp);
        be_set_constr_single_reg_out(ip, 0, &arm_gp_regs[REG_R12], 0);
 
        /* spill stuff */
        store = new_bd_arm_StoreStackM4Inc(NULL, block, sp, fp, ip, lr, pc, *mem);
 
-       sp = new_r_Proj(irg, block, store, env->arch_env->sp->reg_class->mode, pn_arm_StoreStackM4Inc_ptr);
+       sp = new_r_Proj(block, store, env->arch_env->sp->reg_class->mode, pn_arm_StoreStackM4Inc_ptr);
        arch_set_irn_register(sp, env->arch_env->sp);
-       *mem = new_r_Proj(irg, block, store, mode_M, pn_arm_StoreStackM4Inc_M);
+       *mem = new_r_Proj(block, store, mode_M, pn_arm_StoreStackM4Inc_M);
 
        /* frame pointer is ip-4 (because ip is our old sp value) */
        fp = new_bd_arm_Sub_i(NULL, block, ip, get_irn_mode(fp), 4);
@@ -856,7 +856,7 @@ static const arch_register_t *arm_abi_prologue(void *self, ir_node **mem, pmap *
         * to extract this order from register requirements) */
        add_irn_dep(fp, store);
 
-       fp = be_new_Copy(gp, irg, block, fp); // XXX Gammelfix: only be_ have custom register requirements
+       fp = be_new_Copy(gp, block, fp); // XXX Gammelfix: only be_ have custom register requirements
        be_set_constr_single_reg_out(fp, 0, env->arch_env->bp,
                                     arch_register_req_type_ignore);
        arch_set_irn_register(fp, env->arch_env->bp);
@@ -882,22 +882,22 @@ static void arm_abi_epilogue(void *self, ir_node *bl, ir_node **mem, pmap *reg_m
 
        // TODO: Activate Omit fp in epilogue
        if (env->flags.try_omit_fp) {
-               curr_sp = be_new_IncSP(env->arch_env->sp, env->irg, bl, curr_sp, BE_STACK_FRAME_SIZE_SHRINK, 0);
+               curr_sp = be_new_IncSP(env->arch_env->sp, bl, curr_sp, BE_STACK_FRAME_SIZE_SHRINK, 0);
 
-               curr_lr = be_new_CopyKeep_single(&arm_reg_classes[CLASS_arm_gp], env->irg, bl, curr_lr, curr_sp, get_irn_mode(curr_lr));
+               curr_lr = be_new_CopyKeep_single(&arm_reg_classes[CLASS_arm_gp], bl, curr_lr, curr_sp, get_irn_mode(curr_lr));
                be_set_constr_single_reg_out(curr_lr, 0, &arm_gp_regs[REG_LR], 0);
 
-               curr_pc = be_new_Copy(&arm_reg_classes[CLASS_arm_gp], env->irg, bl, curr_lr );
+               curr_pc = be_new_Copy(&arm_reg_classes[CLASS_arm_gp], bl, curr_lr );
                be_set_constr_single_reg_out(curr_pc, BE_OUT_POS(0), &arm_gp_regs[REG_PC], 0);
        } else {
                ir_node *load_node;
 
                load_node = new_bd_arm_LoadStackM3Epilogue(NULL, bl, curr_bp, *mem);
 
-               curr_bp = new_r_Proj(env->irg, bl, load_node, env->arch_env->bp->reg_class->mode, pn_arm_LoadStackM3Epilogue_res0);
-               curr_sp = new_r_Proj(env->irg, bl, load_node, env->arch_env->sp->reg_class->mode, pn_arm_LoadStackM3Epilogue_res1);
-               curr_pc = new_r_Proj(env->irg, bl, load_node, mode_Iu, pn_arm_LoadStackM3Epilogue_res2);
-               *mem    = new_r_Proj(env->irg, bl, load_node, mode_M, pn_arm_LoadStackM3Epilogue_M);
+               curr_bp = new_r_Proj(bl, load_node, env->arch_env->bp->reg_class->mode, pn_arm_LoadStackM3Epilogue_res0);
+               curr_sp = new_r_Proj(bl, load_node, env->arch_env->sp->reg_class->mode, pn_arm_LoadStackM3Epilogue_res1);
+               curr_pc = new_r_Proj(bl, load_node, mode_Iu, pn_arm_LoadStackM3Epilogue_res2);
+               *mem    = new_r_Proj(bl, load_node, mode_M, pn_arm_LoadStackM3Epilogue_M);
                arch_set_irn_register(curr_bp, env->arch_env->bp);
                arch_set_irn_register(curr_sp, env->arch_env->sp);
                arch_set_irn_register(curr_pc, &arm_gp_regs[REG_PC]);
index 519ee9a..ab92ff3 100644 (file)
@@ -501,7 +501,7 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp)
         * to adjust stack alignment for the call.
         */
        if (stack_dir < 0 && !do_seq && !no_alloc) {
-               curr_sp = be_new_IncSP(sp, irg, bl, curr_sp, stack_size, 1);
+               curr_sp = be_new_IncSP(sp, bl, curr_sp, stack_size, 1);
        }
 
        dbgi = get_irn_dbg_info(irn);
@@ -544,7 +544,7 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp)
                         */
                        if (do_seq) {
                                curr_ofs = 0;
-                               addr = curr_sp = be_new_IncSP(sp, irg, bl, curr_sp, param_size + arg->space_before, 0);
+                               addr = curr_sp = be_new_IncSP(sp, bl, curr_sp, param_size + arg->space_before, 0);
                                add_irn_dep(curr_sp, curr_mem);
                        }
                        else {
@@ -558,7 +558,7 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp)
                                                constmode = mode_Is;
                                        }
                                        addr = new_r_Const_long(irg, constmode, curr_ofs);
-                                       addr = new_r_Add(irg, bl, curr_sp, addr, mach_mode);
+                                       addr = new_r_Add(bl, curr_sp, addr, mach_mode);
                                }
                        }
 
@@ -566,8 +566,8 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp)
                        if (is_atomic_type(param_type)) {
                                ir_node *store;
                                ir_node *mem_input = do_seq ? curr_mem : new_NoMem();
-                               store = new_rd_Store(dbgi, irg, bl, mem_input, addr, param, 0);
-                               mem = new_r_Proj(irg, bl, store, mode_M, pn_Store_M);
+                               store = new_rd_Store(dbgi, bl, mem_input, addr, param, 0);
+                               mem = new_r_Proj(bl, store, mode_M, pn_Store_M);
                        }
 
                        /* Make a mem copy for compound arguments. */
@@ -575,8 +575,8 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp)
                                ir_node *copy;
 
                                assert(mode_is_reference(get_irn_mode(param)));
-                               copy = new_rd_CopyB(dbgi, irg, bl, curr_mem, addr, param, param_type);
-                               mem = new_r_Proj(irg, bl, copy, mode_M, pn_CopyB_M_regular);
+                               copy = new_rd_CopyB(dbgi, bl, curr_mem, addr, param, param_type);
+                               mem = new_r_Proj(bl, copy, mode_M, pn_CopyB_M_regular);
                        }
 
                        curr_ofs += param_size;
@@ -592,7 +592,7 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp)
                /* We need the sync only, if we didn't build the stores sequentially. */
                if (! do_seq) {
                        if (n_stack_params >= 1) {
-                               curr_mem = new_r_Sync(irg, bl, n_stack_params + 1, in);
+                               curr_mem = new_r_Sync(bl, n_stack_params + 1, in);
                        } else {
                                curr_mem = get_Call_mem(irn);
                        }
@@ -706,8 +706,7 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp)
        ARR_APP1(ir_node *, env->calls, low_call);
 
        /* create new stack pointer */
-       curr_sp = new_r_Proj(irg, bl, low_call, get_irn_mode(curr_sp),
-                            pn_be_Call_sp);
+       curr_sp = new_r_Proj(bl, low_call, get_irn_mode(curr_sp), pn_be_Call_sp);
        be_set_constr_single_reg_out(low_call, pn_be_Call_sp, sp,
                        arch_register_req_type_ignore | arch_register_req_type_produces_sp);
        arch_set_irn_register(curr_sp, sp);
@@ -731,7 +730,7 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp)
                if (proj == NULL) {
                        ir_type *res_type = get_method_res_type(call_tp, i);
                        ir_mode *mode     = get_type_mode(res_type);
-                       proj              = new_r_Proj(irg, bl, low_call, mode, pn);
+                       proj              = new_r_Proj(bl, low_call, mode, pn);
                        res_projs[i]      = proj;
                } else {
                        set_Proj_pred(proj, low_call);
@@ -795,7 +794,7 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp)
                obstack_ptr_grow(obst, curr_sp);
 
                foreach_pset_new(&destroyed_regs, reg, iter) {
-                       ir_node *proj = new_r_Proj(irg, bl, low_call, reg->reg_class->mode, curr_res_proj);
+                       ir_node *proj = new_r_Proj(bl, low_call, reg->reg_class->mode, curr_res_proj);
 
                        /* memorize the register in the link field. we need afterwards to set the register class of the keep correctly. */
                        be_set_constr_single_reg_out(low_call, curr_res_proj, reg, 0);
@@ -817,7 +816,7 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp)
 
                /* create the Keep for the caller save registers */
                in   = (ir_node **) obstack_finish(obst);
-               keep = be_new_Keep(NULL, irg, bl, n, in);
+               keep = be_new_Keep(NULL, bl, n, in);
                for (i = 0; i < n; ++i) {
                        const arch_register_t *reg = get_irn_link(in[i]);
                        be_node_set_reg_class_in(keep, i, reg->reg_class);
@@ -841,13 +840,13 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp)
                }
 
                if (! mem_proj) {
-                       mem_proj = new_r_Proj(irg, bl, low_call, mode_M, pn_be_Call_M_regular);
+                       mem_proj = new_r_Proj(bl, low_call, mode_M, pn_be_Call_M_regular);
                        keep_alive(mem_proj);
                }
        }
        /* Clean up the stack frame or revert alignment fixes if we allocated it */
        if (! no_alloc) {
-               curr_sp = be_new_IncSP(sp, irg, bl, curr_sp, -stack_size, 0);
+               curr_sp = be_new_IncSP(sp, bl, curr_sp, -stack_size, 0);
        }
 
        be_abi_call_free(call);
@@ -864,30 +863,31 @@ static ir_node *adjust_call(be_abi_irg_t *env, ir_node *irn, ir_node *curr_sp)
  *
  * @param alignment  the minimum stack alignment
  * @param size       the node containing the non-aligned size
- * @param irg        the irg where new nodes are allocated on
- * @param irg        the block where new nodes are allocated on
+ * @param block      the block where new nodes are allocated on
  * @param dbg        debug info for new nodes
  *
  * @return a node representing the aligned size
  */
 static ir_node *adjust_alloc_size(unsigned stack_alignment, ir_node *size,
-                                  ir_graph *irg, ir_node *block, dbg_info *dbg)
+                                  ir_node *block, dbg_info *dbg)
 {
        if (stack_alignment > 1) {
-               ir_mode *mode;
-               tarval  *tv;
-               ir_node *mask;
+               ir_mode  *mode;
+               tarval   *tv;
+               ir_node  *mask;
+               ir_graph *irg;
 
                assert(is_po2(stack_alignment));
 
                mode = get_irn_mode(size);
                tv   = new_tarval_from_long(stack_alignment-1, mode);
+               irg  = get_Block_irg(block);
                mask = new_r_Const(irg, tv);
-               size = new_rd_Add(dbg, irg, block, size, mask, mode);
+               size = new_rd_Add(dbg, block, size, mask, mode);
 
                tv   = new_tarval_from_long(-(long)stack_alignment, mode);
                mask = new_r_Const(irg, tv);
-               size = new_rd_And(dbg, irg, block, size, mask, mode);
+               size = new_rd_And(dbg, block, size, mask, mode);
        }
        return size;
 }
@@ -911,7 +911,7 @@ static ir_node *adjust_alloc(be_abi_irg_t *env, ir_node *alloc, ir_node *curr_sp
        assert(get_Alloc_where(alloc) == stack_alloc);
 
        block = get_nodes_block(alloc);
-       irg = get_irn_irg(block);
+       irg   = get_Block_irg(block);
        alloc_mem = NULL;
        alloc_res = NULL;
        type = get_Alloc_type(alloc);
@@ -949,7 +949,7 @@ static ir_node *adjust_alloc(be_abi_irg_t *env, ir_node *alloc, ir_node *curr_sp
                tarval *tv    = new_tarval_from_long(get_type_size_bytes(type),
                                                     mode);
                ir_node *cnst = new_rd_Const(dbg, irg, tv);
-               size          = new_rd_Mul(dbg, irg, block, size, cnst, mode);
+               size          = new_rd_Mul(dbg, block, size, cnst, mode);
        }
 
        /* The stack pointer will be modified in an unknown manner.
@@ -957,21 +957,21 @@ static ir_node *adjust_alloc(be_abi_irg_t *env, ir_node *alloc, ir_node *curr_sp
        env->call->flags.bits.try_omit_fp = 0;
 
        stack_alignment = 1 << env->arch_env->stack_alignment;
-       size            = adjust_alloc_size(stack_alignment, size, irg, block, dbg);
-       new_alloc       = be_new_AddSP(env->arch_env->sp, irg, block, curr_sp, size);
+       size            = adjust_alloc_size(stack_alignment, size, block, dbg);
+       new_alloc       = be_new_AddSP(env->arch_env->sp, block, curr_sp, size);
        set_irn_dbg_info(new_alloc, dbg);
 
        if (alloc_mem != NULL) {
                ir_node *addsp_mem;
                ir_node *sync;
 
-               addsp_mem = new_r_Proj(irg, block, new_alloc, mode_M, pn_be_AddSP_M);
+               addsp_mem = new_r_Proj(block, new_alloc, mode_M, pn_be_AddSP_M);
 
                /* We need to sync the output mem of the AddSP with the input mem
                   edge into the alloc node. */
                ins[0] = get_Alloc_mem(alloc);
                ins[1] = addsp_mem;
-               sync = new_r_Sync(irg, block, 2, ins);
+               sync = new_r_Sync(block, 2, ins);
 
                exchange(alloc_mem, sync);
        }
@@ -982,7 +982,7 @@ static ir_node *adjust_alloc(be_abi_irg_t *env, ir_node *alloc, ir_node *curr_sp
        set_Proj_proj(alloc_res, pn_be_AddSP_res);
 
        addr    = alloc_res;
-       curr_sp = new_r_Proj(irg, block, new_alloc,  get_irn_mode(curr_sp),
+       curr_sp = new_r_Proj(block, new_alloc,  get_irn_mode(curr_sp),
                             pn_be_AddSP_sp);
 
        return curr_sp;
@@ -1015,7 +1015,7 @@ static ir_node *adjust_free(be_abi_irg_t *env, ir_node *free, ir_node *curr_sp)
        if (type != firm_unknown_type && get_type_size_bytes(type) != 1) {
                tarval *tv = new_tarval_from_long(get_type_size_bytes(type), mode_Iu);
                ir_node *cnst = new_rd_Const(dbg, irg, tv);
-               ir_node *mul = new_rd_Mul(dbg, irg, block, get_Free_size(free),
+               ir_node *mul = new_rd_Mul(dbg, block, get_Free_size(free),
                                          cnst, mode_Iu);
                size = mul;
        } else {
@@ -1023,21 +1023,21 @@ static ir_node *adjust_free(be_abi_irg_t *env, ir_node *free, ir_node *curr_sp)
        }
 
        stack_alignment = 1 << env->arch_env->stack_alignment;
-       size            = adjust_alloc_size(stack_alignment, size, irg, block, dbg);
+       size            = adjust_alloc_size(stack_alignment, size, block, dbg);
 
        /* The stack pointer will be modified in an unknown manner.
           We cannot omit it. */
        env->call->flags.bits.try_omit_fp = 0;
-       subsp = be_new_SubSP(env->arch_env->sp, irg, block, curr_sp, size);
+       subsp = be_new_SubSP(env->arch_env->sp, block, curr_sp, size);
        set_irn_dbg_info(subsp, dbg);
 
-       mem = new_r_Proj(irg, block, subsp, mode_M, pn_be_SubSP_M);
-       res = new_r_Proj(irg, block, subsp, sp_mode, pn_be_SubSP_sp);
+       mem = new_r_Proj(block, subsp, mode_M, pn_be_SubSP_M);
+       res = new_r_Proj(block, subsp, sp_mode, pn_be_SubSP_sp);
 
        /* we need to sync the memory */
        in[0] = get_Free_mem(free);
        in[1] = mem;
-       sync = new_r_Sync(irg, block, 2, in);
+       sync = new_r_Sync(block, 2, in);
 
        /* and make the AddSP dependent on the former memory */
        add_irn_dep(subsp, get_Free_mem(free));
@@ -1209,8 +1209,7 @@ static void process_ops_in_block(ir_node *bl, void *data)
                if (curr_sp != env->init_sp &&
                    !(is_Proj(curr_sp) && be_is_Call(get_Proj_pred(curr_sp)))) {
                        nodes[0] = curr_sp;
-                       keep     = be_new_Keep(env->arch_env->sp->reg_class,
-                                              get_irn_irg(bl), bl, 1, nodes);
+                       keep     = be_new_Keep(env->arch_env->sp->reg_class, bl, 1, nodes);
                        pmap_insert(env->keep_map, bl, keep);
                }
        }
@@ -1352,7 +1351,7 @@ static ir_node *create_barrier(be_abi_irg_t *env, ir_node *bl, ir_node **mem, pm
        }
 
        in = (ir_node **) obstack_finish(&env->obst);
-       irn = be_new_Barrier(irg, bl, n, in);
+       irn = be_new_Barrier(bl, n, in);
        obstack_free(&env->obst, in);
 
        for (n = 0; n < n_regs; ++n) {
@@ -1371,7 +1370,7 @@ static ir_node *create_barrier(be_abi_irg_t *env, ir_node *bl, ir_node **mem, pm
                                add_type |= arch_register_req_type_produces_sp;
                }
 
-               proj = new_r_Proj(irg, bl, irn, get_irn_mode(pred), n);
+               proj = new_r_Proj(bl, irn, get_irn_mode(pred), n);
                be_node_set_reg_class_in(irn, n, reg->reg_class);
                if (in_req)
                        be_set_constr_single_reg_in(irn, n, reg, 0);
@@ -1382,7 +1381,7 @@ static ir_node *create_barrier(be_abi_irg_t *env, ir_node *bl, ir_node **mem, pm
        }
 
        if (mem) {
-               *mem = new_r_Proj(irg, bl, irn, mode_M, n);
+               *mem = new_r_Proj(bl, irn, mode_M, n);
        }
 
        obstack_free(&env->obst, rm);
@@ -1589,7 +1588,7 @@ static void lower_frame_sels_walker(ir_node *irn, void *data)
                                ent = get_argument_entity(ent, ctx);
                        }
 
-                       nw = be_new_FrameAddr(ctx->sp_class, current_ir_graph, bl, ctx->frame, ent);
+                       nw = be_new_FrameAddr(ctx->sp_class, bl, ctx->frame, ent);
                        exchange(irn, nw);
 
                        /* check, if it's a param Sel and if have not seen this entity before */
@@ -1662,7 +1661,7 @@ static void fix_address_of_parameter_access(be_abi_irg_t *env, ent_pos_pair *val
 
                save_optimization_state(&state);
                set_optimize(0);
-               nmem = new_r_Proj(irg, start_bl, get_irg_start(irg), mode_M, pn_Start_M);
+               nmem = new_r_Proj(start_bl, get_irg_start(irg), mode_M, pn_Start_M);
                restore_optimization_state(&state);
 
                /* reroute all edges to the new memory source */
@@ -1679,14 +1678,14 @@ static void fix_address_of_parameter_access(be_abi_irg_t *env, ent_pos_pair *val
                        ir_node *addr;
 
                        /* address for the backing store */
-                       addr = be_new_FrameAddr(env->arch_env->sp->reg_class, irg, first_bl, frame, entry->ent);
+                       addr = be_new_FrameAddr(env->arch_env->sp->reg_class, first_bl, frame, entry->ent);
 
                        if (store)
-                               mem = new_r_Proj(irg, first_bl, store, mode_M, pn_Store_M);
+                               mem = new_r_Proj(first_bl, store, mode_M, pn_Store_M);
 
                        /* the backing store itself */
-                       store = new_r_Store(irg, first_bl, mem, addr,
-                                           new_r_Proj(irg, args_bl, args, mode, i), 0);
+                       store = new_r_Store(first_bl, mem, addr,
+                                           new_r_Proj(args_bl, args, mode, i), 0);
                }
                /* the new memory Proj gets the last Proj from store */
                set_Proj_pred(nmem, store);
@@ -1744,7 +1743,7 @@ static void fix_start_block(ir_graph *irg)
                if (is_Anchor(block))
                        continue;
                if (block != start_block) {
-                       ir_node *jmp = new_r_Jmp(irg, start_block);
+                       ir_node *jmp = new_r_Jmp(start_block);
 
                        set_Block_cfgpred(block, get_edge_src_pos(edge), jmp);
                        return;
@@ -1960,7 +1959,7 @@ static void modify_irg(be_abi_irg_t *env)
        pmap_insert(env->regs, (void *) sp, NULL);
        pmap_insert(env->regs, (void *) arch_env->bp, NULL);
        reg_params_bl   = get_irg_start_block(irg);
-       env->reg_params = be_new_RegParams(irg, reg_params_bl, pmap_count(env->regs));
+       env->reg_params = be_new_RegParams(reg_params_bl, pmap_count(env->regs));
        add_irn_dep(env->reg_params, get_irg_start(irg));
 
        /*
@@ -1983,7 +1982,7 @@ static void modify_irg(be_abi_irg_t *env)
                        add_type |= arch_register_req_type_produces_sp | arch_register_req_type_ignore;
 
                assert(nr >= 0);
-               proj = new_r_Proj(irg, reg_params_bl, env->reg_params, mode, nr);
+               proj = new_r_Proj(reg_params_bl, env->reg_params, mode, nr);
                pmap_insert(env->regs, (void *) reg, proj);
                be_set_constr_single_reg_out(env->reg_params, nr, reg, add_type);
                arch_set_irn_register(proj, reg);
@@ -1994,7 +1993,7 @@ static void modify_irg(be_abi_irg_t *env)
 
        /* create a new initial memory proj */
        assert(is_Proj(old_mem));
-       new_mem_proj = new_r_Proj(irg, get_nodes_block(old_mem),
+       new_mem_proj = new_r_Proj(get_nodes_block(old_mem),
                                  new_r_Unknown(irg, mode_T), mode_M,
                                  get_Proj_proj(old_mem));
        mem = new_mem_proj;
@@ -2006,7 +2005,7 @@ static void modify_irg(be_abi_irg_t *env)
           might be added before it */
        env->init_sp = be_abi_reg_map_get(env->regs, sp);
        start_bl     = get_irg_start_block(irg);
-       env->init_sp = be_new_IncSP(sp, irg, start_bl, env->init_sp, BE_STACK_FRAME_SIZE_EXPAND, 0);
+       env->init_sp = be_new_IncSP(sp, start_bl, env->init_sp, BE_STACK_FRAME_SIZE_EXPAND, 0);
        be_abi_reg_map_set(env->regs, sp, env->init_sp);
 
        create_barrier(env, start_bl, &mem, env->regs, 0);
@@ -2042,18 +2041,18 @@ static void modify_irg(be_abi_irg_t *env)
                        if (arg->in_reg) {
                                repl = pmap_get(env->regs, (void *) arg->reg);
                        } else if (arg->on_stack) {
-                               ir_node *addr = be_new_FrameAddr(sp->reg_class, irg, reg_params_bl, frame_pointer, arg->stack_ent);
+                               ir_node *addr = be_new_FrameAddr(sp->reg_class, reg_params_bl, frame_pointer, arg->stack_ent);
 
                                /* For atomic parameters which are actually used, we create a Load node. */
                                if (is_atomic_type(param_type) && get_irn_n_edges(args[i]) > 0) {
                                        ir_mode *mode      = get_type_mode(param_type);
                                        ir_mode *load_mode = arg->load_mode;
 
-                                       ir_node *load = new_r_Load(irg, reg_params_bl, new_NoMem(), addr, load_mode, cons_floats);
-                                       repl = new_r_Proj(irg, reg_params_bl, load, load_mode, pn_Load_res);
+                                       ir_node *load = new_r_Load(reg_params_bl, new_NoMem(), addr, load_mode, cons_floats);
+                                       repl = new_r_Proj(reg_params_bl, load, load_mode, pn_Load_res);
 
                                        if (mode != load_mode) {
-                                               repl = new_r_Conv(irg, reg_params_bl, repl, mode);
+                                               repl = new_r_Conv(reg_params_bl, repl, mode);
                                        }
                                } else {
                                        /* The stack parameter is not primitive (it is a struct or array),
@@ -2069,7 +2068,7 @@ static void modify_irg(be_abi_irg_t *env)
                           which may be wrong. Add Conv's then. */
                        mode = get_irn_mode(args[i]);
                        if (mode != get_irn_mode(repl)) {
-                               repl = new_r_Conv(irg, get_irn_n(repl, -1), repl, mode);
+                               repl = new_r_Conv(get_nodes_block(repl), repl, mode);
                        }
                        exchange(args[i], repl);
                }
@@ -2264,7 +2263,7 @@ static void fix_pic_symconsts(ir_node *node, void *data)
 
                /* all ok now for locally constructed stuff */
                if (can_address_relative(entity)) {
-                       ir_node *add = new_r_Add(irg, block, pic_base, pred, mode);
+                       ir_node *add = new_r_Add(block, pic_base, pred, mode);
 
                        /* make sure the walker doesn't visit this add again */
                        mark_irn_visited(add);
@@ -2277,14 +2276,14 @@ static void fix_pic_symconsts(ir_node *node, void *data)
                pic_symbol   = get_pic_symbol(be, entity);
                pic_symconst = new_rd_SymConst_addr_ent(dbgi, irg, mode_P_code,
                                                        pic_symbol, NULL);
-               add = new_r_Add(irg, block, pic_base, pic_symconst, mode);
+               add = new_r_Add(block, pic_base, pic_symconst, mode);
                mark_irn_visited(add);
 
                /* we need an extra indirection for global data outside our current
                   module. The loads are always safe and can therefore float
                   and need no memory input */
-               load     = new_r_Load(irg, block, new_NoMem(), add, mode, cons_floats);
-               load_res = new_r_Proj(irg, block, load, mode, pn_Load_res);
+               load     = new_r_Load(block, new_NoMem(), add, mode, cons_floats);
+               load_res = new_r_Proj(block, load, mode, pn_Load_res);
 
                set_irn_n(node, i, load_res);
        }
@@ -2642,7 +2641,7 @@ static void lower_outer_frame_sels(ir_node *sel, void *ctx) {
                        ir_mode  *mode_UInt = get_reference_mode_unsigned_eq(mode);
                        ir_node  *cnst = new_r_Const_long(current_ir_graph, mode_UInt, offset);
 
-                       ptr = new_rd_Add(dbgi, current_ir_graph, bl, ptr, cnst, mode);
+                       ptr = new_rd_Add(dbgi, bl, ptr, cnst, mode);
                }
                exchange(sel, ptr);
        }
index 25f00c2..4098785 100644 (file)
@@ -257,7 +257,7 @@ static ir_node *prepare_constr_insn(be_chordal_env_t *env, ir_node *irn)
                if (rbitset_is_set(req->limited, reg->index))
                        continue;
 
-               copy = be_new_Copy(env->cls, env->irg, bl, op);
+               copy = be_new_Copy(env->cls, bl, op);
                be_stat_ev("constr_copy", 1);
 
                sched_add_before(irn, copy);
@@ -292,7 +292,7 @@ static ir_node *prepare_constr_insn(be_chordal_env_t *env, ir_node *irn)
                        if (be_is_Copy(get_irn_n(insn->irn, a_op->pos)))
                                continue;
 
-                       copy = be_new_Copy(env->cls, env->irg, bl, op->carrier);
+                       copy = be_new_Copy(env->cls, bl, op->carrier);
                        be_stat_ev("constr_copy", 1);
 
                        sched_add_before(insn->irn, copy);
@@ -339,7 +339,7 @@ static ir_node *prepare_constr_insn(be_chordal_env_t *env, ir_node *irn)
                if (be_is_Copy(get_irn_n(insn->irn, op->pos)))
                        continue;
 
-               copy = be_new_Copy(env->cls, env->irg, bl, op->carrier);
+               copy = be_new_Copy(env->cls, bl, op->carrier);
 
                sched_add_before(insn->irn, copy);
                set_irn_n(insn->irn, op->pos, copy);
index cb1e068..43d7138 100644 (file)
@@ -146,8 +146,7 @@ static void rematerialize_or_move(ir_node *flags_needed, ir_node *node,
        if(get_irn_mode(copy) == mode_T) {
                ir_node *block = get_nodes_block(copy);
                ir_mode *mode  = flag_class->mode;
-               value = new_rd_Proj(NULL, current_ir_graph, block,
-                                                       copy, mode, pn);
+               value = new_rd_Proj(NULL, block, copy, mode, pn);
        } else {
                value = copy;
        }
index 5497c45..0181e04 100644 (file)
@@ -114,7 +114,7 @@ ir_node *insert_Perm_after(be_irg_t *birg,
        }
        ir_nodeset_destroy(&live);
 
-       perm = be_new_Perm(cls, irg, bl, n, nodes);
+       perm = be_new_Perm(cls, bl, n, nodes);
        sched_add_after(pos, perm);
        free(nodes);
 
@@ -125,7 +125,7 @@ ir_node *insert_Perm_after(be_irg_t *birg,
                be_ssa_construction_env_t senv;
 
                ir_mode *mode = get_irn_mode(perm_op);
-               ir_node *proj = new_r_Proj(irg, bl, perm, mode, i);
+               ir_node *proj = new_r_Proj(bl, perm, mode, i);
                arch_set_irn_register(proj, reg);
 
                curr = proj;
index 443bc43..acd7e73 100644 (file)
@@ -418,14 +418,14 @@ static void lower_perm_node(ir_node *irn, lower_env_t *env)
                                        DBG((dbg, LEVEL_1, "%+F                        (%+F, %s) and (%+F, %s)\n",
                                                                irn, res1, cycle.elems[i]->name, res2, cycle.elems[i + 1]->name));
 
-                                       cpyxchg = be_new_Perm(reg_class, irg, block, 2, in);
+                                       cpyxchg = be_new_Perm(reg_class, block, 2, in);
 
                                        if (i > 0) {
                                                /* cycle is not done yet */
                                                int pidx = get_pairidx_for_in_regidx(pairs, n, cycle.elems[i]->index);
 
                                                /* create intermediate proj */
-                                               res1 = new_r_Proj(irg, block, cpyxchg, get_irn_mode(res1), 0);
+                                               res1 = new_r_Proj(block, cpyxchg, get_irn_mode(res1), 0);
 
                                                /* set as in for next Perm */
                                                pairs[pidx].in_node = res1;
@@ -452,7 +452,7 @@ static void lower_perm_node(ir_node *irn, lower_env_t *env)
                                        DB((dbg, LEVEL_1, "%+F creating copy node (%+F, %s) -> (%+F, %s)\n",
                                                                irn, arg1, cycle.elems[i]->name, res2, cycle.elems[i + 1]->name));
 
-                                       cpyxchg = be_new_Copy(reg_class, irg, block, arg1);
+                                       cpyxchg = be_new_Copy(reg_class, block, arg1);
                                        arch_set_irn_register(cpyxchg, cycle.elems[i + 1]);
 
                                        /* exchange copy node and proj */
@@ -523,7 +523,7 @@ static void gen_assure_different_pattern(ir_node *irn, ir_node *other_different,
        /* check if already exists such a copy in the schedule immediately before */
        cpy = find_copy(skip_Proj(irn), other_different);
        if (! cpy) {
-               cpy = be_new_Copy(cls, irg, block, other_different);
+               cpy = be_new_Copy(cls, block, other_different);
                arch_irn_set_flags(cpy, arch_irn_flags_dont_spill);
                DB((dbg_constr, LEVEL_1, "created non-spillable %+F for value %+F\n", cpy, other_different));
        } else {
@@ -533,14 +533,14 @@ static void gen_assure_different_pattern(ir_node *irn, ir_node *other_different,
        /* Add the Keep resp. CopyKeep and reroute the users */
        /* of the other_different irn in case of CopyKeep.   */
        if (has_irn_users(other_different)) {
-               keep = be_new_CopyKeep_single(cls, irg, block, cpy, irn, get_irn_mode(other_different));
+               keep = be_new_CopyKeep_single(cls, block, cpy, irn, get_irn_mode(other_different));
                be_node_set_reg_class_in(keep, 1, cls);
        } else {
                ir_node *in[2];
 
                in[0] = irn;
                in[1] = cpy;
-               keep = be_new_Keep(cls, irg, block, 2, in);
+               keep = be_new_Keep(cls, block, 2, in);
        }
 
        DB((dbg_constr, LEVEL_1, "created %+F(%+F, %+F)\n\n", keep, irn, cpy));
@@ -728,10 +728,10 @@ static void melt_copykeeps(constraint_env_t *cenv) {
                                }
 
 #ifdef KEEP_ALIVE_COPYKEEP_HACK
-                               new_ck = be_new_CopyKeep(entry->cls, irg, get_nodes_block(ref), be_get_CopyKeep_op(ref), n_melt, new_ck_in, mode_ANY);
+                               new_ck = be_new_CopyKeep(entry->cls, get_nodes_block(ref), be_get_CopyKeep_op(ref), n_melt, new_ck_in, mode_ANY);
                                keep_alive(new_ck);
 #else
-                               new_ck = be_new_CopyKeep(entry->cls, irg, get_nodes_block(ref), be_get_CopyKeep_op(ref), n_melt, new_ck_in, get_irn_mode(ref));
+                               new_ck = be_new_CopyKeep(entry->cls, get_nodes_block(ref), be_get_CopyKeep_op(ref), n_melt, new_ck_in, get_irn_mode(ref));
 #endif /* KEEP_ALIVE_COPYKEEP_HACK */
 
                                /* set register class for all kept inputs */
@@ -819,7 +819,7 @@ void assure_constraints(be_irg_t *birg) {
                                int                          n   = get_irn_arity(cp);
                                ir_node                     *keep;
 
-                               keep = be_new_Keep(cls, irg, get_nodes_block(cp), n, get_irn_in(cp) + 1);
+                               keep = be_new_Keep(cls, get_nodes_block(cp), n, get_irn_in(cp) + 1);
                                sched_add_before(cp, keep);
 
                                /* Set all ins (including the block) of the CopyKeep BAD to keep the verifier happy. */
index f66ca0b..fec358a 100644 (file)
@@ -529,7 +529,7 @@ static void permutate_values(ir_nodeset_t *live_nodes, ir_node *before,
        }
 
        block = get_nodes_block(before);
-       perm  = be_new_Perm(cls, irg, block, i, in);
+       perm  = be_new_Perm(cls, block, i, in);
 
        sched_add_before(before, perm);
 
@@ -546,7 +546,7 @@ static void permutate_values(ir_nodeset_t *live_nodes, ir_node *before,
 
                value = in[i];
                mode  = get_irn_mode(value);
-               proj  = new_r_Proj(irg, block, perm, mode, i);
+               proj  = new_r_Proj(block, perm, mode, i);
 
                reg = arch_register_for_index(cls, new_reg);
 
index 894e067..cbe54c0 100644 (file)
@@ -329,11 +329,12 @@ static int redir_proj(const ir_node **node)
 }
 
 ir_node *be_new_Spill(const arch_register_class_t *cls, const arch_register_class_t *cls_frame,
-       ir_graph *irg, ir_node *bl, ir_node *frame, ir_node *to_spill)
+       ir_node *bl, ir_node *frame, ir_node *to_spill)
 {
        be_frame_attr_t *a;
        ir_node         *in[2];
        ir_node         *res;
+       ir_graph        *irg = get_Block_irg(bl);
 
        in[0]     = frame;
        in[1]     = to_spill;
@@ -348,11 +349,12 @@ ir_node *be_new_Spill(const arch_register_class_t *cls, const arch_register_clas
 }
 
 ir_node *be_new_Reload(const arch_register_class_t *cls,
-               const arch_register_class_t *cls_frame, ir_graph *irg, ir_node *block,
+               const arch_register_class_t *cls_frame, ir_node *block,
                ir_node *frame, ir_node *mem, ir_mode *mode)
 {
-       ir_node *in[2];
-       ir_node *res;
+       ir_node  *in[2];
+       ir_node  *res;
+       ir_graph *irg = get_Block_irg(block);
 
        in[0] = frame;
        in[1] = mem;
@@ -389,13 +391,14 @@ ir_node *be_get_Spill_frame(const ir_node *irn)
        return get_irn_n(irn, be_pos_Spill_frame);
 }
 
-ir_node *be_new_Perm(const arch_register_class_t *cls, ir_graph *irg,
-               ir_node *block, int n, ir_node *in[])
+ir_node *be_new_Perm(const arch_register_class_t *cls, ir_node *block, int n, ir_node *in[])
 {
-       int i;
+       int      i;
+       ir_graph *irg = get_Block_irg(block);
+
        ir_node *irn = new_ir_node(NULL, irg, block, op_be_Perm, mode_T, n, in);
        init_node_attr(irn, n);
-       for(i = 0; i < n; ++i) {
+       for (i = 0; i < n; ++i) {
                be_node_set_reg_class_in(irn, i, cls);
                be_node_set_reg_class_out(irn, i, cls);
        }
@@ -434,8 +437,9 @@ void be_Perm_reduce(ir_node *perm, int new_size, int *map)
        set_irn_in(perm, new_size, new_in);
 }
 
-ir_node *be_new_MemPerm(const arch_env_t *arch_env, ir_graph *irg, ir_node *bl, int n, ir_node *in[])
+ir_node *be_new_MemPerm(const arch_env_t *arch_env, ir_node *bl, int n, ir_node *in[])
 {
+       ir_graph                     *irg       = get_Block_irg(bl);
        ir_node                      *frame     = get_irg_frame(irg);
        const arch_register_class_t  *cls_frame = arch_get_irn_reg_class_out(frame);
        const arch_register_t        *sp        = arch_env->sp;
@@ -468,11 +472,12 @@ ir_node *be_new_MemPerm(const arch_env_t *arch_env, ir_graph *irg, ir_node *bl,
 }
 
 
-ir_node *be_new_Copy(const arch_register_class_t *cls, ir_graph *irg, ir_node *bl, ir_node *op)
+ir_node *be_new_Copy(const arch_register_class_t *cls, ir_node *bl, ir_node *op)
 {
        ir_node *in[1];
        ir_node *res;
        arch_register_req_t *req;
+       ir_graph *irg = get_Block_irg(bl);
 
        in[0] = op;
        res   = new_ir_node(NULL, irg, bl, op_be_Copy, get_irn_mode(op), 1, in);
@@ -496,10 +501,11 @@ void be_set_Copy_op(ir_node *cpy, ir_node *op) {
        set_irn_n(cpy, be_pos_Copy_op, op);
 }
 
-ir_node *be_new_Keep(const arch_register_class_t *cls, ir_graph *irg, ir_node *bl, int n, ir_node *in[])
+ir_node *be_new_Keep(const arch_register_class_t *cls, ir_node *bl, int n, ir_node *in[])
 {
        int i;
        ir_node *res;
+       ir_graph *irg = get_Block_irg(bl);
 
        res = new_ir_node(NULL, irg, bl, op_be_Keep, mode_ANY, -1, NULL);
        init_node_attr(res, -1);
@@ -641,12 +647,13 @@ int be_Return_append_node(ir_node *ret, ir_node *node) {
        return pos;
 }
 
-ir_node *be_new_IncSP(const arch_register_t *sp, ir_graph *irg, ir_node *bl,
+ir_node *be_new_IncSP(const arch_register_t *sp, ir_node *bl,
                       ir_node *old_sp, int offset, int align)
 {
        be_incsp_attr_t *a;
        ir_node *irn;
        ir_node *in[1];
+       ir_graph *irg = get_Block_irg(bl);
 
        in[0]     = old_sp;
        irn       = new_ir_node(NULL, irg, bl, op_be_IncSP, sp->reg_class->mode,
@@ -662,16 +669,18 @@ ir_node *be_new_IncSP(const arch_register_t *sp, ir_graph *irg, ir_node *bl,
        return irn;
 }
 
-ir_node *be_new_AddSP(const arch_register_t *sp, ir_graph *irg, ir_node *bl, ir_node *old_sp, ir_node *sz)
+ir_node *be_new_AddSP(const arch_register_t *sp, ir_node *bl, ir_node *old_sp, ir_node *sz)
 {
        be_node_attr_t *a;
        ir_node *irn;
        ir_node *in[be_pos_AddSP_last];
        const arch_register_class_t *cls;
+       ir_graph *irg;
 
        in[be_pos_AddSP_old_sp] = old_sp;
        in[be_pos_AddSP_size]   = sz;
 
+       irg = get_Block_irg(bl);
        irn = new_ir_node(NULL, irg, bl, op_be_AddSP, mode_T, be_pos_AddSP_last, in);
        a   = init_node_attr(irn, be_pos_AddSP_last);
 
@@ -685,15 +694,17 @@ ir_node *be_new_AddSP(const arch_register_t *sp, ir_graph *irg, ir_node *bl, ir_
        return irn;
 }
 
-ir_node *be_new_SubSP(const arch_register_t *sp, ir_graph *irg, ir_node *bl, ir_node *old_sp, ir_node *sz)
+ir_node *be_new_SubSP(const arch_register_t *sp, ir_node *bl, ir_node *old_sp, ir_node *sz)
 {
        be_node_attr_t *a;
        ir_node *irn;
        ir_node *in[be_pos_SubSP_last];
+       ir_graph *irg;
 
        in[be_pos_SubSP_old_sp] = old_sp;
        in[be_pos_SubSP_size]   = sz;
 
+       irg = get_Block_irg(bl);
        irn = new_ir_node(NULL, irg, bl, op_be_SubSP, mode_T, be_pos_SubSP_last, in);
        a   = init_node_attr(irn, be_pos_SubSP_last);
 
@@ -705,10 +716,11 @@ ir_node *be_new_SubSP(const arch_register_t *sp, ir_graph *irg, ir_node *bl, ir_
        return irn;
 }
 
-ir_node *be_new_RegParams(ir_graph *irg, ir_node *bl, int n_outs)
+ir_node *be_new_RegParams(ir_node *bl, int n_outs)
 {
        ir_node *res;
        int i;
+       ir_graph *irg = get_Block_irg(bl);
 
        res = new_ir_node(NULL, irg, bl, op_be_RegParams, mode_T, 0, NULL);
        init_node_attr(res, -1);
@@ -718,11 +730,12 @@ ir_node *be_new_RegParams(ir_graph *irg, ir_node *bl, int n_outs)
        return res;
 }
 
-ir_node *be_new_FrameAddr(const arch_register_class_t *cls_frame, ir_graph *irg, ir_node *bl, ir_node *frame, ir_entity *ent)
+ir_node *be_new_FrameAddr(const arch_register_class_t *cls_frame, ir_node *bl, ir_node *frame, ir_entity *ent)
 {
        be_frame_attr_t *a;
        ir_node *irn;
        ir_node *in[1];
+       ir_graph *irg = get_Block_irg(bl);
 
        in[0]  = frame;
        irn    = new_ir_node(NULL, irg, bl, op_be_FrameAddr, get_irn_mode(frame), 1, in);
@@ -746,10 +759,11 @@ ir_entity *be_get_FrameAddr_entity(const ir_node *node)
        return attr->ent;
 }
 
-ir_node *be_new_CopyKeep(const arch_register_class_t *cls, ir_graph *irg, ir_node *bl, ir_node *src, int n, ir_node *in_keep[], ir_mode *mode)
+ir_node *be_new_CopyKeep(const arch_register_class_t *cls, ir_node *bl, ir_node *src, int n, ir_node *in_keep[], ir_mode *mode)
 {
        ir_node  *irn;
        ir_node **in = ALLOCAN(ir_node*, n + 1);
+       ir_graph *irg = get_Block_irg(bl);
 
        in[0] = src;
        memcpy(&in[1], in_keep, n * sizeof(in[0]));
@@ -761,9 +775,9 @@ ir_node *be_new_CopyKeep(const arch_register_class_t *cls, ir_graph *irg, ir_nod
        return irn;
 }
 
-ir_node *be_new_CopyKeep_single(const arch_register_class_t *cls, ir_graph *irg, ir_node *bl, ir_node *src, ir_node *keep, ir_mode *mode)
+ir_node *be_new_CopyKeep_single(const arch_register_class_t *cls, ir_node *bl, ir_node *src, ir_node *keep, ir_mode *mode)
 {
-       return be_new_CopyKeep(cls, irg, bl, src, 1, &keep, mode);
+       return be_new_CopyKeep(cls, bl, src, 1, &keep, mode);
 }
 
 ir_node *be_get_CopyKeep_op(const ir_node *cpy) {
@@ -774,10 +788,11 @@ void be_set_CopyKeep_op(ir_node *cpy, ir_node *op) {
        set_irn_n(cpy, be_pos_CopyKeep_op, op);
 }
 
-ir_node *be_new_Barrier(ir_graph *irg, ir_node *bl, int n, ir_node *in[])
+ir_node *be_new_Barrier(ir_node *bl, int n, ir_node *in[])
 {
        ir_node *res;
        int i;
+       ir_graph *irg = get_Block_irg(bl);
 
        res = new_ir_node(NULL, irg, bl, op_be_Barrier, mode_T, -1, NULL);
        init_node_attr(res, -1);
@@ -791,23 +806,23 @@ ir_node *be_new_Barrier(ir_graph *irg, ir_node *bl, int n, ir_node *in[])
 
 ir_node *be_Barrier_append_node(ir_node *barrier, ir_node *node)
 {
-       ir_graph *irg = get_irn_irg(barrier);
        ir_node *block = get_nodes_block(barrier);
        ir_mode *mode = get_irn_mode(node);
        int n = add_irn_n(barrier, node);
 
-       ir_node *proj = new_r_Proj(irg, block, barrier, mode, n);
+       ir_node *proj = new_r_Proj(block, barrier, mode, n);
        add_register_req(barrier);
 
        return proj;
 }
 
 /* Construct a new be_Unwind. */
-ir_node *be_new_Unwind(dbg_info *dbg, ir_graph *irg, ir_node *block,
+ir_node *be_new_Unwind(dbg_info *dbg, ir_node *block,
                                           ir_node *mem, ir_node *sp)
 {
        ir_node *res;
        ir_node *in[2];
+       ir_graph *irg = get_Block_irg(block);
 
        in[be_pos_Unwind_mem] = mem;
        in[be_pos_Unwind_sp]  = sp;
@@ -1011,13 +1026,13 @@ int be_get_IncSP_align(const ir_node *irn)
 
 ir_node *be_spill(ir_node *block, ir_node *irn)
 {
-       ir_graph                    *irg       = get_irn_irg(block);
+       ir_graph                    *irg       = get_Block_irg(block);
        ir_node                     *frame     = get_irg_frame(irg);
        const arch_register_class_t *cls       = arch_get_irn_reg_class_out(irn);
        const arch_register_class_t *cls_frame = arch_get_irn_reg_class_out(frame);
        ir_node                     *spill;
 
-       spill = be_new_Spill(cls, cls_frame, irg, block, frame, irn);
+       spill = be_new_Spill(cls, cls_frame, block, frame, irn);
        return spill;
 }
 
@@ -1025,13 +1040,13 @@ ir_node *be_reload(const arch_register_class_t *cls, ir_node *insert, ir_mode *m
 {
        ir_node  *reload;
        ir_node  *bl    = is_Block(insert) ? insert : get_nodes_block(insert);
-       ir_graph *irg   = get_irn_irg(bl);
+       ir_graph *irg   = get_Block_irg(bl);
        ir_node  *frame = get_irg_frame(irg);
        const arch_register_class_t *cls_frame = arch_get_irn_reg_class_out(frame);
 
        assert(be_is_Spill(spill) || (is_Phi(spill) && get_irn_mode(spill) == mode_M));
 
-       reload = be_new_Reload(cls, cls_frame, irg, bl, frame, spill, mode);
+       reload = be_new_Reload(cls, cls_frame, bl, frame, spill, mode);
 
        if (is_Block(insert)) {
                insert = sched_skip(insert, 0, sched_skip_cf_predicator, NULL);
index 6f19520..c04f2a6 100644 (file)
@@ -94,7 +94,7 @@ enum {
  * Make a new Spill node.
  */
 ir_node *be_new_Spill(const arch_register_class_t *cls, const arch_register_class_t *cls_frame,
-       ir_graph *irg, ir_node *bl, ir_node *frame, ir_node *to_spill);
+       ir_node *bl, ir_node *frame, ir_node *to_spill);
 
 /**
  * Position numbers for the be_Reload inputs.
@@ -108,7 +108,7 @@ enum {
  * Make a new Reload node.
  */
 ir_node *be_new_Reload(const arch_register_class_t *cls, const arch_register_class_t *cls_frame,
-       ir_graph *irg, ir_node *bl, ir_node *frame, ir_node *mem, ir_mode *mode);
+       ir_node *bl, ir_node *frame, ir_node *mem, ir_mode *mode);
 
 /**
  * Position numbers for the be_Copy inputs.
@@ -120,7 +120,7 @@ enum {
 /**
  * Make a new Copy node.
  */
-ir_node *be_new_Copy(const arch_register_class_t *cls, ir_graph *irg, ir_node *block, ir_node *in);
+ir_node *be_new_Copy(const arch_register_class_t *cls, ir_node *block, ir_node *in);
 /** Returns the Copy Argument. */
 ir_node *be_get_Copy_op(const ir_node *cpy);
 /** Sets the Copy Argument. */
@@ -129,7 +129,7 @@ void be_set_Copy_op(ir_node *cpy, ir_node *op);
 /**
  * Make a new Perm node.
  */
-ir_node *be_new_Perm(const arch_register_class_t *cls, ir_graph *irg, ir_node *bl, int arity, ir_node *in[]);
+ir_node *be_new_Perm(const arch_register_class_t *cls, ir_node *bl, int arity, ir_node *in[]);
 
 /**
  * Reduce a Perm.
@@ -147,8 +147,8 @@ void be_Perm_reduce(ir_node *perm, int new_size, int *map);
 /**
  * Create a new MemPerm node.
  */
-ir_node *be_new_MemPerm(const arch_env_t *arch_env, ir_graph *irg, ir_node *bl, int n, ir_node *in[]);
-ir_node *be_new_Keep(const arch_register_class_t *cls, ir_graph *irg, ir_node *bl, int arity, ir_node *in[]);
+ir_node *be_new_MemPerm(const arch_env_t *arch_env, ir_node *bl, int n, ir_node *in[]);
+ir_node *be_new_Keep(const arch_register_class_t *cls, ir_node *bl, int arity, ir_node *in[]);
 
 void be_Keep_add_node(ir_node *keep, const arch_register_class_t *cls, ir_node *node);
 
@@ -160,7 +160,7 @@ enum {
 };
 
 /** Create a new FrameAddr node. */
-ir_node *be_new_FrameAddr(const arch_register_class_t *cls_frame, ir_graph *irg, ir_node *bl, ir_node *frame, ir_entity *ent);
+ir_node *be_new_FrameAddr(const arch_register_class_t *cls_frame, ir_node *bl, ir_node *frame, ir_entity *ent);
 
 /** Return the frame input of a FrameAddr node. */
 ir_node *be_get_FrameAddr_frame(const ir_node *node);
@@ -189,13 +189,12 @@ enum {
  * grows. In contrast to IncSP, the amount of bytes the stack pointer is grown, is not
  * given by a constant but an ordinary Firm node.
  * @param sp     The stack pointer register.
- * @param irg    The graph.
  * @param bl     The block.
  * @param old_sp The node representing the old stack pointer value.
  * @param sz     The node expressing the size by which the stack pointer shall be grown.
  * @return       A new AddSP node.
  */
-ir_node *be_new_AddSP(const arch_register_t *sp, ir_graph *irg, ir_node *bl, ir_node *old_sp, ir_node *sz);
+ir_node *be_new_AddSP(const arch_register_t *sp, ir_node *bl, ir_node *old_sp, ir_node *sz);
 
 /**
  * Position numbers for the be_SubSP inputs
@@ -218,18 +217,16 @@ enum {
  * grows. In contrast to IncSP, the amount of bytes the stack pointer is grown, is not
  * given by a constant but an ordinary Firm node.
  * @param sp     The stack pointer register.
- * @param irg    The graph.
  * @param bl     The block.
  * @param old_sp The node representing the old stack pointer value.
  * @param sz     The node expressing the size by which the stack pointer shall be grown.
  * @return       A new DecSP node.
  */
-ir_node *be_new_SubSP(const arch_register_t *sp, ir_graph *irg, ir_node *bl, ir_node *old_sp, ir_node *sz);
+ir_node *be_new_SubSP(const arch_register_t *sp, ir_node *bl, ir_node *old_sp, ir_node *sz);
 
 /**
  * Make a stack pointer increase/decrease node.
- * @param sp     The stack pointer register.
- * @param irg    The graph to insert the node to.
+ * @param sp     The stack pointer register. * @param irg    The graph to insert the node to.
  * @param bl     The block to insert the node into.
  * @param old_sp The node defining the former stack pointer.
  * @param amount The mount of bytes the stack shall be expanded/shrinked (see set_IncSP_offset)
@@ -238,7 +235,7 @@ ir_node *be_new_SubSP(const arch_register_t *sp, ir_graph *irg, ir_node *bl, ir_
  * @return       A new stack pointer increment/decrement node.
  * @note         This node sets a register constraint to the @p sp register on its output.
  */
-ir_node *be_new_IncSP(const arch_register_t *sp, ir_graph *irg, ir_node *bl,
+ir_node *be_new_IncSP(const arch_register_t *sp, ir_node *bl,
                       ir_node *old_sp, int offset, int align);
 
 /** Returns the previous node that computes the stack pointer. */
@@ -357,9 +354,9 @@ void be_Return_set_emit_pop(ir_node *ret, int emit_pop);
 /** appends a node to the return node, returns the position of the node */
 int be_Return_append_node(ir_node *ret, ir_node *node);
 
-ir_node *be_new_RegParams(ir_graph *irg, ir_node *bl, int n_out);
+ir_node *be_new_RegParams(ir_node *bl, int n_out);
 
-ir_node *be_new_Barrier(ir_graph *irg, ir_node *bl, int n, ir_node *in[]);
+ir_node *be_new_Barrier(ir_node *bl, int n, ir_node *in[]);
 
 /**
  * Appends a node to a barrier, returns the result proj of the node
@@ -389,8 +386,8 @@ ir_node *be_reload(const arch_register_class_t *cls, ir_node *insert, ir_mode *m
 enum {
        be_pos_CopyKeep_op = 0
 };
-ir_node *be_new_CopyKeep(const arch_register_class_t *cls, ir_graph *irg, ir_node *bl, ir_node *src, int n, ir_node *in_keep[], ir_mode *mode);
-ir_node *be_new_CopyKeep_single(const arch_register_class_t *cls, ir_graph *irg, ir_node *bl, ir_node *src, ir_node *keep, ir_mode *mode);
+ir_node *be_new_CopyKeep(const arch_register_class_t *cls, ir_node *bl, ir_node *src, int n, ir_node *in_keep[], ir_mode *mode);
+ir_node *be_new_CopyKeep_single(const arch_register_class_t *cls, ir_node *bl, ir_node *src, ir_node *keep, ir_mode *mode);
 ir_node *be_get_CopyKeep_op(const ir_node *cpy);
 void be_set_CopyKeep_op(ir_node *cpy, ir_node *op);
 
@@ -406,12 +403,11 @@ enum {
  * Construct a new be_Unwind.
  *
  * @param dbg    debug info
- * @param irg    the graph where the new node will be placed
  * @param bl     the block where the new node will be placed
  * @param mem    the memory input
  * @param sp     the stack pointer input
  */
-ir_node *be_new_Unwind(dbg_info *dbg, ir_graph *irg, ir_node *bl, ir_node *mem, ir_node *sp);
+ir_node *be_new_Unwind(dbg_info *dbg, ir_node *bl, ir_node *mem, ir_node *sp);
 
 ir_node *be_get_Unwind_mem(const ir_node *irn);
 ir_node *be_get_Unwind_sp(const ir_node *irn);
index 9e0db49..648dd71 100644 (file)
@@ -492,7 +492,7 @@ static void spill_phi(spill_env_t *env, spill_info_t *spillinfo)
        /* override or replace spills list... */
        spill         = obstack_alloc(&env->obst, sizeof(spill[0]));
        spill->after  = skip_keeps_phis(phi);
-       spill->spill  = new_r_Phi(irg, block, arity, ins, mode_M);
+       spill->spill  = new_r_Phi(block, arity, ins, mode_M);
        spill->next   = NULL;
 
        spillinfo->spills = spill;
index da9b18c..026b087 100644 (file)
@@ -713,7 +713,7 @@ static void create_memperms(be_fec_env_t *env)
                        nodes[i] = arg;
                }
 
-               mempermnode = be_new_MemPerm(arch_env, irg, memperm->block,
+               mempermnode = be_new_MemPerm(arch_env, memperm->block,
                                             memperm->entrycount, nodes);
 
                /* insert node into schedule */
index bf5ae96..4b36701 100644 (file)
@@ -115,7 +115,7 @@ ir_node *create_phi(be_ssa_construction_env_t *env, ir_node *block,
                     ir_node *link_with)
 {
        int i, n_preds = get_Block_n_cfgpreds(block);
-       ir_graph *irg = get_irn_irg(block);
+       ir_graph *irg = get_Block_irg(block);
        ir_node **ins = ALLOCAN(ir_node*, n_preds);
        ir_node  *phi;
 
@@ -124,7 +124,7 @@ ir_node *create_phi(be_ssa_construction_env_t *env, ir_node *block,
        for(i = 0; i < n_preds; ++i) {
                ins[i] = new_r_Unknown(irg, env->mode);
        }
-       phi = new_r_Phi(irg, block, n_preds, ins, env->mode);
+       phi = new_r_Phi(block, n_preds, ins, env->mode);
        if(env->new_phis != NULL) {
                ARR_APP1(ir_node*, env->new_phis, phi);
        }
index db7ddc7..f5352be 100644 (file)
@@ -106,7 +106,6 @@ static void insert_all_perms_walker(ir_node *bl, void *data) {
        insert_all_perms_env_t *env = data;
        be_chordal_env_t *chordal_env = env->chordal_env;
        pmap *perm_map = env->perm_map;
-       ir_graph *irg = chordal_env->irg;
        be_lv_t *lv = chordal_env->birg->lv;
        int i, n;
 
@@ -166,7 +165,7 @@ static void insert_all_perms_walker(ir_node *bl, void *data) {
                        for(pp = set_first(arg_set); pp; pp = set_next(arg_set))
                                in[pp->pos] = pp->arg;
 
-                       perm = be_new_Perm(chordal_env->cls, irg, pred_bl, n_projs, in);
+                       perm = be_new_Perm(chordal_env->cls, pred_bl, n_projs, in);
                        be_stat_ev("phi_perm", n_projs);
 
                        insert_after = sched_skip(sched_last(pred_bl), 0, sched_skip_cf_predicator, NULL);
@@ -179,7 +178,7 @@ static void insert_all_perms_walker(ir_node *bl, void *data) {
                         */
                        insert_after = perm;
                        for(pp = set_first(arg_set); pp; pp = set_next(arg_set)) {
-                               ir_node *proj = new_r_Proj(irg, pred_bl, perm, get_irn_mode(pp->arg), pp->pos);
+                               ir_node *proj = new_r_Proj(pred_bl, perm, get_irn_mode(pp->arg), pp->pos);
                                pp->proj = proj;
                                assert(get_reg(pp->arg));
                                set_reg(proj, get_reg(pp->arg));
@@ -267,7 +266,7 @@ static void set_regs_or_place_dupls_walker(ir_node *bl, void *data) {
                                        insert it into schedule,
                                        pin it
                                */
-                               ir_node *dupl  = be_new_Copy(cls, chordal_env->irg, arg_block, arg);
+                               ir_node *dupl  = be_new_Copy(cls, arg_block, arg);
 
                                /* this is commented out because it will fail in case of unknown float */
 #if 0
@@ -336,8 +335,8 @@ static void set_regs_or_place_dupls_walker(ir_node *bl, void *data) {
                                        insert it into schedule,
                                        pin it
                                */
-                               ir_node *perm     = get_Proj_pred(arg);
-                               ir_node *dupl     = be_new_Copy(cls, chordal_env->irg, arg_block, arg);
+                               ir_node *perm = get_Proj_pred(arg);
+                               ir_node *dupl = be_new_Copy(cls, arg_block, arg);
                                ir_node *ins;
 
                                /* this is commented out because it will fail in case of unknown float */
index 28e336e..403810d 100644 (file)
@@ -190,7 +190,7 @@ void spill_phi(minibelady_env_t *env, ir_node *phi)
        DBG((dbg, LEVEL_2, "\tcreate Phi-M for %+F\n", phi));
 
        /* create a Phi-M */
-       spill_info->spill = new_r_Phi(irg, block, arity, in, mode_M);
+       spill_info->spill = new_r_Phi(block, arity, in, mode_M);
 
        if(spill_to_kill != NULL) {
                exchange(spill_to_kill, spill_info->spill);
index 192dc6b..7456f18 100644 (file)
@@ -347,8 +347,7 @@ static const arch_register_t *ia32_abi_prologue(void *self, ir_node **mem, pmap
 
        ia32_curr_fp_ommitted = env->flags.try_omit_fp;
        if (! env->flags.try_omit_fp) {
-               ir_graph *irg     = env->irg;
-               ir_node  *bl      = get_irg_start_block(irg);
+               ir_node  *bl      = get_irg_start_block(env->irg);
                ir_node  *curr_sp = be_abi_reg_map_get(reg_map, arch_env->sp);
                ir_node  *curr_bp = be_abi_reg_map_get(reg_map, arch_env->bp);
                ir_node  *noreg   = ia32_new_NoReg_gp(cg);
@@ -360,8 +359,8 @@ static const arch_register_t *ia32_abi_prologue(void *self, ir_node **mem, pmap
 
                /* push ebp */
                push    = new_bd_ia32_Push(NULL, bl, noreg, noreg, *mem, curr_bp, curr_sp);
-               curr_sp = new_r_Proj(irg, bl, push, get_irn_mode(curr_sp), pn_ia32_Push_stack);
-               *mem    = new_r_Proj(irg, bl, push, mode_M, pn_ia32_Push_M);
+               curr_sp = new_r_Proj(bl, push, get_irn_mode(curr_sp), pn_ia32_Push_stack);
+               *mem    = new_r_Proj(bl, push, mode_M, pn_ia32_Push_M);
 
                /* the push must have SP out register */
                arch_set_irn_register(curr_sp, arch_env->sp);
@@ -370,12 +369,12 @@ static const arch_register_t *ia32_abi_prologue(void *self, ir_node **mem, pmap
                *stack_bias -= 4;
 
                /* move esp to ebp */
-               curr_bp = be_new_Copy(arch_env->bp->reg_class, irg, bl, curr_sp);
+               curr_bp = be_new_Copy(arch_env->bp->reg_class, bl, curr_sp);
                be_set_constr_single_reg_out(curr_bp, 0, arch_env->bp,
                                             arch_register_req_type_ignore);
 
                /* beware: the copy must be done before any other sp use */
-               curr_sp = be_new_CopyKeep_single(arch_env->sp->reg_class, irg, bl, curr_sp, curr_bp, get_irn_mode(curr_sp));
+               curr_sp = be_new_CopyKeep_single(arch_env->sp->reg_class, bl, curr_sp, curr_bp, get_irn_mode(curr_sp));
                be_set_constr_single_reg_out(curr_sp, 0, arch_env->sp,
                                                     arch_register_req_type_produces_sp);
 
@@ -404,11 +403,10 @@ static void ia32_abi_epilogue(void *self, ir_node *bl, ir_node **mem, pmap *reg_
        const arch_env_t *arch_env = env->aenv;
        ir_node          *curr_sp  = be_abi_reg_map_get(reg_map, arch_env->sp);
        ir_node          *curr_bp  = be_abi_reg_map_get(reg_map, arch_env->bp);
-       ir_graph         *irg      = env->irg;
 
        if (env->flags.try_omit_fp) {
                /* simply remove the stack frame here */
-               curr_sp = be_new_IncSP(arch_env->sp, irg, bl, curr_sp, BE_STACK_FRAME_SIZE_SHRINK, 0);
+               curr_sp = be_new_IncSP(arch_env->sp, bl, curr_sp, BE_STACK_FRAME_SIZE_SHRINK, 0);
        } else {
                ir_mode *mode_bp = arch_env->bp->reg_class->mode;
 
@@ -417,8 +415,8 @@ static void ia32_abi_epilogue(void *self, ir_node *bl, ir_node **mem, pmap *reg_
 
                        /* leave */
                        leave   = new_bd_ia32_Leave(NULL, bl, curr_bp);
-                       curr_bp = new_r_Proj(irg, bl, leave, mode_bp, pn_ia32_Leave_frame);
-                       curr_sp = new_r_Proj(irg, bl, leave, get_irn_mode(curr_sp), pn_ia32_Leave_stack);
+                       curr_bp = new_r_Proj(bl, leave, mode_bp, pn_ia32_Leave_frame);
+                       curr_sp = new_r_Proj(bl, leave, get_irn_mode(curr_sp), pn_ia32_Leave_stack);
                } else {
                        ir_node *pop;
 
@@ -427,17 +425,17 @@ static void ia32_abi_epilogue(void *self, ir_node *bl, ir_node **mem, pmap *reg_
                        kill_node(curr_sp);
 
                        /* copy ebp to esp */
-                       curr_sp = be_new_Copy(&ia32_reg_classes[CLASS_ia32_gp], irg, bl, curr_bp);
+                       curr_sp = be_new_Copy(&ia32_reg_classes[CLASS_ia32_gp], bl, curr_bp);
                        arch_set_irn_register(curr_sp, arch_env->sp);
                        be_set_constr_single_reg_out(curr_sp, 0, arch_env->sp,
                                                         arch_register_req_type_ignore);
 
                        /* pop ebp */
                        pop     = new_bd_ia32_PopEbp(NULL, bl, *mem, curr_sp);
-                       curr_bp = new_r_Proj(irg, bl, pop, mode_bp, pn_ia32_Pop_res);
-                       curr_sp = new_r_Proj(irg, bl, pop, get_irn_mode(curr_sp), pn_ia32_Pop_stack);
+                       curr_bp = new_r_Proj(bl, pop, mode_bp, pn_ia32_Pop_res);
+                       curr_sp = new_r_Proj(bl, pop, get_irn_mode(curr_sp), pn_ia32_Pop_stack);
 
-                       *mem = new_r_Proj(irg, bl, pop, mode_M, pn_ia32_Pop_M);
+                       *mem = new_r_Proj(bl, pop, mode_M, pn_ia32_Pop_M);
                }
                arch_set_irn_register(curr_sp, arch_env->sp);
                arch_set_irn_register(curr_bp, arch_env->bp);
@@ -951,7 +949,6 @@ static void ia32_prepare_graph(void *self)
 
 ir_node *turn_back_am(ir_node *node)
 {
-       ir_graph *irg   = current_ir_graph;
        dbg_info *dbgi  = get_irn_dbg_info(node);
        ir_node  *block = get_nodes_block(node);
        ir_node  *base  = get_irn_n(node, n_ia32_base);
@@ -960,7 +957,7 @@ ir_node *turn_back_am(ir_node *node)
        ir_node  *noreg;
 
        ir_node  *load     = new_bd_ia32_Load(dbgi, block, base, index, mem);
-       ir_node  *load_res = new_rd_Proj(dbgi, irg, block, load, mode_Iu, pn_ia32_Load_res);
+       ir_node  *load_res = new_rd_Proj(dbgi, block, load, mode_Iu, pn_ia32_Load_res);
 
        ia32_copy_am_attrs(load, node);
        if (is_ia32_is_reload(node))
@@ -1104,7 +1101,7 @@ static void transform_to_Load(ia32_code_gen_t *cg, ir_node *node) {
 
        DBG_OPT_RELOAD2LD(node, new_op);
 
-       proj = new_rd_Proj(dbg, irg, block, new_op, mode, pn_ia32_Load_res);
+       proj = new_rd_Proj(dbg, block, new_op, mode, pn_ia32_Load_res);
 
        if (sched_point) {
                sched_add_after(sched_point, new_op);
@@ -1206,7 +1203,7 @@ static ir_node *create_pop(ia32_code_gen_t *cg, ir_node *node, ir_node *schedpoi
        dbg_info *dbg = get_irn_dbg_info(node);
        ir_node *block = get_nodes_block(node);
        ir_node *noreg = ia32_new_NoReg_gp(cg);
-       ir_graph *irg = get_irn_irg(node);
+       ir_graph *irg  = get_irn_irg(node);
        ir_node *frame = get_irg_frame(irg);
 
        ir_node *pop = new_bd_ia32_PopMem(dbg, block, frame, noreg, new_NoMem(), sp);
@@ -1224,14 +1221,13 @@ static ir_node *create_pop(ia32_code_gen_t *cg, ir_node *node, ir_node *schedpoi
 
 static ir_node* create_spproj(ir_node *node, ir_node *pred, int pos)
 {
-       ir_graph *irg = get_irn_irg(node);
        dbg_info *dbg = get_irn_dbg_info(node);
        ir_node *block = get_nodes_block(node);
        ir_mode *spmode = mode_Iu;
        const arch_register_t *spreg = &ia32_gp_regs[REG_ESP];
        ir_node *sp;
 
-       sp = new_rd_Proj(dbg, irg, block, pred, spmode, pos);
+       sp = new_rd_Proj(dbg, block, pred, spmode, pos);
        arch_set_irn_register(sp, spreg);
 
        return sp;
@@ -1310,7 +1306,7 @@ static void transform_MemPerm(ia32_code_gen_t *cg, ir_node *node)
        }
 
        in[0] = sp;
-       keep  = be_new_Keep(&ia32_reg_classes[CLASS_ia32_gp], irg, block, 1, in);
+       keep  = be_new_Keep(&ia32_reg_classes[CLASS_ia32_gp], block, 1, in);
        sched_add_before(node, keep);
 
        /* exchange memprojs */
@@ -2355,24 +2351,23 @@ static int ia32_is_valid_clobber(const void *self, const char *clobber)
  */
 static ir_node *ia32_create_trampoline_fkt(ir_node *block, ir_node *mem, ir_node *trampoline, ir_node *env, ir_node *callee)
 {
-       ir_graph *irg    = get_Block_irg(block);
        ir_node  *st, *p = trampoline;
        ir_mode *mode    = get_irn_mode(p);
 
        /* mov  ecx,<env> */
-       st  = new_r_Store(irg, block, mem, p, new_Const_long(mode_Bu, 0xb9), 0);
-       mem = new_r_Proj(irg, block, st, mode_M, pn_Store_M);
-       p   = new_r_Add(irg, block, p, new_Const_long(mode_Iu, 1), mode);
-       st  = new_r_Store(irg, block, mem, p, env, 0);
-       mem = new_r_Proj(irg, block, st, mode_M, pn_Store_M);
-       p   = new_r_Add(irg, block, p, new_Const_long(mode_Iu, 4), mode);
+       st  = new_r_Store(block, mem, p, new_Const_long(mode_Bu, 0xb9), 0);
+       mem = new_r_Proj(block, st, mode_M, pn_Store_M);
+       p   = new_r_Add(block, p, new_Const_long(mode_Iu, 1), mode);
+       st  = new_r_Store(block, mem, p, env, 0);
+       mem = new_r_Proj(block, st, mode_M, pn_Store_M);
+       p   = new_r_Add(block, p, new_Const_long(mode_Iu, 4), mode);
        /* jmp  <callee> */
-       st  = new_r_Store(irg, block, mem, p, new_Const_long(mode_Bu, 0xe9), 0);
-       mem = new_r_Proj(irg, block, st, mode_M, pn_Store_M);
-       p   = new_r_Add(irg, block, p, new_Const_long(mode_Iu, 1), mode);
-       st  = new_r_Store(irg, block, mem, p, callee, 0);
-       mem = new_r_Proj(irg, block, st, mode_M, pn_Store_M);
-       p   = new_r_Add(irg, block, p, new_Const_long(mode_Iu, 4), mode);
+       st  = new_r_Store(block, mem, p, new_Const_long(mode_Bu, 0xe9), 0);
+       mem = new_r_Proj(block, st, mode_M, pn_Store_M);
+       p   = new_r_Add(block, p, new_Const_long(mode_Iu, 1), mode);
+       st  = new_r_Store(block, mem, p, callee, 0);
+       mem = new_r_Proj(block, st, mode_M, pn_Store_M);
+       p   = new_r_Add(block, p, new_Const_long(mode_Iu, 4), mode);
 
        return mem;
 }
index 03c9757..1eeb66f 100644 (file)
@@ -177,7 +177,7 @@ static void ia32_transform_sub_to_neg_add(ir_node *irn, ia32_code_gen_t *cg)
                        sched_add_before(irn, adc);
 
                        set_irn_mode(adc, mode_T);
-                       adc_flags = new_r_Proj(irg, block, adc, mode_Iu, pn_ia32_Adc_flags);
+                       adc_flags = new_r_Proj(block, adc, mode_Iu, pn_ia32_Adc_flags);
                        arch_set_irn_register(adc_flags, &ia32_flags_regs[REG_EFLAGS]);
 
                        cmc = new_bd_ia32_Cmc(dbg, block, adc_flags);
@@ -322,7 +322,7 @@ static void assure_should_be_same_requirements(ia32_code_gen_t *cg,
                 * (the register can't be live since the operation will override it
                 *  anyway) */
                if (uses_out_reg == NULL) {
-                       ir_node *copy = be_new_Copy(cls, irg, block, in_node);
+                       ir_node *copy = be_new_Copy(cls, block, in_node);
                        DBG_OPT_2ADDRCPY(copy);
 
                        /* destination is the out register */
@@ -357,10 +357,10 @@ static void assure_should_be_same_requirements(ia32_code_gen_t *cg,
                 * after! the operation as we will override the register. */
                in[0] = in_node;
                in[1] = uses_out_reg;
-               perm  = be_new_Perm(cls, irg, block, 2, in);
+               perm  = be_new_Perm(cls, block, 2, in);
 
-               perm_proj0 = new_r_Proj(irg, block, perm, get_irn_mode(in[0]), 0);
-               perm_proj1 = new_r_Proj(irg, block, perm, get_irn_mode(in[1]), 1);
+               perm_proj0 = new_r_Proj(block, perm, get_irn_mode(in[0]), 0);
+               perm_proj1 = new_r_Proj(block, perm, get_irn_mode(in[1]), 1);
 
                arch_set_irn_register(perm_proj0, out_reg);
                arch_set_irn_register(perm_proj1, in_reg);
index 00e12a1..8bf5064 100644 (file)
@@ -190,7 +190,7 @@ static ir_node *create_fpu_mode_reload(void *env, ir_node *state,
                set_ia32_use_frame(load);
                sched_add_before(before, load);
 
-               load_res = new_r_Proj(irg, block, load, mode_Iu, pn_ia32_Load_res);
+               load_res = new_r_Proj(block, load, mode_Iu, pn_ia32_Load_res);
 
                /* TODO: make the actual mode configurable in ChangeCW... */
                or_const = new_bd_ia32_Immediate(NULL, get_irg_start_block(irg),
index 1be578d..2dd97f3 100644 (file)
@@ -120,7 +120,7 @@ static void resolve_call(ir_node *call, ir_node *l_res, ir_node *h_res, ir_graph
                                 */
                                old_cse = get_opt_cse();
                                set_opt_cse(0);
-                               jmp = new_r_Jmp(irg, block);
+                               jmp = new_r_Jmp(block);
                                set_opt_cse(old_cse);
                                edges_reroute(proj, jmp, irg);
                                break;
@@ -150,7 +150,7 @@ static void resolve_call(ir_node *call, ir_node *l_res, ir_node *h_res, ir_graph
                else {
                        in[0] = l_res;
                        in[1] = h_res;
-                       res = new_r_Tuple(irg, block, 2, in);
+                       res = new_r_Tuple(block, 2, in);
                }
 
                turn_into_tuple(call, pn_Call_max);
@@ -164,7 +164,7 @@ static void resolve_call(ir_node *call, ir_node *l_res, ir_node *h_res, ir_graph
                 */
                old_cse = get_opt_cse();
                set_opt_cse(0);
-               jmp = new_r_Jmp(irg, block);
+               jmp = new_r_Jmp(block);
                set_opt_cse(old_cse);
 
                set_Tuple_pred(call, pn_Call_X_regular,        jmp);
@@ -179,7 +179,6 @@ static void resolve_call(ir_node *call, ir_node *l_res, ir_node *h_res, ir_graph
  * Map an Add (a_l, a_h, b_l, b_h)
  */
 static int map_Add(ir_node *call, void *ctx) {
-       ir_graph *irg        = current_ir_graph;
        dbg_info *dbg        = get_irn_dbg_info(call);
        ir_node  *block      = get_nodes_block(call);
        ir_node  **params    = get_Call_param_arr(call);
@@ -199,13 +198,13 @@ static int map_Add(ir_node *call, void *ctx) {
        /* h_res = a_h + b_h + carry */
 
        add_low  = new_bd_ia32_l_Add(dbg, block, a_l, b_l, mode_T);
-       flags    = new_r_Proj(irg, block, add_low, mode_flags, pn_ia32_flags);
+       flags    = new_r_Proj(block, add_low, mode_flags, pn_ia32_flags);
        add_high = new_bd_ia32_l_Adc(dbg, block, a_h, b_h, flags, h_mode);
 
-       l_res = new_r_Proj(irg, block, add_low, l_mode, pn_ia32_res);
+       l_res = new_r_Proj(block, add_low, l_mode, pn_ia32_res);
        h_res = add_high;
 
-       resolve_call(call, l_res, h_res, irg, block);
+       resolve_call(call, l_res, h_res, current_ir_graph, block);
        return 1;
 }
 
@@ -214,7 +213,6 @@ static int map_Add(ir_node *call, void *ctx) {
  */
 static int map_Sub(ir_node *call, void *ctx)
 {
-       ir_graph *irg        = current_ir_graph;
        dbg_info *dbg        = get_irn_dbg_info(call);
        ir_node  *block      = get_nodes_block(call);
        ir_node  **params    = get_Call_param_arr(call);
@@ -234,13 +232,13 @@ static int map_Sub(ir_node *call, void *ctx)
        /* h_res = a_h - b_h - carry */
 
        sub_low  = new_bd_ia32_l_Sub(dbg, block, a_l, b_l, mode_T);
-       flags    = new_r_Proj(irg, block, sub_low, mode_flags, pn_ia32_flags);
+       flags    = new_r_Proj(block, sub_low, mode_flags, pn_ia32_flags);
        sub_high = new_bd_ia32_l_Sbb(dbg, block, a_h, b_h, flags, h_mode);
 
-       l_res = new_r_Proj(irg, block, sub_low, l_mode, pn_ia32_res);
+       l_res = new_r_Proj( block, sub_low, l_mode, pn_ia32_res);
        h_res = sub_high;
 
-       resolve_call(call, l_res, h_res, irg, block);
+       resolve_call(call, l_res, h_res, current_ir_graph, block);
        return 1;
 }
 
@@ -269,8 +267,8 @@ static int map_Shl(ir_node *call, void *ctx) {
                if (tarval_cmp(tv, new_tarval_from_long(32, l_mode)) & (pn_Cmp_Gt|pn_Cmp_Eq)) {
                        /* simplest case: shift only the lower bits. Note that there is no
                           need to reduce the constant here, this is done by the hardware.  */
-                       ir_node *conv = new_rd_Conv(dbg, irg, block, a_l, h_mode);
-                       h_res = new_rd_Shl(dbg, irg, block, conv, cnt, h_mode);
+                       ir_node *conv = new_rd_Conv(dbg, block, a_l, h_mode);
+                       h_res = new_rd_Shl(dbg, block, conv, cnt, h_mode);
                        l_res = new_rd_Const(dbg, irg, get_mode_null(l_mode));
 
                } else {
@@ -296,30 +294,30 @@ static int map_Shl(ir_node *call, void *ctx) {
 
        c_mode = get_irn_mode(cnt);
        irn    = new_r_Const_long(irg, c_mode, 32);
-       irn    = new_rd_And(dbg, irg, upper, cnt, irn, c_mode);
-       irn    = new_rd_Cmp(dbg, irg, upper, irn, new_r_Const(irg, get_mode_null(c_mode)));
-       irn    = new_r_Proj(irg, upper, irn, mode_b, pn_Cmp_Eq);
-       cond   = new_rd_Cond(dbg, irg, upper, irn);
+       irn    = new_rd_And(dbg, upper, cnt, irn, c_mode);
+       irn    = new_rd_Cmp(dbg, upper, irn, new_r_Const(irg, get_mode_null(c_mode)));
+       irn    = new_r_Proj(upper, irn, mode_b, pn_Cmp_Eq);
+       cond   = new_rd_Cond(dbg, upper, irn);
 
-       in[0]  = new_r_Proj(irg, upper, cond, mode_X, pn_Cond_true);
-       in[1]  = new_r_Proj(irg, upper, cond, mode_X, pn_Cond_false);
+       in[0]  = new_r_Proj(upper, cond, mode_X, pn_Cond_true);
+       in[1]  = new_r_Proj(upper, cond, mode_X, pn_Cond_false);
 
        /* the block for cnt >= 32 */
        n_block = new_rd_Block(dbg, irg, 1, &in[1]);
-       h2      = new_rd_Conv(dbg, irg, n_block, l1, h_mode);
+       h2      = new_rd_Conv(dbg, n_block, l1, h_mode);
        l2      = new_r_Const(irg, get_mode_null(l_mode));
-       in[1]   = new_r_Jmp(irg, n_block);
+       in[1]   = new_r_Jmp(n_block);
 
        set_irn_in(block, 2, in);
 
        in[0] = l1;
        in[1] = l2;
-       l_res = new_r_Phi(irg, block, 2, in, l_mode);
+       l_res = new_r_Phi(block, 2, in, l_mode);
        set_Block_phis(block, l_res);
 
        in[0] = h1;
        in[1] = h2;
-       h_res = new_r_Phi(irg, block, 2, in, h_mode);
+       h_res = new_r_Phi(block, 2, in, h_mode);
        set_Phi_next(l_res, h_res);
        set_Phi_next(h_res, NULL);
 
@@ -357,9 +355,9 @@ static int map_Shr(ir_node *call, void *ctx) {
                if (tarval_cmp(tv, new_tarval_from_long(32, l_mode)) & (pn_Cmp_Gt|pn_Cmp_Eq)) {
                        /* simplest case: shift only the higher bits. Note that there is no
                           need to reduce the constant here, this is done by the hardware.  */
-                       ir_node *conv = new_rd_Conv(dbg, irg, block, a_h, l_mode);
+                       ir_node *conv = new_rd_Conv(dbg, block, a_h, l_mode);
                        h_res = new_rd_Const(dbg, irg, get_mode_null(h_mode));
-                       l_res = new_rd_Shr(dbg, irg, block, conv, cnt, l_mode);
+                       l_res = new_rd_Shr(dbg, block, conv, cnt, l_mode);
                } else {
                        /* l_res = SHRD a_h:a_l, cnt */
                        l_res = new_bd_ia32_l_ShrD(dbg, block, a_l, a_h, cnt, l_mode);
@@ -382,30 +380,30 @@ static int map_Shr(ir_node *call, void *ctx) {
 
        c_mode = get_irn_mode(cnt);
        irn    = new_r_Const_long(irg, c_mode, 32);
-       irn    = new_rd_And(dbg, irg, upper, cnt, irn, c_mode);
-       irn    = new_rd_Cmp(dbg, irg, upper, irn, new_r_Const(irg, get_mode_null(c_mode)));
-       irn    = new_r_Proj(irg, upper, irn, mode_b, pn_Cmp_Eq);
-       cond   = new_rd_Cond(dbg, irg, upper, irn);
+       irn    = new_rd_And(dbg, upper, cnt, irn, c_mode);
+       irn    = new_rd_Cmp(dbg, upper, irn, new_r_Const(irg, get_mode_null(c_mode)));
+       irn    = new_r_Proj(upper, irn, mode_b, pn_Cmp_Eq);
+       cond   = new_rd_Cond(dbg, upper, irn);
 
-       in[0]  = new_r_Proj(irg, upper, cond, mode_X, pn_Cond_true);
-       in[1]  = new_r_Proj(irg, upper, cond, mode_X, pn_Cond_false);
+       in[0]  = new_r_Proj(upper, cond, mode_X, pn_Cond_true);
+       in[1]  = new_r_Proj(upper, cond, mode_X, pn_Cond_false);
 
        /* the block for cnt >= 32 */
        n_block = new_rd_Block(dbg, irg, 1, &in[1]);
-       l2      = new_rd_Conv(dbg, irg, n_block, h1, l_mode);
+       l2      = new_rd_Conv(dbg, n_block, h1, l_mode);
        h2      = new_r_Const(irg, get_mode_null(h_mode));
-       in[1]   = new_r_Jmp(irg, n_block);
+       in[1]   = new_r_Jmp(n_block);
 
        set_irn_in(block, 2, in);
 
        in[0] = l1;
        in[1] = l2;
-       l_res = new_r_Phi(irg, block, 2, in, l_mode);
+       l_res = new_r_Phi(block, 2, in, l_mode);
        set_Block_phis(block, l_res);
 
        in[0] = h1;
        in[1] = h2;
-       h_res = new_r_Phi(irg, block, 2, in, h_mode);
+       h_res = new_r_Phi(block, 2, in, h_mode);
        set_Phi_next(l_res, h_res);
        set_Phi_next(h_res, NULL);
 
@@ -443,11 +441,11 @@ static int map_Shrs(ir_node *call, void *ctx) {
                if (tarval_cmp(tv, new_tarval_from_long(32, l_mode)) & (pn_Cmp_Gt|pn_Cmp_Eq)) {
                        /* simplest case: shift only the higher bits. Note that there is no
                           need to reduce the constant here, this is done by the hardware.  */
-                       ir_node *conv    = new_rd_Conv(dbg, irg, block, a_h, l_mode);
+                       ir_node *conv    = new_rd_Conv(dbg, block, a_h, l_mode);
                        ir_mode *c_mode  = get_irn_mode(cnt);
 
-                       h_res = new_rd_Shrs(dbg, irg, block, a_h, new_r_Const_long(irg, c_mode, 31), h_mode);
-                       l_res = new_rd_Shrs(dbg, irg, block, conv, cnt, l_mode);
+                       h_res = new_rd_Shrs(dbg, block, a_h, new_r_Const_long(irg, c_mode, 31), h_mode);
+                       l_res = new_rd_Shrs(dbg, block, conv, cnt, l_mode);
                } else {
                        /* l_res = SHRD a_h:a_l, cnt */
                        l_res = new_bd_ia32_l_ShrD(dbg, block, a_l, a_h, cnt, l_mode);
@@ -470,30 +468,30 @@ static int map_Shrs(ir_node *call, void *ctx) {
 
        c_mode = get_irn_mode(cnt);
        irn    = new_r_Const_long(irg, c_mode, 32);
-       irn    = new_rd_And(dbg, irg, upper, cnt, irn, c_mode);
-       irn    = new_rd_Cmp(dbg, irg, upper, irn, new_r_Const(irg, get_mode_null(c_mode)));
-       irn    = new_r_Proj(irg, upper, irn, mode_b, pn_Cmp_Eq);
-       cond   = new_rd_Cond(dbg, irg, upper, irn);
+       irn    = new_rd_And(dbg, upper, cnt, irn, c_mode);
+       irn    = new_rd_Cmp(dbg, upper, irn, new_r_Const(irg, get_mode_null(c_mode)));
+       irn    = new_r_Proj(upper, irn, mode_b, pn_Cmp_Eq);
+       cond   = new_rd_Cond(dbg, upper, irn);
 
-       in[0]  = new_r_Proj(irg, upper, cond, mode_X, pn_Cond_true);
-       in[1]  = new_r_Proj(irg, upper, cond, mode_X, pn_Cond_false);
+       in[0]  = new_r_Proj(upper, cond, mode_X, pn_Cond_true);
+       in[1]  = new_r_Proj(upper, cond, mode_X, pn_Cond_false);
 
        /* the block for cnt >= 32 */
        n_block = new_rd_Block(dbg, irg, 1, &in[1]);
-       l2      = new_rd_Conv(dbg, irg, n_block, h1, l_mode);
-       h2      = new_rd_Shrs(dbg, irg, n_block, a_h, new_r_Const_long(irg, c_mode, 31), h_mode);
-       in[1]   = new_r_Jmp(irg, n_block);
+       l2      = new_rd_Conv(dbg, n_block, h1, l_mode);
+       h2      = new_rd_Shrs(dbg, n_block, a_h, new_r_Const_long(irg, c_mode, 31), h_mode);
+       in[1]   = new_r_Jmp(n_block);
 
        set_irn_in(block, 2, in);
 
        in[0] = l1;
        in[1] = l2;
-       l_res = new_r_Phi(irg, block, 2, in, l_mode);
+       l_res = new_r_Phi(block, 2, in, l_mode);
        set_Block_phis(block, l_res);
 
        in[0] = h1;
        in[1] = h2;
-       h_res = new_r_Phi(irg, block, 2, in, h_mode);
+       h_res = new_r_Phi(block, 2, in, h_mode);
        set_Phi_next(l_res, h_res);
        set_Phi_next(h_res, NULL);
 
@@ -546,7 +544,6 @@ static int is_sign_extend(ir_node *low, ir_node *high)
  * Map a Mul (a_l, a_h, b_l, b_h)
  */
 static int map_Mul(ir_node *call, void *ctx) {
-       ir_graph *irg     = current_ir_graph;
        dbg_info *dbg     = get_irn_dbg_info(call);
        ir_node  *block   = get_nodes_block(call);
        ir_node  **params = get_Call_param_arr(call);
@@ -573,22 +570,22 @@ static int map_Mul(ir_node *call, void *ctx) {
        /* handle the often used case of 32x32=64 mul */
        if (is_sign_extend(a_l, a_h) && is_sign_extend(b_l, b_h)) {
                mul   = new_bd_ia32_l_IMul(dbg, block, a_l, b_l);
-               h_res = new_rd_Proj(dbg, irg, block, mul, h_mode, pn_ia32_l_Mul_EDX);
-               l_res = new_rd_Proj(dbg, irg, block, mul, l_mode, pn_ia32_l_Mul_EAX);
+               h_res = new_rd_Proj(dbg, block, mul, h_mode, pn_ia32_l_Mul_EDX);
+               l_res = new_rd_Proj(dbg, block, mul, l_mode, pn_ia32_l_Mul_EAX);
        } else {
                /* note that zero extension is handled hare efficiently */
                mul   = new_bd_ia32_l_Mul(dbg, block, a_l, b_l);
-               pEDX  = new_rd_Proj(dbg, irg, block, mul, h_mode, pn_ia32_l_Mul_EDX);
-               l_res = new_rd_Proj(dbg, irg, block, mul, l_mode, pn_ia32_l_Mul_EAX);
-
-               b_l   = new_rd_Conv(dbg, irg, block, b_l, h_mode);
-               mul   = new_rd_Mul( dbg, irg, block, a_h, b_l, h_mode);
-               add   = new_rd_Add( dbg, irg, block, mul, pEDX, h_mode);
-               a_l   = new_rd_Conv(dbg, irg, block, a_l, h_mode);
-               mul   = new_rd_Mul( dbg, irg, block, a_l, b_h, h_mode);
-               h_res = new_rd_Add( dbg, irg, block, add, mul, h_mode);
+               pEDX  = new_rd_Proj(dbg, block, mul, h_mode, pn_ia32_l_Mul_EDX);
+               l_res = new_rd_Proj(dbg, block, mul, l_mode, pn_ia32_l_Mul_EAX);
+
+               b_l   = new_rd_Conv(dbg, block, b_l, h_mode);
+               mul   = new_rd_Mul( dbg, block, a_h, b_l, h_mode);
+               add   = new_rd_Add( dbg, block, mul, pEDX, h_mode);
+               a_l   = new_rd_Conv(dbg, block, a_l, h_mode);
+               mul   = new_rd_Mul( dbg, block, a_l, b_h, h_mode);
+               h_res = new_rd_Add( dbg, block, add, mul, h_mode);
        }
-       resolve_call(call, l_res, h_res, irg, block);
+       resolve_call(call, l_res, h_res, current_ir_graph, block);
 
        return 1;
 }
@@ -597,7 +594,6 @@ static int map_Mul(ir_node *call, void *ctx) {
  * Map a Minus (a_l, a_h)
  */
 static int map_Minus(ir_node *call, void *ctx) {
-       ir_graph *irg     = current_ir_graph;
        dbg_info *dbg     = get_irn_dbg_info(call);
        ir_node  *block   = get_nodes_block(call);
        ir_node  **params = get_Call_param_arr(call);
@@ -610,10 +606,10 @@ static int map_Minus(ir_node *call, void *ctx) {
        (void) ctx;
 
        res   = new_bd_ia32_Minus64Bit(dbg, block, a_l, a_h);
-       l_res = new_r_Proj(irg, block, res, l_mode, pn_ia32_Minus64Bit_low_res);
-       h_res = new_r_Proj(irg, block, res, h_mode, pn_ia32_Minus64Bit_high_res);
+       l_res = new_r_Proj(block, res, l_mode, pn_ia32_Minus64Bit_low_res);
+       h_res = new_r_Proj(block, res, h_mode, pn_ia32_Minus64Bit_high_res);
 
-       resolve_call(call, l_res, h_res, irg, block);
+       resolve_call(call, l_res, h_res, current_ir_graph, block);
 
        return 1;
 }
@@ -622,7 +618,6 @@ static int map_Minus(ir_node *call, void *ctx) {
  * Map a Abs (a_l, a_h)
  */
 static int map_Abs(ir_node *call, void *ctx) {
-       ir_graph *irg        = current_ir_graph;
        dbg_info *dbg        = get_irn_dbg_info(call);
        ir_node  *block      = get_nodes_block(call);
        ir_node  **params    = get_Call_param_arr(call);
@@ -653,17 +648,17 @@ static int map_Abs(ir_node *call, void *ctx) {
        */
 
        /* TODO: give a hint to the backend somehow to not create a cltd here... */
-       sign   = new_rd_Shrs(dbg, irg, block, a_h, new_Const_long(l_mode, 31), h_mode);
-       sign_l = new_rd_Conv(dbg, irg, block, sign, l_mode);
-       sub_l  = new_rd_Eor(dbg, irg, block, a_l, sign_l, l_mode);
-       sub_h  = new_rd_Eor(dbg, irg, block, a_h, sign,   h_mode);
+       sign   = new_rd_Shrs(dbg, block, a_h, new_Const_long(l_mode, 31), h_mode);
+       sign_l = new_rd_Conv(dbg, block, sign, l_mode);
+       sub_l  = new_rd_Eor(dbg, block, a_l, sign_l, l_mode);
+       sub_h  = new_rd_Eor(dbg, block, a_h, sign,   h_mode);
 
        l_sub  = new_bd_ia32_l_Sub(dbg, block, sub_l, sign_l, mode_T);
-       l_res  = new_r_Proj(irg, block, l_sub, l_mode,     pn_ia32_res);
-       flags  = new_r_Proj(irg, block, l_sub, mode_flags, pn_ia32_flags);
+       l_res  = new_r_Proj(block, l_sub, l_mode,     pn_ia32_res);
+       flags  = new_r_Proj(block, l_sub, mode_flags, pn_ia32_flags);
        h_res  = new_bd_ia32_l_Sbb(dbg, block, sub_h, sign, flags, h_mode);
 
-       resolve_call(call, l_res, h_res, irg, block);
+       resolve_call(call, l_res, h_res, current_ir_graph, block);
 
        return 1;
 }
@@ -769,9 +764,9 @@ static int map_Conv(ir_node *call, void *ctx) {
                        /* convert from float to signed 64bit */
                        float_to_ll = new_bd_ia32_l_FloattoLL(dbg, block, a_f);
 
-                       l_res = new_r_Proj(irg, block, float_to_ll, l_res_mode,
+                       l_res = new_r_Proj(block, float_to_ll, l_res_mode,
                                                           pn_ia32_l_FloattoLL_res_low);
-                       h_res = new_r_Proj(irg, block, float_to_ll, h_res_mode,
+                       h_res = new_r_Proj(block, float_to_ll, h_res_mode,
                                                           pn_ia32_l_FloattoLL_res_high);
                } else {
                        /* convert from float to signed 64bit */
@@ -786,13 +781,13 @@ static int map_Conv(ir_node *call, void *ctx) {
                        part_block(call);
                        upper_blk = get_nodes_block(call);
 
-                       cmp   = new_rd_Cmp(dbg, irg, upper_blk, a_f, flt_corr);
-                       proj  = new_r_Proj(irg, upper_blk, cmp, mode_b, pn_Cmp_Lt);
-                       cond  = new_rd_Cond(dbg, irg, upper_blk, proj);
-                       in[0] = new_r_Proj(irg, upper_blk, cond, mode_X, pn_Cond_true);
-                       in[1] = new_r_Proj(irg, upper_blk, cond, mode_X, pn_Cond_false);
+                       cmp   = new_rd_Cmp(dbg, upper_blk, a_f, flt_corr);
+                       proj  = new_r_Proj(upper_blk, cmp, mode_b, pn_Cmp_Lt);
+                       cond  = new_rd_Cond(dbg, upper_blk, proj);
+                       in[0] = new_r_Proj(upper_blk, cond, mode_X, pn_Cond_true);
+                       in[1] = new_r_Proj(upper_blk, cond, mode_X, pn_Cond_false);
                        blk   = new_r_Block(irg, 1, &in[1]);
-                       in[1] = new_r_Jmp(irg, blk);
+                       in[1] = new_r_Jmp(blk);
 
                        set_irn_in(lower_blk, 2, in);
 
@@ -800,12 +795,12 @@ static int map_Conv(ir_node *call, void *ctx) {
                        in[0] = new_Const(get_mode_null(h_res_mode));
                        in[1] = new_Const_long(h_res_mode, 0x80000000);
 
-                       int_phi = new_r_Phi(irg, lower_blk, 2, in, h_res_mode);
+                       int_phi = new_r_Phi(lower_blk, 2, in, h_res_mode);
 
                        in[0] = a_f;
-                       in[1] = new_rd_Sub(dbg, irg, upper_blk, a_f, flt_corr, flt_mode);
+                       in[1] = new_rd_Sub(dbg, upper_blk, a_f, flt_corr, flt_mode);
 
-                       flt_phi = new_r_Phi(irg, lower_blk, 2, in, flt_mode);
+                       flt_phi = new_r_Phi(lower_blk, 2, in, flt_mode);
 
                        /* fix Phi links for next part_block() */
                        set_Block_phis(lower_blk, int_phi);
@@ -814,12 +809,12 @@ static int map_Conv(ir_node *call, void *ctx) {
 
                        float_to_ll = new_bd_ia32_l_FloattoLL(dbg, lower_blk, flt_phi);
 
-                       l_res = new_r_Proj(irg, lower_blk, float_to_ll, l_res_mode,
+                       l_res = new_r_Proj(lower_blk, float_to_ll, l_res_mode,
                                                           pn_ia32_l_FloattoLL_res_low);
-                       h_res = new_r_Proj(irg, lower_blk, float_to_ll, h_res_mode,
+                       h_res = new_r_Proj(lower_blk, float_to_ll, h_res_mode,
                                                           pn_ia32_l_FloattoLL_res_high);
 
-                       h_res = new_rd_Add(dbg, irg, lower_blk, h_res, int_phi, h_res_mode);
+                       h_res = new_rd_Add(dbg, lower_blk, h_res, int_phi, h_res_mode);
 
                        /* move the call and its Proj's to the lower block */
                        set_nodes_block(call, lower_blk);
index a66d20f..feb529b 100644 (file)
@@ -286,8 +286,7 @@ static void peephole_ia32_Test(ir_node *node)
 
                        /* If there are other users, reroute them to result proj */
                        if (get_irn_n_edges(left) != 2) {
-                               ir_node *res = new_r_Proj(current_ir_graph, block, left,
-                                               mode_Iu, pn_ia32_res);
+                               ir_node *res = new_r_Proj(block, left, mode_Iu, pn_ia32_res);
 
                                edges_reroute(left, res, current_ir_graph);
                                /* Reattach the result proj to left */
@@ -296,8 +295,7 @@ static void peephole_ia32_Test(ir_node *node)
                }
 
                flags_mode = ia32_reg_classes[CLASS_ia32_flags].mode;
-               flags_proj = new_r_Proj(current_ir_graph, block, left, flags_mode,
-                               pn_ia32_flags);
+               flags_proj = new_r_Proj(block, left, flags_mode, pn_ia32_flags);
                arch_set_irn_register(flags_proj, &ia32_flags_regs[REG_EFLAGS]);
 
                assert(get_irn_mode(node) != mode_T);
@@ -503,11 +501,11 @@ static void peephole_IncSP_Store_to_push(ir_node *irn)
                sched_add_after(skip_Proj(curr_sp), push);
 
                /* create stackpointer Proj */
-               curr_sp = new_r_Proj(irg, block, push, spmode, pn_ia32_Push_stack);
+               curr_sp = new_r_Proj(block, push, spmode, pn_ia32_Push_stack);
                arch_set_irn_register(curr_sp, spreg);
 
                /* create memory Proj */
-               mem_proj = new_r_Proj(irg, block, push, mode_M, pn_ia32_Push_M);
+               mem_proj = new_r_Proj(block, push, mode_M, pn_ia32_Push_M);
 
                /* use the memproj now */
                be_peephole_exchange(store, mem_proj);
@@ -748,7 +746,7 @@ static void peephole_Load_IncSP_to_pop(ir_node *irn)
        block = get_nodes_block(irn);
        irg   = cg->irg;
        if (inc_ofs > 0) {
-               pred_sp = be_new_IncSP(esp, irg, block, pred_sp, -inc_ofs, be_get_IncSP_align(irn));
+               pred_sp = be_new_IncSP(esp, block, pred_sp, -inc_ofs, be_get_IncSP_align(irn));
                sched_add_before(irn, pred_sp);
        }
 
@@ -768,7 +766,7 @@ static void peephole_Load_IncSP_to_pop(ir_node *irn)
                copy_mark(load, pop);
 
                /* create stackpointer Proj */
-               pred_sp = new_r_Proj(irg, block, pop, mode_Iu, pn_ia32_Pop_stack);
+               pred_sp = new_r_Proj(block, pop, mode_Iu, pn_ia32_Pop_stack);
                arch_set_irn_register(pred_sp, esp);
 
                sched_add_before(irn, pop);
@@ -813,7 +811,6 @@ static const arch_register_t *get_free_gp_reg(void)
  * Creates a Pop instruction before the given schedule point.
  *
  * @param dbgi        debug info
- * @param irg         the graph
  * @param block       the block
  * @param stack       the previous stack value
  * @param schedpoint  the new node is added before this node
@@ -821,7 +818,7 @@ static const arch_register_t *get_free_gp_reg(void)
  *
  * @return the new stack value
  */
-static ir_node *create_pop(dbg_info *dbgi, ir_graph *irg, ir_node *block,
+static ir_node *create_pop(dbg_info *dbgi, ir_node *block,
                            ir_node *stack, ir_node *schedpoint,
                            const arch_register_t *reg)
 {
@@ -833,15 +830,15 @@ static ir_node *create_pop(dbg_info *dbgi, ir_graph *irg, ir_node *block,
 
        pop   = new_bd_ia32_Pop(dbgi, block, new_NoMem(), stack);
 
-       stack = new_r_Proj(irg, block, pop, mode_Iu, pn_ia32_Pop_stack);
+       stack = new_r_Proj(block, pop, mode_Iu, pn_ia32_Pop_stack);
        arch_set_irn_register(stack, esp);
-       val   = new_r_Proj(irg, block, pop, mode_Iu, pn_ia32_Pop_res);
+       val   = new_r_Proj(block, pop, mode_Iu, pn_ia32_Pop_res);
        arch_set_irn_register(val, reg);
 
        sched_add_before(schedpoint, pop);
 
        in[0] = val;
-       keep = be_new_Keep(&ia32_reg_classes[CLASS_ia32_gp], irg, block, 1, in);
+       keep = be_new_Keep(&ia32_reg_classes[CLASS_ia32_gp], block, 1, in);
        sched_add_before(schedpoint, keep);
 
        return stack;
@@ -851,7 +848,6 @@ static ir_node *create_pop(dbg_info *dbgi, ir_graph *irg, ir_node *block,
  * Creates a Push instruction before the given schedule point.
  *
  * @param dbgi        debug info
- * @param irg         the graph
  * @param block       the block
  * @param stack       the previous stack value
  * @param schedpoint  the new node is added before this node
@@ -859,18 +855,18 @@ static ir_node *create_pop(dbg_info *dbgi, ir_graph *irg, ir_node *block,
  *
  * @return the new stack value
  */
-static ir_node *create_push(dbg_info *dbgi, ir_graph *irg, ir_node *block,
+static ir_node *create_push(dbg_info *dbgi, ir_node *block,
                             ir_node *stack, ir_node *schedpoint)
 {
        const arch_register_t *esp = &ia32_gp_regs[REG_ESP];
 
        ir_node *val   = ia32_new_Unknown_gp(cg);
        ir_node *noreg = ia32_new_NoReg_gp(cg);
-       ir_node *nomem = get_irg_no_mem(irg);
+       ir_node *nomem = new_NoMem();
        ir_node *push  = new_bd_ia32_Push(dbgi, block, noreg, noreg, nomem, val, stack);
        sched_add_before(schedpoint, push);
 
-       stack = new_r_Proj(irg, block, push, mode_Iu, pn_ia32_Push_stack);
+       stack = new_r_Proj(block, push, mode_Iu, pn_ia32_Push_stack);
        arch_set_irn_register(stack, esp);
 
        return stack;
@@ -883,7 +879,6 @@ static void peephole_be_IncSP(ir_node *node)
 {
        const arch_register_t *esp = &ia32_gp_regs[REG_ESP];
        const arch_register_t *reg;
-       ir_graph              *irg = current_ir_graph;
        dbg_info              *dbgi;
        ir_node               *block;
        ir_node               *stack;
@@ -919,19 +914,19 @@ static void peephole_be_IncSP(ir_node *node)
                block = get_nodes_block(node);
                stack = be_get_IncSP_pred(node);
 
-               stack = create_pop(dbgi, irg, block, stack, node, reg);
+               stack = create_pop(dbgi, block, stack, node, reg);
 
                if (offset == -8) {
-                       stack = create_pop(dbgi, irg, block, stack, node, reg);
+                       stack = create_pop(dbgi, block, stack, node, reg);
                }
        } else {
                dbgi  = get_irn_dbg_info(node);
                block = get_nodes_block(node);
                stack = be_get_IncSP_pred(node);
-               stack = create_push(dbgi, irg, block, stack, node);
+               stack = create_push(dbgi, block, stack, node);
 
                if (offset == +8) {
-                       stack = create_push(dbgi, irg, block, stack, node);
+                       stack = create_push(dbgi, block, stack, node);
                }
        }
 
index ebc4aa3..3f9bab9 100644 (file)
@@ -275,7 +275,7 @@ static ir_node *gen_Const(ir_node *node)
                                set_ia32_op_type(load, ia32_AddrModeS);
                                set_ia32_am_sc(load, floatent);
                                arch_irn_add_flags(load, arch_irn_flags_rematerializable);
-                               res = new_r_Proj(current_ir_graph, block, load, mode_xmm, pn_ia32_xLoad_res);
+                               res = new_r_Proj(block, load, mode_xmm, pn_ia32_xLoad_res);
                        }
                } else {
                        if (is_Const_null(node)) {
@@ -299,7 +299,7 @@ static ir_node *gen_Const(ir_node *node)
                                set_ia32_op_type(load, ia32_AddrModeS);
                                set_ia32_am_sc(load, floatent);
                                arch_irn_add_flags(load, arch_irn_flags_rematerializable);
-                               res = new_r_Proj(current_ir_graph, block, load, mode_vfp, pn_ia32_vfld_res);
+                               res = new_r_Proj(block, load, mode_vfp, pn_ia32_vfld_res);
                        }
                }
 #ifdef CONSTRUCT_SSE_CONST
@@ -881,7 +881,7 @@ static ir_node *fix_mem_proj(ir_node *node, ia32_address_mode_t *am)
 
        if (mode != mode_T) {
                set_irn_mode(node, mode_T);
-               return new_rd_Proj(NULL, current_ir_graph, get_nodes_block(node), node, mode, pn_ia32_res);
+               return new_rd_Proj(NULL, get_nodes_block(node), node, mode, pn_ia32_res);
        } else {
                return node;
        }
@@ -1297,12 +1297,10 @@ static ir_node *gen_Mulh(ir_node *node)
 
        if (mode_is_signed(mode)) {
                new_node = gen_binop(node, op1, op2, new_bd_ia32_IMul1OP, match_commutative | match_am);
-               proj_res_high = new_rd_Proj(dbgi, current_ir_graph, new_block, new_node,
-                                   mode_Iu, pn_ia32_IMul1OP_res_high);
+               proj_res_high = new_rd_Proj(dbgi, new_block, new_node, mode_Iu, pn_ia32_IMul1OP_res_high);
        } else {
                new_node = gen_binop(node, op1, op2, new_bd_ia32_Mul, match_commutative | match_am);
-               proj_res_high = new_rd_Proj(dbgi, current_ir_graph, new_block, new_node,
-                                   mode_Iu, pn_ia32_Mul_res_high);
+               proj_res_high = new_rd_Proj(dbgi, new_block, new_node, mode_Iu, pn_ia32_Mul_res_high);
        }
        return proj_res_high;
 }
@@ -1406,7 +1404,7 @@ static ir_node *gen_Sub(ir_node *node)
                        | match_am | match_immediate);
 }
 
-static ir_node *transform_AM_mem(ir_graph *const irg, ir_node *const block,
+static ir_node *transform_AM_mem(ir_node *const block,
                                  ir_node  *const src_val,
                                  ir_node  *const src_mem,
                                  ir_node  *const am_mem)
@@ -1442,13 +1440,13 @@ static ir_node *transform_AM_mem(ir_graph *const irg, ir_node *const block,
 
                ins[n++] = am_mem;
 
-               return new_r_Sync(irg, block, n, ins);
+               return new_r_Sync(block, n, ins);
        } else {
                ir_node *ins[2];
 
                ins[0] = be_transform_node(src_mem);
                ins[1] = am_mem;
-               return new_r_Sync(irg, block, 2, ins);
+               return new_r_Sync(block, 2, ins);
        }
 }
 
@@ -1526,7 +1524,7 @@ static ir_node *create_Div(ir_node *node)
        /* Beware: We don't need a Sync, if the memory predecessor of the Div node
           is the memory of the consumed address. We can have only the second op as address
           in Div nodes, so check only op2. */
-       new_mem = transform_AM_mem(current_ir_graph, block, op2, mem, addr->mem);
+       new_mem = transform_AM_mem(block, op2, mem, addr->mem);
 
        if (mode_is_signed(mode)) {
                sign_extension = create_sex_32_64(dbgi, new_block, am.new_op1, node);
@@ -2118,7 +2116,7 @@ static ir_node *dest_am_binop(ir_node *node, ir_node *op1, ir_node *op2,
 
        dbgi    = get_irn_dbg_info(node);
        block   = be_transform_node(src_block);
-       new_mem = transform_AM_mem(current_ir_graph, block, am.am_node, mem, addr->mem);
+       new_mem = transform_AM_mem(block, am.am_node, mem, addr->mem);
 
        if (get_mode_size_bits(mode) == 8) {
                new_node = func8bit(dbgi, block, addr->base, addr->index, new_mem, new_op);
@@ -2158,7 +2156,7 @@ static ir_node *dest_am_unop(ir_node *node, ir_node *op, ir_node *mem,
 
        dbgi     = get_irn_dbg_info(node);
        block    = be_transform_node(src_block);
-       new_mem  = transform_AM_mem(current_ir_graph, block, am.am_node, mem, addr->mem);
+       new_mem  = transform_AM_mem(block, am.am_node, mem, addr->mem);
        new_node = func(dbgi, block, addr->base, addr->index, new_mem);
        set_address(new_node, addr);
        set_ia32_op_type(new_node, ia32_AddrModeD);
@@ -2442,7 +2440,7 @@ static ir_node *gen_float_const_Store(ir_node *node, ir_node *cns)
        } while (size != 0);
 
        if (i > 1) {
-               return new_rd_Sync(dbgi, current_ir_graph, new_block, i, ins);
+               return new_rd_Sync(dbgi, new_block, i, ins);
        } else {
                return ins[0];
        }
@@ -2451,7 +2449,7 @@ static ir_node *gen_float_const_Store(ir_node *node, ir_node *cns)
 /**
  * Generate a vfist or vfisttp instruction.
  */
-static ir_node *gen_vfist(dbg_info *dbgi, ir_graph *irg, ir_node *block, ir_node *base, ir_node *index,
+static ir_node *gen_vfist(dbg_info *dbgi, ir_node *block, ir_node *base, ir_node *index,
                           ir_node *mem,  ir_node *val, ir_node **fist)
 {
        ir_node *new_node;
@@ -2461,10 +2459,10 @@ static ir_node *gen_vfist(dbg_info *dbgi, ir_graph *irg, ir_node *block, ir_node
                if other users exists */
                const arch_register_class_t *reg_class = &ia32_reg_classes[CLASS_ia32_vfp];
                ir_node *vfisttp = new_bd_ia32_vfisttp(dbgi, block, base, index, mem, val);
-               ir_node *value   = new_r_Proj(irg, block, vfisttp, mode_E, pn_ia32_vfisttp_res);
-               be_new_Keep(reg_class, irg, block, 1, &value);
+               ir_node *value   = new_r_Proj(block, vfisttp, mode_E, pn_ia32_vfisttp_res);
+               be_new_Keep(reg_class, block, 1, &value);
 
-               new_node = new_r_Proj(irg, block, vfisttp, mode_M, pn_ia32_vfisttp_M);
+               new_node = new_r_Proj(block, vfisttp, mode_M, pn_ia32_vfisttp_M);
                *fist    = vfisttp;
        } else {
                ir_node *trunc_mode = ia32_new_Fpu_truncate(env_cg);
@@ -2546,7 +2544,7 @@ static ir_node *gen_general_Store(ir_node *node)
                        val = op;
                }
                new_val  = be_transform_node(val);
-               new_node = gen_vfist(dbgi, current_ir_graph, new_block, addr.base, addr.index, addr.mem, new_val, &store);
+               new_node = gen_vfist(dbgi, new_block, addr.base, addr.index, addr.mem, new_val, &store);
        } else {
                new_val = create_immediate_or_transform(val, 0);
                assert(mode != mode_b);
@@ -2999,7 +2997,6 @@ static ir_node *create_set_32bit(dbg_info *dbgi, ir_node *new_block,
  */
 static ir_node *create_Doz(ir_node *psi, ir_node *a, ir_node *b)
 {
-       ir_graph *irg   = current_ir_graph;
        ir_mode  *mode  = get_irn_mode(psi);
        ir_node  *new_node, *sub, *sbb, *eflags, *block;
 
@@ -3016,9 +3013,9 @@ static ir_node *create_Doz(ir_node *psi, ir_node *a, ir_node *b)
        } else {
                sub = new_node;
                set_irn_mode(sub, mode_T);
-               new_node = new_rd_Proj(NULL, irg, block, sub, mode, pn_ia32_res);
+               new_node = new_rd_Proj(NULL, block, sub, mode, pn_ia32_res);
        }
-       eflags = new_rd_Proj(NULL, irg, block, sub, mode_Iu, pn_ia32_Sub_flags);
+       eflags = new_rd_Proj(NULL, block, sub, mode_Iu, pn_ia32_Sub_flags);
 
        dbgi   = get_irn_dbg_info(psi);
        sbb    = new_bd_ia32_Sbb0(dbgi, block, eflags);
@@ -3207,7 +3204,7 @@ static ir_node *gen_Mux(ir_node *node)
                                load = new_bd_ia32_vfld(dbgi, block, am.addr.base, am.addr.index, am.addr.mem, new_mode);
                        set_am_attributes(load, &am);
 
-                       return new_rd_Proj(NULL, current_ir_graph, block, load, mode_vfp, pn_ia32_res);
+                       return new_rd_Proj(NULL, block, load, mode_vfp, pn_ia32_res);
                }
                panic("cannot transform floating point Mux");
 
@@ -3270,7 +3267,7 @@ static ir_node *gen_x87_fp_to_gp(ir_node *node)
        ir_mode         *mode       = get_irn_mode(node);
        ir_node         *fist, *load, *mem;
 
-       mem = gen_vfist(dbgi, irg, block, get_irg_frame(irg), noreg_GP, nomem, new_op, &fist);
+       mem = gen_vfist(dbgi, block, get_irg_frame(irg), noreg_GP, nomem, new_op, &fist);
        set_irn_pinned(fist, op_pin_state_floats);
        set_ia32_use_frame(fist);
        set_ia32_op_type(fist, ia32_AddrModeD);
@@ -3301,7 +3298,7 @@ static ir_node *gen_x87_fp_to_gp(ir_node *node)
        }
        SET_IA32_ORIG_NODE(load, node);
 
-       return new_r_Proj(irg, block, load, mode_Iu, pn_ia32_Load_res);
+       return new_r_Proj(block, load, mode_Iu, pn_ia32_Load_res);
 }
 
 /**
@@ -3310,7 +3307,7 @@ static ir_node *gen_x87_fp_to_gp(ir_node *node)
 static ir_node *gen_x87_strict_conv(ir_mode *tgt_mode, ir_node *node)
 {
        ir_node  *block    = get_nodes_block(node);
-       ir_graph *irg      = current_ir_graph;
+       ir_graph *irg      = get_Block_irg(block);
        dbg_info *dbgi     = get_irn_dbg_info(node);
        ir_node  *frame    = get_irg_frame(irg);
        ir_node  *store, *load;
@@ -3326,7 +3323,7 @@ static ir_node *gen_x87_strict_conv(ir_mode *tgt_mode, ir_node *node)
        set_ia32_op_type(load, ia32_AddrModeS);
        SET_IA32_ORIG_NODE(load, node);
 
-       new_node = new_r_Proj(irg, block, load, mode_E, pn_ia32_vfld_res);
+       new_node = new_r_Proj(block, load, mode_E, pn_ia32_vfld_res);
        return new_node;
 }
 
@@ -3347,7 +3344,7 @@ static ir_node *gen_x87_gp_to_fp(ir_node *node, ir_mode *src_mode)
 {
        ir_node  *src_block = get_nodes_block(node);
        ir_node  *block     = be_transform_node(src_block);
-       ir_graph *irg       = current_ir_graph;
+       ir_graph *irg       = get_Block_irg(block);
        dbg_info *dbgi      = get_irn_dbg_info(node);
        ir_node  *op        = get_Conv_op(node);
        ir_node  *new_op    = NULL;
@@ -3366,7 +3363,7 @@ static ir_node *gen_x87_gp_to_fp(ir_node *node, ir_mode *src_mode)
                        ia32_address_t *addr = &am.addr;
 
                        fild     = new_bd_ia32_vfild(dbgi, block, addr->base, addr->index, addr->mem);
-                       new_node = new_r_Proj(irg, block, fild, mode_vfp, pn_ia32_vfild_res);
+                       new_node = new_r_Proj(block, fild, mode_vfp, pn_ia32_vfild_res);
 
                        set_am_attributes(fild, &am);
                        SET_IA32_ORIG_NODE(fild, node);
@@ -3417,7 +3414,7 @@ static ir_node *gen_x87_gp_to_fp(ir_node *node, ir_mode *src_mode)
                in[0] = zero_store;
                in[1] = store;
 
-               store      = new_rd_Sync(dbgi, irg, block, 2, in);
+               store      = new_rd_Sync(dbgi, block, 2, in);
                store_mode = mode_Ls;
        } else {
                store_mode = mode_Is;
@@ -3430,7 +3427,7 @@ static ir_node *gen_x87_gp_to_fp(ir_node *node, ir_mode *src_mode)
        set_ia32_op_type(fild, ia32_AddrModeS);
        set_ia32_ls_mode(fild, store_mode);
 
-       new_node = new_r_Proj(irg, block, fild, mode_vfp, pn_ia32_vfild_res);
+       new_node = new_r_Proj(block, fild, mode_vfp, pn_ia32_vfild_res);
 
        return new_node;
 }
@@ -3718,8 +3715,8 @@ static ir_node *gen_be_Return(ir_node *node)
        set_ia32_op_type(fld, ia32_AddrModeS);
        set_ia32_use_frame(fld);
 
-       mproj = new_r_Proj(irg, block, fld, mode_M, pn_ia32_vfld_M);
-       fld   = new_r_Proj(irg, block, fld, mode_vfp, pn_ia32_vfld_res);
+       mproj = new_r_Proj(block, fld, mode_M, pn_ia32_vfld_M);
+       fld   = new_r_Proj(block, fld, mode_vfp, pn_ia32_vfld_res);
 
        /* create a new barrier */
        arity = get_irn_arity(barrier);
@@ -3857,11 +3854,11 @@ static ir_node *gen_Bound(ir_node *node)
                if (! is_Proj(res)) {
                        sub = res;
                        set_irn_mode(sub, mode_T);
-                       res = new_rd_Proj(NULL, irg, block, sub, mode_Iu, pn_ia32_res);
+                       res = new_rd_Proj(NULL, block, sub, mode_Iu, pn_ia32_res);
                } else {
                        sub = get_Proj_pred(res);
                }
-               flags = new_rd_Proj(NULL, irg, block, sub, mode_Iu, pn_ia32_Sub_flags);
+               flags = new_rd_Proj(NULL, block, sub, mode_Iu, pn_ia32_Sub_flags);
                new_node = new_bd_ia32_Jcc(dbgi, block, flags, pn_Cmp_Lt | ia32_pn_Cmp_unsigned);
                SET_IA32_ORIG_NODE(new_node, node);
        } else {
@@ -4065,7 +4062,7 @@ static ir_node *gen_ia32_l_LLtoFloat(ir_node *node)
 
        in[0] = store_low;
        in[1] = store_high;
-       sync  = new_rd_Sync(dbgi, irg, block, 2, in);
+       sync  = new_rd_Sync(dbgi, block, 2, in);
 
        /* do a fild */
        fild = new_bd_ia32_vfild(dbgi, block, frame, noreg_GP, sync);
@@ -4076,7 +4073,7 @@ static ir_node *gen_ia32_l_LLtoFloat(ir_node *node)
 
        SET_IA32_ORIG_NODE(fild, node);
 
-       res = new_r_Proj(irg, block, fild, mode_vfp, pn_ia32_vfild_res);
+       res = new_r_Proj(block, fild, mode_vfp, pn_ia32_vfild_res);
 
        if (! mode_is_signed(get_irn_mode(val_high))) {
                ia32_address_mode_t  am;
@@ -4107,7 +4104,7 @@ static ir_node *gen_ia32_l_LLtoFloat(ir_node *node)
                set_am_attributes(fadd, &am);
 
                set_irn_mode(fadd, mode_T);
-               res = new_rd_Proj(NULL, irg, block, fadd, mode_vfp, pn_ia32_res);
+               res = new_rd_Proj(NULL, block, fadd, mode_vfp, pn_ia32_res);
        }
        return res;
 }
@@ -4116,14 +4113,14 @@ static ir_node *gen_ia32_l_FloattoLL(ir_node *node)
 {
        ir_node  *src_block  = get_nodes_block(node);
        ir_node  *block      = be_transform_node(src_block);
-       ir_graph *irg        = current_ir_graph;
+       ir_graph *irg        = get_Block_irg(block);
        dbg_info *dbgi       = get_irn_dbg_info(node);
        ir_node  *frame      = get_irg_frame(irg);
        ir_node  *val        = get_irn_n(node, n_ia32_l_FloattoLL_val);
        ir_node  *new_val    = be_transform_node(val);
        ir_node  *fist, *mem;
 
-       mem = gen_vfist(dbgi, irg, block, frame, noreg_GP, nomem, new_val, &fist);
+       mem = gen_vfist(dbgi, block, frame, noreg_GP, nomem, new_val, &fist);
        SET_IA32_ORIG_NODE(fist, node);
        set_ia32_use_frame(fist);
        set_ia32_op_type(fist, ia32_AddrModeD);
@@ -4143,8 +4140,8 @@ static ir_node *bad_transform(ir_node *node)
 
 static ir_node *gen_Proj_l_FloattoLL(ir_node *node)
 {
-       ir_graph *irg      = current_ir_graph;
        ir_node  *block    = be_transform_node(get_nodes_block(node));
+       ir_graph *irg      = get_Block_irg(block);
        ir_node  *pred     = get_Proj_pred(node);
        ir_node  *new_pred = be_transform_node(pred);
        ir_node  *frame    = get_irg_frame(irg);
@@ -4170,7 +4167,7 @@ static ir_node *gen_Proj_l_FloattoLL(ir_node *node)
                assert(pn == pn_ia32_l_FloattoLL_res_low);
        }
 
-       proj = new_r_Proj(irg, block, load, mode_Iu, pn_ia32_Load_res);
+       proj = new_r_Proj(block, load, mode_Iu, pn_ia32_Load_res);
 
        return proj;
 }
@@ -4183,20 +4180,19 @@ static ir_node *gen_Proj_be_AddSP(ir_node *node)
        ir_node  *block    = be_transform_node(get_nodes_block(node));
        ir_node  *pred     = get_Proj_pred(node);
        ir_node  *new_pred = be_transform_node(pred);
-       ir_graph *irg      = current_ir_graph;
        dbg_info *dbgi     = get_irn_dbg_info(node);
        long     proj      = get_Proj_proj(node);
 
        if (proj == pn_be_AddSP_sp) {
-               ir_node *res = new_rd_Proj(dbgi, irg, block, new_pred, mode_Iu,
+               ir_node *res = new_rd_Proj(dbgi, block, new_pred, mode_Iu,
                                           pn_ia32_SubSP_stack);
                arch_set_irn_register(res, &ia32_gp_regs[REG_ESP]);
                return res;
        } else if (proj == pn_be_AddSP_res) {
-               return new_rd_Proj(dbgi, irg, block, new_pred, mode_Iu,
+               return new_rd_Proj(dbgi, block, new_pred, mode_Iu,
                                   pn_ia32_SubSP_addr);
        } else if (proj == pn_be_AddSP_M) {
-               return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_ia32_SubSP_M);
+               return new_rd_Proj(dbgi, block, new_pred, mode_M, pn_ia32_SubSP_M);
        }
 
        panic("No idea how to transform proj->AddSP");
@@ -4215,12 +4211,12 @@ static ir_node *gen_Proj_be_SubSP(ir_node *node)
        long     proj      = get_Proj_proj(node);
 
        if (proj == pn_be_SubSP_sp) {
-               ir_node *res = new_rd_Proj(dbgi, irg, block, new_pred, mode_Iu,
+               ir_node *res = new_rd_Proj(dbgi, block, new_pred, mode_Iu,
                                           pn_ia32_AddSP_stack);
                arch_set_irn_register(res, &ia32_gp_regs[REG_ESP]);
                return res;
        } else if (proj == pn_be_SubSP_M) {
-               return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_ia32_AddSP_M);
+               return new_rd_Proj(dbgi, block, new_pred, mode_M, pn_ia32_AddSP_M);
        }
 
        panic("No idea how to transform proj->SubSP");
@@ -4234,7 +4230,6 @@ static ir_node *gen_Proj_Load(ir_node *node)
        ir_node  *new_pred;
        ir_node  *block    = be_transform_node(get_nodes_block(node));
        ir_node  *pred     = get_Proj_pred(node);
-       ir_graph *irg      = current_ir_graph;
        dbg_info *dbgi     = get_irn_dbg_info(node);
        long     proj      = get_Proj_proj(node);
 
@@ -4250,7 +4245,7 @@ static ir_node *gen_Proj_Load(ir_node *node)
                   reachable through the ProjM */
                be_enqueue_preds(node);
                /* do it in 2 steps, to silence firm verifier */
-               res = new_rd_Proj(dbgi, irg, old_block, pred, mode_M, pn_Load_M);
+               res = new_rd_Proj(dbgi, old_block, pred, mode_M, pn_Load_M);
                set_Proj_proj(res, pn_ia32_mem);
                return res;
        }
@@ -4260,15 +4255,15 @@ static ir_node *gen_Proj_Load(ir_node *node)
        if (is_ia32_Load(new_pred)) {
                switch (proj) {
                case pn_Load_res:
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_Iu, pn_ia32_Load_res);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_Iu, pn_ia32_Load_res);
                case pn_Load_M:
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_ia32_Load_M);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_M, pn_ia32_Load_M);
                case pn_Load_X_regular:
-                       return new_rd_Jmp(dbgi, irg, block);
+                       return new_rd_Jmp(dbgi, block);
                case pn_Load_X_except:
                        /* This Load might raise an exception. Mark it. */
                        set_ia32_exc_label(new_pred, 1);
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_X, pn_ia32_Load_X_exc);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_X, pn_ia32_Load_X_exc);
                default:
                        break;
                }
@@ -4276,37 +4271,37 @@ static ir_node *gen_Proj_Load(ir_node *node)
                   is_ia32_Conv_I2I8Bit(new_pred)) {
                set_irn_mode(new_pred, mode_T);
                if (proj == pn_Load_res) {
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_Iu, pn_ia32_res);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_Iu, pn_ia32_res);
                } else if (proj == pn_Load_M) {
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_ia32_mem);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_M, pn_ia32_mem);
                }
        } else if (is_ia32_xLoad(new_pred)) {
                switch (proj) {
                case pn_Load_res:
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_xmm, pn_ia32_xLoad_res);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_xmm, pn_ia32_xLoad_res);
                case pn_Load_M:
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_ia32_xLoad_M);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_M, pn_ia32_xLoad_M);
                case pn_Load_X_regular:
-                       return new_rd_Jmp(dbgi, irg, block);
+                       return new_rd_Jmp(dbgi, block);
                case pn_Load_X_except:
                        /* This Load might raise an exception. Mark it. */
                        set_ia32_exc_label(new_pred, 1);
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_X, pn_ia32_xLoad_X_exc);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_X, pn_ia32_xLoad_X_exc);
                default:
                        break;
                }
        } else if (is_ia32_vfld(new_pred)) {
                switch (proj) {
                case pn_Load_res:
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_vfp, pn_ia32_vfld_res);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_vfp, pn_ia32_vfld_res);
                case pn_Load_M:
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_ia32_vfld_M);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_M, pn_ia32_vfld_M);
                case pn_Load_X_regular:
-                       return new_rd_Jmp(dbgi, irg, block);
+                       return new_rd_Jmp(dbgi, block);
                case pn_Load_X_except:
                        /* This Load might raise an exception. Mark it. */
                        set_ia32_exc_label(new_pred, 1);
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_X, pn_ia32_xLoad_X_exc);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_X, pn_ia32_xLoad_X_exc);
                default:
                        break;
                }
@@ -4320,7 +4315,7 @@ static ir_node *gen_Proj_Load(ir_node *node)
                if (proj != pn_Load_M) {
                        panic("internal error: transformed node not a Load");
                }
-               return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, 1);
+               return new_rd_Proj(dbgi, block, new_pred, mode_M, 1);
        }
 
        panic("No idea how to transform proj");
@@ -4334,7 +4329,6 @@ static ir_node *gen_Proj_DivMod(ir_node *node)
        ir_node  *block    = be_transform_node(get_nodes_block(node));
        ir_node  *pred     = get_Proj_pred(node);
        ir_node  *new_pred = be_transform_node(pred);
-       ir_graph *irg      = current_ir_graph;
        dbg_info *dbgi     = get_irn_dbg_info(node);
        long     proj      = get_Proj_proj(node);
 
@@ -4344,14 +4338,14 @@ static ir_node *gen_Proj_DivMod(ir_node *node)
        case iro_Div:
                switch (proj) {
                case pn_Div_M:
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_ia32_Div_M);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_M, pn_ia32_Div_M);
                case pn_Div_res:
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_Iu, pn_ia32_Div_div_res);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_Iu, pn_ia32_Div_div_res);
                case pn_Div_X_regular:
-                       return new_rd_Jmp(dbgi, irg, block);
+                       return new_rd_Jmp(dbgi, block);
                case pn_Div_X_except:
                        set_ia32_exc_label(new_pred, 1);
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_X, pn_ia32_Div_X_exc);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_X, pn_ia32_Div_X_exc);
                default:
                        break;
                }
@@ -4359,12 +4353,12 @@ static ir_node *gen_Proj_DivMod(ir_node *node)
        case iro_Mod:
                switch (proj) {
                case pn_Mod_M:
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_ia32_Div_M);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_M, pn_ia32_Div_M);
                case pn_Mod_res:
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_Iu, pn_ia32_Div_mod_res);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_Iu, pn_ia32_Div_mod_res);
                case pn_Mod_X_except:
                        set_ia32_exc_label(new_pred, 1);
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_X, pn_ia32_Div_X_exc);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_X, pn_ia32_Div_X_exc);
                default:
                        break;
                }
@@ -4372,16 +4366,16 @@ static ir_node *gen_Proj_DivMod(ir_node *node)
        case iro_DivMod:
                switch (proj) {
                case pn_DivMod_M:
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_ia32_Div_M);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_M, pn_ia32_Div_M);
                case pn_DivMod_res_div:
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_Iu, pn_ia32_Div_div_res);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_Iu, pn_ia32_Div_div_res);
                case pn_DivMod_res_mod:
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_Iu, pn_ia32_Div_mod_res);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_Iu, pn_ia32_Div_mod_res);
                case pn_DivMod_X_regular:
-                       return new_rd_Jmp(dbgi, irg, block);
+                       return new_rd_Jmp(dbgi, block);
                case pn_DivMod_X_except:
                        set_ia32_exc_label(new_pred, 1);
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_X, pn_ia32_Div_X_exc);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_X, pn_ia32_Div_X_exc);
                default:
                        break;
                }
@@ -4401,16 +4395,15 @@ static ir_node *gen_Proj_CopyB(ir_node *node)
        ir_node  *block    = be_transform_node(get_nodes_block(node));
        ir_node  *pred     = get_Proj_pred(node);
        ir_node  *new_pred = be_transform_node(pred);
-       ir_graph *irg      = current_ir_graph;
        dbg_info *dbgi     = get_irn_dbg_info(node);
        long     proj      = get_Proj_proj(node);
 
        switch (proj) {
        case pn_CopyB_M_regular:
                if (is_ia32_CopyB_i(new_pred)) {
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_ia32_CopyB_i_M);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_M, pn_ia32_CopyB_i_M);
                } else if (is_ia32_CopyB(new_pred)) {
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_ia32_CopyB_M);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_M, pn_ia32_CopyB_M);
                }
                break;
        default:
@@ -4428,23 +4421,22 @@ static ir_node *gen_Proj_Quot(ir_node *node)
        ir_node  *block    = be_transform_node(get_nodes_block(node));
        ir_node  *pred     = get_Proj_pred(node);
        ir_node  *new_pred = be_transform_node(pred);
-       ir_graph *irg      = current_ir_graph;
        dbg_info *dbgi     = get_irn_dbg_info(node);
        long     proj      = get_Proj_proj(node);
 
        switch (proj) {
        case pn_Quot_M:
                if (is_ia32_xDiv(new_pred)) {
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_ia32_xDiv_M);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_M, pn_ia32_xDiv_M);
                } else if (is_ia32_vfdiv(new_pred)) {
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_M, pn_ia32_vfdiv_M);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_M, pn_ia32_vfdiv_M);
                }
                break;
        case pn_Quot_res:
                if (is_ia32_xDiv(new_pred)) {
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_xmm, pn_ia32_xDiv_res);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_xmm, pn_ia32_xDiv_res);
                } else if (is_ia32_vfdiv(new_pred)) {
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_vfp, pn_ia32_vfdiv_res);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_vfp, pn_ia32_vfdiv_res);
                }
                break;
        case pn_Quot_X_regular:
@@ -4518,7 +4510,7 @@ static ir_node *gen_be_Call(ir_node *node)
                }
        }
 
-       mem  = transform_AM_mem(irg, block, src_ptr, src_mem, addr->mem);
+       mem  = transform_AM_mem(block, src_ptr, src_mem, addr->mem);
        call = new_bd_ia32_Call(dbgi, block, addr->base, addr->index, mem,
                                am.new_op2, sp, fpcw, eax, ecx, edx, pop, call_tp);
        set_am_attributes(call, &am);
@@ -4599,7 +4591,7 @@ static ir_node *gen_return_address(ir_node *node) {
        }
 
        SET_IA32_ORIG_NODE(load, node);
-       return new_r_Proj(current_ir_graph, block, load, mode_Iu, pn_ia32_Load_res);
+       return new_r_Proj(block, load, mode_Iu, pn_ia32_Load_res);
 }
 
 /**
@@ -4648,7 +4640,7 @@ static ir_node *gen_frame_address(ir_node *node) {
        }
 
        SET_IA32_ORIG_NODE(load, node);
-       return new_r_Proj(current_ir_graph, block, load, mode_Iu, pn_ia32_Load_res);
+       return new_r_Proj(block, load, mode_Iu, pn_ia32_Load_res);
 }
 
 /**
@@ -4732,7 +4724,7 @@ static ir_node *gen_prefetch(ir_node *node) {
        SET_IA32_ORIG_NODE(new_node, node);
 
        be_dep_on_frame(new_node);
-       return new_r_Proj(current_ir_graph, block, new_node, mode_M, pn_ia32_Prefetch_M);
+       return new_r_Proj(block, new_node, mode_M, pn_ia32_Prefetch_M);
 }
 
 /**
@@ -4774,10 +4766,10 @@ static ir_node *gen_ffs(ir_node *node)
        /* bsf x */
        if (get_irn_mode(real) != mode_T) {
                set_irn_mode(real, mode_T);
-               bsf = new_r_Proj(current_ir_graph, block, real, mode_Iu, pn_ia32_res);
+               bsf = new_r_Proj(block, real, mode_Iu, pn_ia32_res);
        }
 
-       flag = new_r_Proj(current_ir_graph, block, real, mode_b, pn_ia32_flags);
+       flag = new_r_Proj(block, real, mode_b, pn_ia32_flags);
 
        /* sete */
        set = new_bd_ia32_Set(dbgi, block, flag, pn_Cmp_Eq, 0);
@@ -5125,7 +5117,7 @@ static ir_node *gen_inner_trampoline(ir_node *node) {
        in[0] = store;
        in[1] = trampoline;
 
-       return new_r_Tuple(current_ir_graph, new_block, 2, in);
+       return new_r_Tuple(new_block, 2, in);
 }
 
 /**
@@ -5194,11 +5186,11 @@ static ir_node *gen_Proj_Builtin(ir_node *proj) {
                return new_node;
        case ir_bk_inport:
                if (get_Proj_proj(proj) == pn_Builtin_1_result) {
-                       return new_r_Proj(current_ir_graph, get_nodes_block(new_node),
+                       return new_r_Proj(get_nodes_block(new_node),
                                          new_node, get_irn_mode(proj), pn_ia32_Inport_res);
                } else {
                        assert(get_Proj_proj(proj) == pn_Builtin_M);
-                       return new_r_Proj(current_ir_graph, get_nodes_block(new_node),
+                       return new_r_Proj(get_nodes_block(new_node),
                                new_node, mode_M, pn_ia32_Inport_M);
                }
        case ir_bk_inner_trampoline:
@@ -5235,7 +5227,7 @@ static ir_node *gen_Proj_be_Call(ir_node *node)
        ir_node  *res;
 
        if (proj == pn_be_Call_M_regular) {
-               return new_rd_Proj(dbgi, irg, block, new_call, mode_M, n_ia32_Call_mem);
+               return new_rd_Proj(dbgi, block, new_call, mode_M, n_ia32_Call_mem);
        }
        /* transform call modes */
        if (mode_is_data(mode)) {
@@ -5270,7 +5262,7 @@ static ir_node *gen_Proj_be_Call(ir_node *node)
                assert(i < n_outs);
        }
 
-       res = new_rd_Proj(dbgi, irg, block, new_call, mode, proj);
+       res = new_rd_Proj(dbgi, block, new_call, mode, proj);
 
        /* TODO arch_set_irn_register() only operates on Projs, need variant with index */
        switch (proj) {
@@ -5310,11 +5302,11 @@ static ir_node *gen_Proj_Bound(ir_node *node)
        case pn_Bound_X_regular:
                new_node = be_transform_node(pred);
                block    = get_nodes_block(new_node);
-               return new_r_Proj(current_ir_graph, block, new_node, mode_X, pn_ia32_Jcc_true);
+               return new_r_Proj(block, new_node, mode_X, pn_ia32_Jcc_true);
        case pn_Bound_X_except:
                new_node = be_transform_node(pred);
                block    = get_nodes_block(new_node);
-               return new_r_Proj(current_ir_graph, block, new_node, mode_X, pn_ia32_Jcc_false);
+               return new_r_Proj(block, new_node, mode_X, pn_ia32_Jcc_false);
        case pn_Bound_res:
                return be_transform_node(get_Bound_index(pred));
        default:
@@ -5340,7 +5332,7 @@ static ir_node *gen_Proj_ASM(ir_node *node)
                panic("unexpected proj mode at ASM");
        }
 
-       return new_r_Proj(current_ir_graph, block, new_pred, mode, pos);
+       return new_r_Proj(block, new_pred, mode, pos);
 }
 
 /**
@@ -5391,7 +5383,7 @@ static ir_node *gen_Proj(ir_node *node)
                                ir_node  *new_block = be_transform_node(block);
                                dbg_info *dbgi      = get_irn_dbg_info(node);
                                /* we exchange the ProjX with a jump */
-                               ir_node  *jump      = new_rd_Jmp(dbgi, current_ir_graph, new_block);
+                               ir_node  *jump      = new_rd_Jmp(dbgi, new_block);
 
                                return jump;
                        }
@@ -5413,7 +5405,7 @@ static ir_node *gen_Proj(ir_node *node)
                        if (ia32_mode_needs_gp_reg(mode)) {
                                ir_node *new_pred = be_transform_node(pred);
                                ir_node *block    = be_transform_node(get_nodes_block(node));
-                               ir_node *new_proj = new_r_Proj(current_ir_graph, block, new_pred,
+                               ir_node *new_proj = new_r_Proj(block, new_pred,
                                                                                           mode_Iu, get_Proj_proj(node));
                                new_proj->node_nr = node->node_nr;
                                return new_proj;
@@ -5604,12 +5596,11 @@ static void add_missing_keep_walker(ir_node *node, void *data)
                }
 
                block = get_nodes_block(node);
-               in[0] = new_r_Proj(current_ir_graph, block, node,
-                                  arch_register_class_mode(cls), i);
+               in[0] = new_r_Proj(block, node, arch_register_class_mode(cls), i);
                if (last_keep != NULL) {
                        be_Keep_add_node(last_keep, cls, in[0]);
                } else {
-                       last_keep = be_new_Keep(cls, current_ir_graph, block, 1, in);
+                       last_keep = be_new_Keep(cls, block, 1, in);
                        if (sched_is_scheduled(node)) {
                                sched_add_after(node, last_keep);
                        }
@@ -5692,7 +5683,7 @@ static void postprocess_fp_call_results(void) {
                                                ir_node  *block    = get_nodes_block(call);
                                                ir_node  *frame    = get_irg_frame(current_ir_graph);
                                                ir_node  *old_mem  = be_get_Proj_for_pn(call, pn_ia32_Call_M);
-                                               ir_node  *call_mem = new_r_Proj(current_ir_graph, block, call, mode_M, pn_ia32_Call_M);
+                                               ir_node  *call_mem = new_r_Proj(block, call, mode_M, pn_ia32_Call_M);
                                                ir_node  *vfst, *xld, *new_mem;
 
                                                /* store st(0) on stack */
@@ -5705,8 +5696,8 @@ static void postprocess_fp_call_results(void) {
                                                set_ia32_op_type(xld, ia32_AddrModeS);
                                                set_ia32_use_frame(xld);
 
-                                               new_res = new_r_Proj(current_ir_graph, block, xld, mode, pn_ia32_xLoad_res);
-                                               new_mem = new_r_Proj(current_ir_graph, block, xld, mode_M, pn_ia32_xLoad_M);
+                                               new_res = new_r_Proj(block, xld, mode, pn_ia32_xLoad_res);
+                                               new_mem = new_r_Proj(block, xld, mode_M, pn_ia32_xLoad_M);
 
                                                if (old_mem != NULL) {
                                                        edges_reroute(old_mem, new_mem, current_ir_graph);
index 4f85646..ba97016 100644 (file)
@@ -1267,9 +1267,8 @@ static int sim_store(x87_state *state, ir_node *n, ir_op *op, ir_op *op_p)
                                set_ia32_am_sc(vfld, get_ia32_am_sc(n));
                                set_ia32_ls_mode(vfld, get_ia32_ls_mode(n));
 
-                               irg   = get_irn_irg(n);
-                               rproj = new_r_Proj(irg, block, vfld, get_ia32_ls_mode(vfld), pn_ia32_vfld_res);
-                               mproj = new_r_Proj(irg, block, vfld, mode_M, pn_ia32_vfld_M);
+                               rproj = new_r_Proj(block, vfld, get_ia32_ls_mode(vfld), pn_ia32_vfld_res);
+                               mproj = new_r_Proj(block, vfld, mode_M, pn_ia32_vfld_M);
                                mem   = get_irn_Proj_for_mode(n, mode_M);
 
                                assert(mem && "Store memory not found");
@@ -1277,6 +1276,7 @@ static int sim_store(x87_state *state, ir_node *n, ir_op *op, ir_op *op_p)
                                arch_set_irn_register(rproj, op2);
 
                                /* reroute all former users of the store memory to the load memory */
+                               irg = get_irn_irg(n);
                                edges_reroute(mem, mproj, irg);
                                /* set the memory input of the load to the store memory */
                                set_irn_n(vfld, n_ia32_vfld_mem, mem);
@@ -1734,12 +1734,11 @@ static int sim_Keep(x87_state *state, ir_node *node)
  */
 static void keep_float_node_alive(ir_node *node)
 {
-       ir_graph                    *irg    = get_irn_irg(node);
        ir_node                     *block  = get_nodes_block(node);
        const arch_register_class_t *cls    = arch_get_irn_reg_class_out(node);
        ir_node                     *keep;
 
-       keep = be_new_Keep(cls, irg, block, 1, &node);
+       keep = be_new_Keep(cls, block, 1, &node);
 
        assert(sched_is_scheduled(node));
        sched_add_after(node, keep);
index 0604a32..da9d46b 100644 (file)
@@ -522,7 +522,7 @@ static const arch_register_t *mips_abi_prologue(void *self, ir_node** mem, pmap
                /* Note: ideally we would route these mem edges directly towards the
                 * epilogue, but this is currently not supported so we sync all mems
                 * together */
-               sync = new_r_Sync(irg, block, 2, mm+4);
+               sync = new_r_Sync(block, 2, mm+4);
                *mem = sync;
        } else {
                ir_node *reg, *store;
@@ -573,8 +573,8 @@ static void mips_abi_epilogue(void *self, ir_node *block, ir_node **mem, pmap *r
                              fp_save_offset - initial_frame_size);
        panic("FIXME register requirement with ignore");
 
-       fp = new_r_Proj(irg, block, load, mode_Iu, pn_mips_lw_res);
-       *mem = new_r_Proj(irg, block, load, mode_Iu, pn_mips_lw_M);
+       fp = new_r_Proj(block, load, mode_Iu, pn_mips_lw_res);
+       *mem = new_r_Proj(block, load, mode_Iu, pn_mips_lw_M);
        arch_set_irn_register(fp, &mips_gp_regs[REG_FP]);
 
        be_abi_reg_map_set(reg_map, &mips_gp_regs[REG_FP], fp);
index f41020c..bb123d7 100644 (file)
@@ -436,11 +436,9 @@ static ir_node *gen_Proj_DivMod(ir_node *node)
        case iro_Div:
                switch(pn) {
                case pn_Div_M:
-                       return new_rd_Proj(dbgi, irg, block, new_div, mode_M,
-                                          pn_mips_div_M);
+                       return new_rd_Proj(dbgi, block, new_div, mode_M, pn_mips_div_M);
                case pn_Div_res:
-                       proj = new_rd_Proj(dbgi, irg, block, new_div, mode_M,
-                                          pn_mips_div_lohi);
+                       proj = new_rd_Proj(dbgi, block, new_div, mode_M, pn_mips_div_lohi);
                        return new_bd_mips_mflo(dbgi, block, proj);
                default:
                        break;
@@ -448,11 +446,9 @@ static ir_node *gen_Proj_DivMod(ir_node *node)
        case iro_Mod:
                switch(pn) {
                case pn_Mod_M:
-                       return new_rd_Proj(dbgi, irg, block, new_div, mode_M,
-                                          pn_mips_div_M);
+                       return new_rd_Proj(dbgi, block, new_div, mode_M, pn_mips_div_M);
                case pn_Mod_res:
-                       proj = new_rd_Proj(dbgi, irg, block, new_div, mode_M,
-                                          pn_mips_div_lohi);
+                       proj = new_rd_Proj(dbgi, block, new_div, mode_M, pn_mips_div_lohi);
                        return new_bd_mips_mfhi(dbgi, block, proj);
                default:
                        break;
@@ -461,15 +457,12 @@ static ir_node *gen_Proj_DivMod(ir_node *node)
        case iro_DivMod:
                switch(pn) {
                case pn_Div_M:
-                       return new_rd_Proj(dbgi, irg, block, new_div, mode_M,
-                                          pn_mips_div_M);
+                       return new_rd_Proj(dbgi, block, new_div, mode_M, pn_mips_div_M);
                case pn_DivMod_res_div:
-                       proj = new_rd_Proj(dbgi, irg, block, new_div, mode_M,
-                                          pn_mips_div_lohi);
+                       proj = new_rd_Proj(dbgi, block, new_div, mode_M, pn_mips_div_lohi);
                        return new_bd_mips_mflo(dbgi, block, proj);
                case pn_DivMod_res_mod:
-                       proj = new_rd_Proj(dbgi, irg, block, new_div, mode_M,
-                                          pn_mips_div_lohi);
+                       proj = new_rd_Proj(dbgi, block, new_div, mode_M, pn_mips_div_lohi);
                        return new_bd_mips_mfhi(dbgi, block, proj);
                default:
                        break;
@@ -483,16 +476,17 @@ static ir_node *gen_Proj_DivMod(ir_node *node)
 
 static ir_node *gen_Proj_Start(ir_node *node)
 {
-       ir_graph *irg   = current_ir_graph;
        dbg_info *dbgi  = get_irn_dbg_info(node);
        ir_node  *block = be_transform_node(get_nodes_block(node));
        long      pn    = get_Proj_proj(node);
+       ir_graph *irg;
 
        if(pn == pn_Start_X_initial_exec) {
                /* we exchange the projx with a jump */
-               ir_node *jump = new_rd_Jmp(dbgi, irg, block);
+               ir_node *jump = new_rd_Jmp(dbgi, block);
                return jump;
        }
+       irg = get_irn_irg(node);
        if(node == get_irg_anchor(irg, anchor_tls)) {
                /* TODO... */
                return be_duplicate_node(node);
@@ -502,7 +496,6 @@ static ir_node *gen_Proj_Start(ir_node *node)
 
 static ir_node *gen_Proj(ir_node *node)
 {
-       ir_graph *irg  = current_ir_graph;
        dbg_info *dbgi = get_irn_dbg_info(node);
        ir_node  *pred = get_Proj_pred(node);
 
@@ -526,7 +519,7 @@ static ir_node *gen_Proj(ir_node *node)
                        ir_node *block    = be_transform_node(get_nodes_block(node));
                        long     pn       = get_Proj_proj(node);
 
-                       return new_rd_Proj(dbgi, irg, block, new_pred, mode_Iu, pn);
+                       return new_rd_Proj(dbgi, block, new_pred, mode_Iu, pn);
                }
                break;
        }
@@ -536,9 +529,9 @@ static ir_node *gen_Proj(ir_node *node)
 
 static ir_node *gen_Phi(ir_node *node)
 {
-       ir_graph *irg   = current_ir_graph;
        dbg_info *dbgi  = get_irn_dbg_info(node);
        ir_node  *block = be_transform_node(get_nodes_block(node));
+       ir_graph *irg   = get_Block_irg(block);
        ir_mode  *mode  = get_irn_mode(node);
        ir_node  *phi;
 
@@ -610,7 +603,7 @@ ir_node *gen_node_for_SwitchCond(mips_transform_env_t *env)
        // subtract minval from the switch value
 
        if(minval != 0) {
-               minval_const = new_rd_Const(dbg, irg, block, selector_mode, new_tarval_from_long(minval, selector_mode));
+               minval_const = new_rd_Const(dbg, irg, selector_mode, new_tarval_from_long(minval, selector_mode));
                minval_const = gen_node_for_Const(env, dbg, irg, block, minval_const);
                sub = new_bd_mips_sub(dbg, block, selector, minval_const);
        } else {
@@ -623,7 +616,7 @@ ir_node *gen_node_for_SwitchCond(mips_transform_env_t *env)
                        get_mode_sort(selector_mode), get_mode_size_bits(selector_mode),
                        0, get_mode_arithmetic(selector_mode), get_mode_modulo_shift(selector_mode));
 
-       max_const = new_rd_Const(dbg, irg, block, unsigned_mode, new_tarval_from_long(maxval - minval + 1, unsigned_mode));
+       max_const = new_rd_Const(dbg, irg, unsigned_mode, new_tarval_from_long(maxval - minval + 1, unsigned_mode));
        max_const = gen_node_for_Const(env, dbg, irg, block, max_const);
        sltu = new_bd_mips_slt(dbg, block, sub, max_const);
 
@@ -645,7 +638,7 @@ ir_node *gen_node_for_SwitchCond(mips_transform_env_t *env)
        attr->modes.load_store_mode = mode_Iu;
        attr->tv = new_tarval_from_long(0, mode_Iu);
 
-       proj = new_rd_Proj(dbg, irg, block, load, mode_Iu, pn_Load_res);
+       proj = new_rd_Proj(dbg, block, load, mode_Iu, pn_Load_res);
 
        switchjmp = new_bd_mips_SwitchJump(dbg, block, proj, mode_T);
        attr = get_mips_attr(switchjmp);
@@ -1056,7 +1049,7 @@ static void mips_transform_Reload(mips_transform_env_t* env) {
 
        load = new_bd_mips_lw(env->dbg, env->block, ptr, mem, ent, 0);
 
-       proj = new_rd_Proj(env->dbg, env->irg, env->block, load, mode_Iu, pn_mips_lw_res);
+       proj = new_rd_Proj(env->dbg, env->block, load, mode_Iu, pn_mips_lw_res);
 
        if (sched_point) {
                sched_add_after(sched_point, load);
index 3d7b956..be3b2b5 100644 (file)
@@ -411,7 +411,7 @@ static void ppc32_transform_spill(ir_node *node, void *env)
 
                set_ppc32_frame_entity(store, be_get_frame_entity(node));
 
-               proj = new_rd_Proj(dbg, current_ir_graph, block, store, mode_M, pn_Store_M);
+               proj = new_rd_Proj(dbg, block, store, mode_M, pn_Store_M);
 
                if (sched_is_scheduled(node)) {
                        sched_add_after(sched_prev(node), store);
@@ -445,7 +445,7 @@ static void ppc32_transform_spill(ir_node *node, void *env)
 
                set_ppc32_frame_entity(load, be_get_frame_entity(node));
 
-               proj = new_rd_Proj(dbg, current_ir_graph, block, load, mode, pn_Load_res);
+               proj = new_rd_Proj(dbg, block, load, mode, pn_Load_res);
 
                if (sched_is_scheduled(node)) {
                        sched_add_after(sched_prev(node), load);
index 50deb46..29455cb 100644 (file)
@@ -503,7 +503,7 @@ static ir_node *gen_DivMod(ppc32_transform_env_t *env) {
        }
 
        if (proj_div == NULL)
-               proj_div = new_rd_Proj(env->dbg, env->irg, env->block, div_result, get_irn_mode(proj_mod), pn_DivMod_res_div);
+               proj_div = new_rd_Proj(env->dbg, env->block, div_result, get_irn_mode(proj_mod), pn_DivMod_res_div);
 
        if (proj_mod!=NULL){
                ir_node *mul_result;
@@ -559,7 +559,7 @@ static ir_node *gen_Mod(ppc32_transform_env_t *env) {
 
        }
 
-       proj_div = new_rd_Proj(env->dbg, env->irg, env->block, div_result, res_mode, pn_DivMod_res_div);
+       proj_div = new_rd_Proj(env->dbg, env->block, div_result, res_mode, pn_DivMod_res_div);
 
        mul_result = new_bd_ppc32_Mullw(env->dbg, env->block, proj_div, op2, res_mode);
        mod_result = new_bd_ppc32_Sub(env->dbg, env->block, op1, mul_result, res_mode);
@@ -755,9 +755,9 @@ static ir_node *own_gen_Andi_dot_lo16(ppc32_transform_env_t *env, ir_node *op, i
        ir_node* in[1];
        set_ppc32_offset_mode(andi, ppc32_ao_Lo16);
        set_ppc32_constant_tarval(andi, new_tarval_from_long(mask, mode_Is));
-       in[0] = new_rd_Proj(env->dbg, env->irg, env->block, andi, env->mode,1);
-       be_new_Keep(&ppc32_reg_classes[CLASS_ppc32_condition], env->irg, env->block, 1, in);
-       return new_rd_Proj(env->dbg, env->irg, env->block, andi, env->mode,0);
+       in[0] = new_rd_Proj(env->dbg, env->block, andi, env->mode,1);
+       be_new_Keep(&ppc32_reg_classes[CLASS_ppc32_condition], env->block, 1, in);
+       return new_rd_Proj(env->dbg, env->block, andi, env->mode,0);
 }
 
 /**
@@ -989,7 +989,7 @@ static ir_node *gen_Load(ppc32_transform_env_t *env) {
                {
                        ir_node *proj_load, *extsb_node;
                        load =  new_bd_ppc32_Lbz(env->dbg, env->block, loadptr, get_Load_mem(node));
-                       proj_load = new_rd_Proj(env->dbg, env->irg, env->block, load, mode, pn_Load_res);
+                       proj_load = new_rd_Proj(env->dbg, env->block, load, mode, pn_Load_res);
                        extsb_node = new_bd_ppc32_Extsb(env->dbg, env->block, proj_load, mode);
                        exchange(get_succ_Proj(env->irn, pn_Load_res), extsb_node);
                        break;
@@ -1115,26 +1115,26 @@ static ir_node *gen_CopyB(ppc32_transform_env_t *env) {
                load = new_bd_ppc32_Lwz(env->dbg, env->block, src, mem);
                set_ppc32_constant_tarval(load, offset0);
                set_ppc32_offset_mode(load, ppc32_ao_None);
-               mem = new_rd_Proj(env->dbg, env->irg, env->block, load, mode_M, pn_Load_M);
-               res = new_rd_Proj(env->dbg, env->irg, env->block, load, mode_Is, pn_Load_res);
+               mem = new_rd_Proj(env->dbg, env->block, load, mode_M, pn_Load_M);
+               res = new_rd_Proj(env->dbg, env->block, load, mode_Is, pn_Load_res);
 
                store = new_bd_ppc32_Stw(env->dbg, env->block, dest, res, mem);
                set_ppc32_constant_tarval(store, offset0);
                set_ppc32_offset_mode(store, ppc32_ao_None);
-               mem = new_rd_Proj(env->dbg, env->irg, env->block, store, mode_M, pn_Store_M);
+               mem = new_rd_Proj(env->dbg, env->block, store, mode_M, pn_Store_M);
 
                if(size/4==2)
                {
                        load = new_bd_ppc32_Lwz(env->dbg, env->block, src, mem);
                        set_ppc32_constant_tarval(load, offset4);
                        set_ppc32_offset_mode(load, ppc32_ao_None);
-                       mem = new_rd_Proj(env->dbg, env->irg, env->block, load, mode_M, pn_Load_M);
-                       res = new_rd_Proj(env->dbg, env->irg, env->block, load, mode_Is, pn_Load_res);
+                       mem = new_rd_Proj(env->dbg,  env->block, load, mode_M, pn_Load_M);
+                       res = new_rd_Proj(env->dbg,  env->block, load, mode_Is, pn_Load_res);
 
                        store = new_bd_ppc32_Stw(env->dbg, env->block, dest, res, mem);
                        set_ppc32_constant_tarval(store, offset4);
                        set_ppc32_offset_mode(store, ppc32_ao_None);
-                       mem = new_rd_Proj(env->dbg, env->irg, env->block, store, mode_M, pn_Store_M);
+                       mem = new_rd_Proj(env->dbg, env->block, store, mode_M, pn_Store_M);
 
                        offset = 8;
                }
@@ -1161,14 +1161,14 @@ static ir_node *gen_CopyB(ppc32_transform_env_t *env) {
                        mtctrnode = new_bd_ppc32_Mtctr(env->dbg, env->block, ornode, mode_Is);
                        store = new_bd_ppc32_LoopCopy(env->dbg, env->block, src, dest, mtctrnode, mem, mode_T);
 
-                       in[0] = new_rd_Proj(env->dbg, env->irg, env->block, store, mode_Is, 1); // src
-                       in[1] = new_rd_Proj(env->dbg, env->irg, env->block, store, mode_Is, 2); // dest
-                       in[2] = new_rd_Proj(env->dbg, env->irg, env->block, store, mode_Is, 4); // temp
-                       be_new_Keep(&ppc32_reg_classes[CLASS_ppc32_gp], env->irg, env->block, 3, in);
-                       in[0] = new_rd_Proj(env->dbg, env->irg, env->block, store, mode_Is, 3); // ctr
-                       be_new_Keep(&ppc32_reg_classes[CLASS_ppc32_count], env->irg, env->block, 1, in);
+                       in[0] = new_rd_Proj(env->dbg, env->block, store, mode_Is, 1); // src
+                       in[1] = new_rd_Proj(env->dbg, env->block, store, mode_Is, 2);   // dest
+                       in[2] = new_rd_Proj(env->dbg, env->block, store, mode_Is, 4);   // temp
+                       be_new_Keep(&ppc32_reg_classes[CLASS_ppc32_gp], env->block, 3, in);
+                       in[0] = new_rd_Proj(env->dbg, env->block, store, mode_Is, 3); // ctr
+                       be_new_Keep(&ppc32_reg_classes[CLASS_ppc32_count], env->block, 1, in);
 
-                       mem = new_rd_Proj(env->dbg, env->irg, env->block, store, mode_M, 0);
+                       mem = new_rd_Proj(env->dbg, env->block, store, mode_M, 0);
 
                        offset = 4;
                }
@@ -1181,13 +1181,13 @@ static ir_node *gen_CopyB(ppc32_transform_env_t *env) {
                load = new_bd_ppc32_Lhz(env->dbg, env->block, src, mem);
                set_ppc32_constant_tarval(load, offset_tarval);
                set_ppc32_offset_mode(load, ppc32_ao_None);
-               mem = new_rd_Proj(env->dbg, env->irg, env->block, load, mode_M, pn_Load_M);
-               res = new_rd_Proj(env->dbg, env->irg, env->block, load, mode_Is, pn_Load_res);
+               mem = new_rd_Proj(env->dbg, env->block, load, mode_M, pn_Load_M);
+               res = new_rd_Proj(env->dbg, env->block, load, mode_Is, pn_Load_res);
 
                store = new_bd_ppc32_Sth(env->dbg, env->block, dest, res, mem);
                set_ppc32_constant_tarval(store, offset_tarval);
                set_ppc32_offset_mode(store, ppc32_ao_None);
-               mem = new_rd_Proj(env->dbg, env->irg, env->block, store, mode_M, pn_Store_M);
+               mem = new_rd_Proj(env->dbg, env->block, store, mode_M, pn_Store_M);
 
                offset += 2;
        }
@@ -1199,8 +1199,8 @@ static ir_node *gen_CopyB(ppc32_transform_env_t *env) {
                load = new_bd_ppc32_Lbz(env->dbg, env->block, src, mem);
                set_ppc32_constant_tarval(load, offset_tarval);
                set_ppc32_offset_mode(load, ppc32_ao_None);
-               mem = new_rd_Proj(env->dbg, env->irg, env->block, load, mode_M, pn_Load_M);
-               res = new_rd_Proj(env->dbg, env->irg, env->block, load, mode_Is, pn_Load_res);
+               mem = new_rd_Proj(env->dbg, env->block, load, mode_M, pn_Load_M);
+               res = new_rd_Proj(env->dbg, env->block, load, mode_Is, pn_Load_res);
 
                store = new_bd_ppc32_Stb(env->dbg, env->block, dest, res, mem);
                set_ppc32_constant_tarval(store, offset_tarval);
@@ -1553,7 +1553,7 @@ static ir_node *gen_ppc32_fConst(ppc32_transform_env_t *env) {
                                else // mode_F
                                        load = new_bd_ppc32_Lfs(env->dbg, env->block, addr, new_NoMem());
                        }
-                       return new_rd_Proj(env->dbg, env->irg, env->block, load, mode, pn_Load_res);
+                       return new_rd_Proj(env->dbg, env->block, load, mode, pn_Load_res);
                }
 
                default:
@@ -1608,7 +1608,7 @@ static ir_node *gen_ppc32_SymConst(ppc32_transform_env_t *env) {
                                node = new_bd_ppc32_Lwz(env->dbg, env->block, node_addis, new_NoMem());
                                set_ppc32_symconst_ident(node, id_symconst);
                                set_ppc32_offset_mode(node, ppc32_ao_Lo16);
-                               node = new_rd_Proj(env->dbg, env->irg, env->block, node, env->mode, pn_Load_res);
+                               node = new_rd_Proj(env->dbg, env->block, node, env->mode, pn_Load_res);
                        }
                        break;
                }
index 1b28460..931a383 100644 (file)
@@ -88,11 +88,11 @@ static ir_node *own_gen_convert_call(ppc32_transform_env_t *env, ir_node *op, co
 
        method_ent   = new_entity(get_glob_type(), new_id_from_str(funcname), method_type);
        callee       = new_rd_SymConst_addr_ent(env->dbg, env->irg, mode_P_code, method_ent, method_type);
-       call         = new_rd_Call(env->dbg, env->irg, env->block, memory, callee, 1, in, method_type);
-       call_results = new_rd_Proj(env->dbg, env->irg, env->block, call, mode_T, pn_Call_T_result);
-       memory       = new_rd_Proj(env->dbg, env->irg, env->block, call, mode_M, pn_Call_M_regular);
+       call         = new_rd_Call(env->dbg, env->block, memory, callee, 1, in, method_type);
+       call_results = new_rd_Proj(env->dbg, env->block, call, mode_T, pn_Call_T_result);
+       memory       = new_rd_Proj(env->dbg, env->block, call, mode_M, pn_Call_M_regular);
 
-       return new_rd_Proj(env->dbg, env->irg, env->block, call_results, to_mode, 0);
+       return new_rd_Proj(env->dbg, env->block, call_results, to_mode, 0);
 }
 
 /**
@@ -113,7 +113,7 @@ static ir_node *gen_Conv(ppc32_transform_env_t *env, ir_node *op) {
 
        switch(from_modecode){
                case irm_F:
-                       op = new_rd_Conv(env->dbg, env->irg, env->block, op, mode_D);
+                       op = new_rd_Conv(env->dbg, env->block, op, mode_D);
                        // fall through
                case irm_D:
                {
@@ -123,15 +123,15 @@ static ir_node *gen_Conv(ppc32_transform_env_t *env, ir_node *op) {
                                ir_node *fctiw = new_bd_ppc32_fCtiw(env->dbg, env->block, op, from_mode);
                                ir_node *stfd = new_bd_ppc32_Stfd(env->dbg, env->block, get_irg_frame(env->irg),
                                        fctiw, memory);
-                               ir_node *storememproj = new_rd_Proj(env->dbg, env->irg, env->block, stfd, mode_M, pn_Store_M);
+                               ir_node *storememproj = new_rd_Proj(env->dbg, env->block, stfd, mode_M, pn_Store_M);
                                ir_node *lwz = new_bd_ppc32_Lwz(env->dbg, env->block, get_irg_frame(env->irg),
                                        storememproj);
                                set_ppc32_frame_entity(stfd, memslot);
                                set_ppc32_offset_mode(stfd, ppc32_ao_Lo16);     // TODO: only allows a 16-bit offset on stack
                                set_ppc32_frame_entity(lwz, memslot);
                                set_ppc32_offset_mode(stfd, ppc32_ao_Lo16);     // TODO: only allows a 16-bit offset on stack
-                               memory = new_rd_Proj(env->dbg, env->irg, env->block, lwz, mode_M, pn_Store_M);
-                               res = new_rd_Proj(env->dbg, env->irg, env->block, lwz, to_mode, pn_Load_res);
+                               memory = new_rd_Proj(env->dbg, env->block, lwz, mode_M, pn_Store_M);
+                               res = new_rd_Proj(env->dbg, env->block, lwz, to_mode, pn_Load_res);
 
                        }
                        else
@@ -145,7 +145,7 @@ static ir_node *gen_Conv(ppc32_transform_env_t *env, ir_node *op) {
                                case irm_Hs:
                                case irm_Bu:
                                case irm_Hu:
-                                       return new_rd_Conv(env->dbg, env->irg, env->block, res, to_mode);
+                                       return new_rd_Conv(env->dbg, env->block, res, to_mode);
                                case irm_Is:
                                case irm_Iu:
                                        return res;
@@ -156,14 +156,14 @@ static ir_node *gen_Conv(ppc32_transform_env_t *env, ir_node *op) {
                }
                case irm_Hs:
                case irm_Bs:
-                       op = new_rd_Conv(env->dbg, env->irg, env->block, op, mode_Is);
+                       op = new_rd_Conv(env->dbg, env->block, op, mode_Is);
                case irm_Is:
                        return own_gen_convert_call(env, op, (to_mode == mode_D) ? "conv_int_to_double" : "conv_int_to_single", mode_Is, to_mode);
 
 
                case irm_Hu:
                case irm_Bu:
-                       op = new_rd_Conv(env->dbg, env->irg, env->block, op, mode_Iu);
+                       op = new_rd_Conv(env->dbg, env->block, op, mode_Iu);
                case irm_Iu:
                        return own_gen_convert_call(env, op, (to_mode == mode_D) ? "conv_unsigned_int_to_double": "conv_unsigned_int_to_single", mode_Iu, to_mode);
 
index c936d11..58940f7 100644 (file)
@@ -80,16 +80,16 @@ void instrument_initcall(ir_graph *irg, ir_entity *ent) {
 
        if (need_new_block) {
                ir_node *blk = new_r_Block(irg, 1, &initial_exec);
-               set_Block_cfgpred(first_block, idx, new_r_Jmp(irg, blk));
+               set_Block_cfgpred(first_block, idx, new_r_Jmp(blk));
                first_block = blk;
        }
 
        /* place the call */
        sym.entity_p = ent;
-       adr = new_r_SymConst(irg, start_block, mode_P_code, sym, symconst_addr_ent);
+       adr = new_r_SymConst(irg, mode_P_code, sym, symconst_addr_ent);
 
-       call    = new_r_Call(irg, first_block, get_irg_no_mem(irg), adr, 0, NULL, get_entity_type(ent));
-       new_mem = new_r_Proj(irg, first_block, call, mode_M, pn_Call_M_regular);
+       call    = new_r_Call(first_block, get_irg_no_mem(irg), adr, 0, NULL, get_entity_type(ent));
+       new_mem = new_r_Proj(first_block, call, mode_M, pn_Call_M_regular);
 
        initial_mem = get_irg_initial_mem(irg);
        edges_reroute(initial_mem, new_mem, irg);
index bc37358..1f590ab 100644 (file)
@@ -446,20 +446,20 @@ static ir_node *build_graph(mul_env *env, instruction *inst) {
                l = build_graph(env, inst->in[0]);
                r = build_graph(env, inst->in[1]);
                c = new_Const_long(env->shf_mode, inst->shift_count);
-               r = new_rd_Shl(env->dbg, current_ir_graph, env->blk, r, c, env->mode);
-               return inst->irn = new_rd_Add(env->dbg, current_ir_graph, env->blk, l, r, env->mode);
+               r = new_rd_Shl(env->dbg, env->blk, r, c, env->mode);
+               return inst->irn = new_rd_Add(env->dbg, env->blk, l, r, env->mode);
        case SHIFT:
                l = build_graph(env, inst->in[0]);
                c = new_Const_long(env->shf_mode, inst->shift_count);
-               return inst->irn = new_rd_Shl(env->dbg, current_ir_graph, env->blk, l, c, env->mode);
+               return inst->irn = new_rd_Shl(env->dbg, env->blk, l, c, env->mode);
        case SUB:
                l = build_graph(env, inst->in[0]);
                r = build_graph(env, inst->in[1]);
-               return inst->irn = new_rd_Sub(env->dbg, current_ir_graph, env->blk, l, r, env->mode);
+               return inst->irn = new_rd_Sub(env->dbg, env->blk, l, r, env->mode);
        case ADD:
                l = build_graph(env, inst->in[0]);
                r = build_graph(env, inst->in[1]);
-               return inst->irn = new_rd_Add(env->dbg, current_ir_graph, env->blk, l, r, env->mode);
+               return inst->irn = new_rd_Add(env->dbg, env->blk, l, r, env->mode);
        case ZERO:
                return inst->irn = new_Const(get_mode_null(env->mode));
        default:
@@ -831,52 +831,52 @@ static ir_node *replace_div_by_mulh(ir_node *div, tarval *tv) {
 
                /* generate the Mulh instruction */
                c = new_Const(mag.M);
-               q = new_rd_Mulh(dbg, current_ir_graph, block, n, c, mode);
+               q = new_rd_Mulh(dbg, block, n, c, mode);
 
                /* do we need an Add or Sub */
                if (mag.need_add)
-                       q = new_rd_Add(dbg, current_ir_graph, block, q, n, mode);
+                       q = new_rd_Add(dbg, block, q, n, mode);
                else if (mag.need_sub)
-                       q = new_rd_Sub(dbg, current_ir_graph, block, q, n, mode);
+                       q = new_rd_Sub(dbg, block, q, n, mode);
 
                /* Do we need the shift */
                if (mag.s > 0) {
                        c = new_Const_long(mode_Iu, mag.s);
-                       q = new_rd_Shrs(dbg, current_ir_graph, block, q, c, mode);
+                       q = new_rd_Shrs(dbg, block, q, c, mode);
                }
 
                /* final */
                c = new_Const_long(mode_Iu, bits - 1);
-               t = new_rd_Shr(dbg, current_ir_graph, block, q, c, mode);
+               t = new_rd_Shr(dbg, block, q, c, mode);
 
-               q = new_rd_Add(dbg, current_ir_graph, block, q, t, mode);
+               q = new_rd_Add(dbg, block, q, t, mode);
        } else {
                struct mu mag = magicu(tv);
                ir_node *c;
 
                /* generate the Mulh instruction */
                c = new_Const(mag.M);
-               q = new_rd_Mulh(dbg, current_ir_graph, block, n, c, mode);
+               q = new_rd_Mulh(dbg, block, n, c, mode);
 
                if (mag.need_add) {
                        if (mag.s > 0) {
                                /* use the GM scheme */
-                               t = new_rd_Sub(dbg, current_ir_graph, block, n, q, mode);
+                               t = new_rd_Sub(dbg, block, n, q, mode);
 
                                c = new_Const(get_mode_one(mode_Iu));
-                               t = new_rd_Shr(dbg, current_ir_graph, block, t, c, mode);
+                               t = new_rd_Shr(dbg, block, t, c, mode);
 
-                               t = new_rd_Add(dbg, current_ir_graph, block, t, q, mode);
+                               t = new_rd_Add(dbg, block, t, q, mode);
 
                                c = new_Const_long(mode_Iu, mag.s - 1);
-                               q = new_rd_Shr(dbg, current_ir_graph, block, t, c, mode);
+                               q = new_rd_Shr(dbg, block, t, c, mode);
                        } else {
                                /* use the default scheme */
-                               q = new_rd_Add(dbg, current_ir_graph, block, q, n, mode);
+                               q = new_rd_Add(dbg, block, q, n, mode);
                        }
                } else if (mag.s > 0) { /* default scheme, shift needed */
                        c = new_Const_long(mode_Iu, mag.s);
-                       q = new_rd_Shr(dbg, current_ir_graph, block, q, c, mode);
+                       q = new_rd_Shr(dbg, block, q, c, mode);
                }
        }
        return q;
@@ -939,31 +939,31 @@ ir_node *arch_dep_replace_div_by_const(ir_node *irn) {
                                if (! get_Div_no_remainder(irn)) {
                                        if (k != 1) {
                                                k_node = new_Const_long(mode_Iu, k - 1);
-                                               curr   = new_rd_Shrs(dbg, current_ir_graph, block, left, k_node, mode);
+                                               curr   = new_rd_Shrs(dbg, block, left, k_node, mode);
                                        }
 
                                        k_node = new_Const_long(mode_Iu, bits - k);
-                                       curr   = new_rd_Shr(dbg, current_ir_graph, block, curr, k_node, mode);
+                                       curr   = new_rd_Shr(dbg, block, curr, k_node, mode);
 
-                                       curr   = new_rd_Add(dbg, current_ir_graph, block, left, curr, mode);
+                                       curr   = new_rd_Add(dbg, block, left, curr, mode);
                                } else {
                                        k_node = left;
                                }
 
                                k_node = new_Const_long(mode_Iu, k);
-                               res    = new_rd_Shrs(dbg, current_ir_graph, block, curr, k_node, mode);
+                               res    = new_rd_Shrs(dbg, block, curr, k_node, mode);
 
                                if (n_flag) { /* negate the result */
                                        ir_node *k_node;
 
                                        k_node = new_Const(get_mode_null(mode));
-                                       res = new_rd_Sub(dbg, current_ir_graph, block, k_node, res, mode);
+                                       res = new_rd_Sub(dbg, block, k_node, res, mode);
                                }
                        } else {      /* unsigned case */
                                ir_node *k_node;
 
                                k_node = new_Const_long(mode_Iu, k);
-                               res    = new_rd_Shr(dbg, current_ir_graph, block, left, k_node, mode);
+                               res    = new_rd_Shr(dbg, block, left, k_node, mode);
                        }
                } else {
                        /* other constant */
@@ -1033,34 +1033,34 @@ ir_node *arch_dep_replace_mod_by_const(ir_node *irn) {
 
                                if (k != 1) {
                                        k_node = new_Const_long(mode_Iu, k - 1);
-                                       curr   = new_rd_Shrs(dbg, current_ir_graph, block, left, k_node, mode);
+                                       curr   = new_rd_Shrs(dbg, block, left, k_node, mode);
                                }
 
                                k_node = new_Const_long(mode_Iu, bits - k);
-                               curr   = new_rd_Shr(dbg, current_ir_graph, block, curr, k_node, mode);
+                               curr   = new_rd_Shr(dbg, block, curr, k_node, mode);
 
-                               curr   = new_rd_Add(dbg, current_ir_graph, block, left, curr, mode);
+                               curr   = new_rd_Add(dbg, block, left, curr, mode);
 
                                k_node = new_Const_long(mode, (-1) << k);
-                               curr   = new_rd_And(dbg, current_ir_graph, block, curr, k_node, mode);
+                               curr   = new_rd_And(dbg, block, curr, k_node, mode);
 
-                               res    = new_rd_Sub(dbg, current_ir_graph, block, left, curr, mode);
+                               res    = new_rd_Sub(dbg, block, left, curr, mode);
                        } else {      /* unsigned case */
                                ir_node *k_node;
 
                                k_node = new_Const_long(mode, (1 << k) - 1);
-                               res    = new_rd_And(dbg, current_ir_graph, block, left, k_node, mode);
+                               res    = new_rd_And(dbg, block, left, k_node, mode);
                        }
                } else {
                        /* other constant */
                        if (allow_Mulh(mode)) {
                                res = replace_div_by_mulh(irn, tv);
 
-                               res = new_rd_Mul(dbg, current_ir_graph, block, res, c, mode);
+                               res = new_rd_Mul(dbg, block, res, c, mode);
 
                                /* res = arch_dep_mul_to_shift(res); */
 
-                               res = new_rd_Sub(dbg, current_ir_graph, block, left, res, mode);
+                               res = new_rd_Sub(dbg, block, left, res, mode);
                        }
                }
        }
@@ -1127,37 +1127,37 @@ void arch_dep_replace_divmod_by_const(ir_node **div, ir_node **mod, ir_node *irn
 
                                if (k != 1) {
                                        k_node = new_Const_long(mode_Iu, k - 1);
-                                       curr   = new_rd_Shrs(dbg, current_ir_graph, block, left, k_node, mode);
+                                       curr   = new_rd_Shrs(dbg, block, left, k_node, mode);
                                }
 
                                k_node = new_Const_long(mode_Iu, bits - k);
-                               curr   = new_rd_Shr(dbg, current_ir_graph, block, curr, k_node, mode);
+                               curr   = new_rd_Shr(dbg, block, curr, k_node, mode);
 
-                               curr   = new_rd_Add(dbg, current_ir_graph, block, left, curr, mode);
+                               curr   = new_rd_Add(dbg, block, left, curr, mode);
 
                                c_k    = new_Const_long(mode_Iu, k);
 
-                               *div   = new_rd_Shrs(dbg, current_ir_graph, block, curr, c_k, mode);
+                               *div   = new_rd_Shrs(dbg, block, curr, c_k, mode);
 
                                if (n_flag) { /* negate the div result */
                                        ir_node *k_node;
 
                                        k_node = new_Const(get_mode_null(mode));
-                                       *div = new_rd_Sub(dbg, current_ir_graph, block, k_node, *div, mode);
+                                       *div = new_rd_Sub(dbg, block, k_node, *div, mode);
                                }
 
                                k_node = new_Const_long(mode, (-1) << k);
-                               curr   = new_rd_And(dbg, current_ir_graph, block, curr, k_node, mode);
+                               curr   = new_rd_And(dbg, block, curr, k_node, mode);
 
-                               *mod   = new_rd_Sub(dbg, current_ir_graph, block, left, curr, mode);
+                               *mod   = new_rd_Sub(dbg, block, left, curr, mode);
                        } else {      /* unsigned case */
                                ir_node *k_node;
 
                                k_node = new_Const_long(mode_Iu, k);
-                               *div   = new_rd_Shr(dbg, current_ir_graph, block, left, k_node, mode);
+                               *div   = new_rd_Shr(dbg, block, left, k_node, mode);
 
                                k_node = new_Const_long(mode, (1 << k) - 1);
-                               *mod   = new_rd_And(dbg, current_ir_graph, block, left, k_node, mode);
+                               *mod   = new_rd_And(dbg, block, left, k_node, mode);
                        }
                } else {
                        /* other constant */
@@ -1166,11 +1166,11 @@ void arch_dep_replace_divmod_by_const(ir_node **div, ir_node **mod, ir_node *irn
 
                                *div = replace_div_by_mulh(irn, tv);
 
-                               t    = new_rd_Mul(dbg, current_ir_graph, block, *div, c, mode);
+                               t    = new_rd_Mul(dbg, block, *div, c, mode);
 
                                /* t = arch_dep_mul_to_shift(t); */
 
-                               *mod = new_rd_Sub(dbg, current_ir_graph, block, left, t, mode);
+                               *mod = new_rd_Sub(dbg, block, left, t, mode);
                        }
                }
        }
index 2ddfebd..bdae29f 100644 (file)
@@ -242,7 +242,7 @@ static ir_node *
 new_bd_Const(dbg_info *db, tarval *con) {
        ir_graph *irg = current_ir_graph;
 
-       return new_rd_Const_type (db, irg, con, firm_unknown_type);
+       return new_rd_Const_type(db, irg, con, firm_unknown_type);
 }  /* new_bd_Const */
 
 static ir_node *
@@ -256,12 +256,11 @@ static ir_node *
 new_bd_defaultProj(dbg_info *db, ir_node *block, ir_node *arg,
            long max_proj) {
        ir_node  *res;
-       ir_graph *irg = current_ir_graph;
 
        assert(arg->op == op_Cond);
        arg->attr.cond.kind = fragmentary;
        arg->attr.cond.default_proj = max_proj;
-       res = new_rd_Proj (db, irg, block, arg, mode_X, max_proj);
+       res = new_rd_Proj(db, block, arg, mode_X, max_proj);
        return res;
 }  /* new_bd_defaultProj */
 
@@ -393,11 +392,11 @@ new_rd_End(dbg_info *db, ir_graph *irg, ir_node *block) {
 /* Creates a Phi node with all predecessors.  Calling this constructor
    is only allowed if the corresponding block is mature.  */
 ir_node *
-new_rd_Phi(dbg_info *db, ir_graph *irg, ir_node *block, int arity, ir_node **in, ir_mode *mode) {
+new_rd_Phi(dbg_info *db, ir_node *block, int arity, ir_node **in, ir_mode *mode) {
        ir_node  *res;
        ir_graph *rem = current_ir_graph;
 
-       current_ir_graph = irg;
+       current_ir_graph = get_Block_irg(block);
        res = new_bd_Phi(db, block,arity, in, mode);
        current_ir_graph = rem;
 
@@ -438,12 +437,11 @@ new_rd_Const_long(dbg_info *db, ir_graph *irg, ir_mode *mode, long value) {
 }  /* new_rd_Const_long */
 
 ir_node *
-new_rd_defaultProj(dbg_info *db, ir_graph *irg, ir_node *block, ir_node *arg,
-                   long max_proj) {
+new_rd_defaultProj(dbg_info *db, ir_node *block, ir_node *arg, long max_proj) {
        ir_node  *res;
        ir_graph *rem = current_ir_graph;
 
-       current_ir_graph = irg;
+       current_ir_graph = get_Block_irg(block);
        res = new_bd_defaultProj(db, block, arg, max_proj);
        current_ir_graph = rem;
 
@@ -451,12 +449,12 @@ new_rd_defaultProj(dbg_info *db, ir_graph *irg, ir_node *block, ir_node *arg,
 }  /* new_rd_defaultProj */
 
 ir_node *
-new_rd_simpleSel(dbg_info *db, ir_graph *irg, ir_node *block,
+new_rd_simpleSel(dbg_info *db, ir_node *block,
                  ir_node *store, ir_node *objptr, ir_entity *ent) {
        ir_node  *res;
        ir_graph *rem = current_ir_graph;
 
-       current_ir_graph = irg;
+       current_ir_graph = get_Block_irg(block);
        res = new_bd_Sel(db, block, store, objptr, 0, NULL, ent);
        current_ir_graph = rem;
 
@@ -464,10 +462,11 @@ new_rd_simpleSel(dbg_info *db, ir_graph *irg, ir_node *block,
 }  /* new_rd_simpleSel */
 
 ir_node *
-new_rd_SymConst_type(dbg_info *db, ir_graph *irg, ir_node *block, ir_mode *mode,
+new_rd_SymConst_type(dbg_info *db, ir_graph *irg, ir_mode *mode,
                      symconst_symbol value, symconst_kind symkind, ir_type *tp) {
        ir_node  *res;
        ir_graph *rem = current_ir_graph;
+       ir_node  *block = get_irg_start_block(irg);
 
        current_ir_graph = irg;
        res = new_bd_SymConst_type(db, block, mode, value, symkind, tp);
@@ -477,54 +476,54 @@ new_rd_SymConst_type(dbg_info *db, ir_graph *irg, ir_node *block, ir_mode *mode,
 }  /* new_rd_SymConst_type */
 
 ir_node *
-new_rd_SymConst(dbg_info *db, ir_graph *irg, ir_node *block, ir_mode *mode,
+new_rd_SymConst(dbg_info *db, ir_graph *irg, ir_mode *mode,
                 symconst_symbol value, symconst_kind symkind) {
-       return new_rd_SymConst_type(db, irg, block, mode, value, symkind, firm_unknown_type);
+       return new_rd_SymConst_type(db, irg, mode, value, symkind, firm_unknown_type);
 }  /* new_rd_SymConst */
 
  ir_node *new_rd_SymConst_addr_ent(dbg_info *db, ir_graph *irg, ir_mode *mode, ir_entity *symbol, ir_type *tp) {
        symconst_symbol sym;
        sym.entity_p = symbol;
-       return new_rd_SymConst_type(db, irg, get_irg_start_block(irg), mode, sym, symconst_addr_ent, tp);
+       return new_rd_SymConst_type(db, irg, mode, sym, symconst_addr_ent, tp);
 }  /* new_rd_SymConst_addr_ent */
 
 ir_node *new_rd_SymConst_ofs_ent(dbg_info *db, ir_graph *irg, ir_mode *mode, ir_entity *symbol, ir_type *tp) {
        symconst_symbol sym;
        sym.entity_p = symbol;
-       return new_rd_SymConst_type(db, irg, get_irg_start_block(irg), mode, sym, symconst_ofs_ent, tp);
+       return new_rd_SymConst_type(db, irg, mode, sym, symconst_ofs_ent, tp);
 }  /* new_rd_SymConst_ofs_ent */
 
 ir_node *new_rd_SymConst_addr_name(dbg_info *db, ir_graph *irg, ir_mode *mode, ident *symbol, ir_type *tp) {
        symconst_symbol sym;
        sym.ident_p = symbol;
-       return new_rd_SymConst_type(db, irg, get_irg_start_block(irg), mode, sym, symconst_addr_name, tp);
+       return new_rd_SymConst_type(db, irg, mode, sym, symconst_addr_name, tp);
 }  /* new_rd_SymConst_addr_name */
 
 ir_node *new_rd_SymConst_type_tag(dbg_info *db, ir_graph *irg, ir_mode *mode, ir_type *symbol, ir_type *tp) {
        symconst_symbol sym;
        sym.type_p = symbol;
-       return new_rd_SymConst_type(db, irg, get_irg_start_block(irg), mode, sym, symconst_type_tag, tp);
+       return new_rd_SymConst_type(db, irg, mode, sym, symconst_type_tag, tp);
 }  /* new_rd_SymConst_type_tag */
 
 ir_node *new_rd_SymConst_size(dbg_info *db, ir_graph *irg, ir_mode *mode, ir_type *symbol, ir_type *tp) {
        symconst_symbol sym;
        sym.type_p = symbol;
-       return new_rd_SymConst_type(db, irg, get_irg_start_block(irg), mode, sym, symconst_type_size, tp);
+       return new_rd_SymConst_type(db, irg, mode, sym, symconst_type_size, tp);
 }  /* new_rd_SymConst_size */
 
 ir_node *new_rd_SymConst_align(dbg_info *db, ir_graph *irg, ir_mode *mode, ir_type *symbol, ir_type *tp) {
        symconst_symbol sym;
        sym.type_p = symbol;
-       return new_rd_SymConst_type(db, irg, get_irg_start_block(irg), mode, sym, symconst_type_align, tp);
+       return new_rd_SymConst_type(db, irg, mode, sym, symconst_type_align, tp);
 }  /* new_rd_SymConst_align */
 
 ir_node *
-new_rd_Sync(dbg_info *db, ir_graph *irg, ir_node *block, int arity, ir_node *in[]) {
+new_rd_Sync(dbg_info *db, ir_node *block, int arity, ir_node *in[]) {
        ir_node  *res;
        ir_graph *rem = current_ir_graph;
        int      i;
 
-       current_ir_graph = irg;
+       current_ir_graph = get_Block_irg(block);
        res = new_bd_Sync(db, block);
        current_ir_graph = rem;
 
@@ -554,14 +553,14 @@ new_rd_EndExcept(dbg_info *db, ir_graph *irg, ir_node *block) {
        return res;
 }  /* new_rd_EndExcept */
 
-ir_node *new_rd_ASM(dbg_info *db, ir_graph *irg, ir_node *block,
+ir_node *new_rd_ASM(dbg_info *db, ir_node *block,
                     int arity, ir_node *in[], ir_asm_constraint *inputs,
                     int n_outs, ir_asm_constraint *outputs,
                     int n_clobber, ident *clobber[], ident *asm_text) {
        ir_node  *res;
        ir_graph *rem = current_ir_graph;
 
-       current_ir_graph = irg;
+       current_ir_graph = get_Block_irg(block);
        res = new_bd_ASM(db, block, arity, in, inputs, n_outs, outputs, n_clobber, clobber, asm_text);
        current_ir_graph = rem;
 
@@ -583,24 +582,22 @@ ir_node *new_r_Const_long(ir_graph *irg, ir_mode *mode, long value) {
 ir_node *new_r_Const_type(ir_graph *irg, tarval *con, ir_type *tp) {
        return new_rd_Const_type(NULL, irg, con, tp);
 }
-ir_node *new_r_SymConst(ir_graph *irg, ir_node *block, ir_mode *mode,
+ir_node *new_r_SymConst(ir_graph *irg, ir_mode *mode,
                         symconst_symbol value, symconst_kind symkind) {
-       return new_rd_SymConst(NULL, irg, block, mode, value, symkind);
+       return new_rd_SymConst(NULL, irg, mode, value, symkind);
 }
-ir_node *new_r_simpleSel(ir_graph *irg, ir_node *block, ir_node *store,
+ir_node *new_r_simpleSel(ir_node *block, ir_node *store,
                          ir_node *objptr, ir_entity *ent) {
-       return new_rd_Sel(NULL, irg, block, store, objptr, 0, NULL, ent);
+       return new_rd_Sel(NULL, block, store, objptr, 0, NULL, ent);
 }
-ir_node *new_r_Phi(ir_graph *irg, ir_node *block, int arity,
-                   ir_node **in, ir_mode *mode) {
-       return new_rd_Phi(NULL, irg, block, arity, in, mode);
+ir_node *new_r_Phi(ir_node *block, int arity, ir_node **in, ir_mode *mode) {
+       return new_rd_Phi(NULL, block, arity, in, mode);
 }
-ir_node *new_r_Sync(ir_graph *irg, ir_node *block, int arity, ir_node *in[]) {
-       return new_rd_Sync(NULL, irg, block, arity, in);
+ir_node *new_r_Sync(ir_node *block, int arity, ir_node *in[]) {
+       return new_rd_Sync(NULL, block, arity, in);
 }
-ir_node *new_r_defaultProj(ir_graph *irg, ir_node *block, ir_node *arg,
-                           long max_proj) {
-       return new_rd_defaultProj(NULL, irg, block, arg, max_proj);
+ir_node *new_r_defaultProj(ir_node *block, ir_node *arg, long max_proj) {
+       return new_rd_defaultProj(NULL, block, arg, max_proj);
 }
 ir_node *new_r_Bad(ir_graph *irg) {
        return get_irg_bad(irg);
@@ -614,11 +611,11 @@ ir_node *new_r_EndExcept(ir_graph *irg, ir_node *block) {
 ir_node *new_r_NoMem(ir_graph *irg) {
        return get_irg_no_mem(irg);
 }
-ir_node *new_r_ASM(ir_graph *irg, ir_node *block,
+ir_node *new_r_ASM(ir_node *block,
                    int arity, ir_node *in[], ir_asm_constraint *inputs,
                    int n_outs, ir_asm_constraint *outputs,
                    int n_clobber, ident *clobber[], ident *asm_text) {
-       return new_rd_ASM(NULL, irg, block, arity, in, inputs, n_outs, outputs, n_clobber, clobber, asm_text);
+       return new_rd_ASM(NULL, block, arity, in, inputs, n_outs, outputs, n_clobber, clobber, asm_text);
 }
 
 /** ********************/
@@ -1235,7 +1232,7 @@ new_d_SymConst(dbg_info *db, ir_mode *mode, symconst_symbol value, symconst_kind
 
 ir_node *
 new_d_Sync(dbg_info *db, int arity, ir_node *in[]) {
-       return new_rd_Sync(db, current_ir_graph, current_ir_graph->current_block, arity, in);
+       return new_rd_Sync(db, current_ir_graph->current_block, arity, in);
 }  /* new_d_Sync */
 
 ir_node *
index efd56c3..9b4c336 100644 (file)
@@ -583,6 +583,9 @@ static void export_type_or_ent_post(type_or_ent tore, void *ctx)
        }
 }
 
+/**
+ * Walker: exports every node.
+ */
 static void export_node(ir_node *irn, void *ctx)
 {
        io_env_t *env = (io_env_t *) ctx;
@@ -592,10 +595,9 @@ static void export_node(ir_node *irn, void *ctx)
        if (env->ignoreblocks && opcode == iro_Block)
                return;
 
-       n = get_irn_arity(irn);
-
        fprintf(env->file, "\t%s %ld [ ", get_irn_opname(irn), get_irn_node_nr(irn));
 
+       n = get_irn_arity(irn);
        for (i = -1; i < n; i++) {
                ir_node *pred = get_irn_n(irn, i);
                if (pred == NULL) {
@@ -609,8 +611,7 @@ static void export_node(ir_node *irn, void *ctx)
 
        fprintf(env->file, "] { ");
 
-       switch (opcode)
-       {
+       switch (opcode) {
                #include "gen_irio_export.inl"
        }
        fputs("}\n", env->file);
@@ -650,7 +651,7 @@ static void export_modes(io_env_t *env)
        fputs("}\n\n", env->file);
 }
 
-/** Exports the whole irp to the given file in a textual form. */
+/* Exports the whole irp to the given file in a textual form. */
 void ir_export(const char *filename)
 {
        io_env_t env;
@@ -691,7 +692,7 @@ void ir_export(const char *filename)
        fclose(env.file);
 }
 
-/** Exports the given irg to the given file. */
+/* Exports the given irg to the given file. */
 void ir_export_irg(ir_graph *irg, const char *filename)
 {
        io_env_t env;
index 94bd2d5..93f7c01 100644 (file)
@@ -2020,7 +2020,7 @@ static ir_node *apply_binop_on_phi(ir_node *phi, tarval *other, tarval *(*eval)(
                pred = get_irn_n(phi, i);
                res[i] = new_r_Const_type(irg, res[i], get_Const_type(pred));
        }
-       return new_r_Phi(irg, get_nodes_block(phi), n, (ir_node **)res, mode);
+       return new_r_Phi(get_nodes_block(phi), n, (ir_node **)res, mode);
 }  /* apply_binop_on_phi */
 
 /**
@@ -2064,7 +2064,7 @@ static ir_node *apply_binop_on_2_phis(ir_node *a, ir_node *b, tarval *(*eval)(),
                pred = get_irn_n(a, i);
                res[i] = new_r_Const_type(irg, res[i], get_Const_type(pred));
        }
-       return new_r_Phi(irg, get_nodes_block(a), n, (ir_node **)res, mode);
+       return new_r_Phi(get_nodes_block(a), n, (ir_node **)res, mode);
 }  /* apply_binop_on_2_phis */
 
 /**
@@ -2101,7 +2101,7 @@ static ir_node *apply_unop_on_phi(ir_node *phi, tarval *(*eval)(tarval *)) {
                pred = get_irn_n(phi, i);
                res[i] = new_r_Const_type(irg, res[i], get_Const_type(pred));
        }
-       return new_r_Phi(irg, get_nodes_block(phi), n, (ir_node **)res, mode);
+       return new_r_Phi(get_nodes_block(phi), n, (ir_node **)res, mode);
 }  /* apply_unop_on_phi */
 
 /**
@@ -2135,7 +2135,7 @@ static ir_node *apply_conv_on_phi(ir_node *phi, ir_mode *mode) {
                pred = get_irn_n(phi, i);
                res[i] = new_r_Const_type(irg, res[i], get_Const_type(pred));
        }
-       return new_r_Phi(irg, get_nodes_block(phi), n, (ir_node **)res, mode);
+       return new_r_Phi(get_nodes_block(phi), n, (ir_node **)res, mode);
 }  /* apply_conv_on_phi */
 
 /**
@@ -2205,7 +2205,7 @@ static ir_node *transform_node_AddSub(ir_node *n) {
                                /* convert a AddP(P, *s) into AddP(P, *u) */
                                ir_mode *nm = get_reference_mode_unsigned_eq(mode);
 
-                               ir_node *pre = new_r_Conv(current_ir_graph, get_nodes_block(n), right, nm);
+                               ir_node *pre = new_r_Conv(get_nodes_block(n), right, nm);
                                set_binop_right(n, pre);
                        }
                }
@@ -2270,7 +2270,7 @@ static ir_node *transform_node_Add(ir_node *n) {
                if (is_Const(b) && is_Const_null(b) && mode_is_int(lmode)) {
                        /* an Add(a, NULL) is a hidden Conv */
                        dbg_info *dbg = get_irn_dbg_info(n);
-                       return new_rd_Conv(dbg, current_ir_graph, get_nodes_block(n), a, mode);
+                       return new_rd_Conv(dbg, get_nodes_block(n), a, mode);
                }
        }
 
@@ -2288,7 +2288,6 @@ static ir_node *transform_node_Add(ir_node *n) {
 
                        n = new_rd_Mul(
                                get_irn_dbg_info(n),
-                               current_ir_graph,
                                block,
                                a,
                                new_Const_long(mode, 2),
@@ -2299,7 +2298,6 @@ static ir_node *transform_node_Add(ir_node *n) {
                if (is_Minus(a)) {
                        n = new_rd_Sub(
                                        get_irn_dbg_info(n),
-                                       current_ir_graph,
                                        get_nodes_block(n),
                                        b,
                                        get_Minus_op(a),
@@ -2310,7 +2308,6 @@ static ir_node *transform_node_Add(ir_node *n) {
                if (is_Minus(b)) {
                        n = new_rd_Sub(
                                        get_irn_dbg_info(n),
-                                       current_ir_graph,
                                        get_nodes_block(n),
                                        a,
                                        get_Minus_op(b),
@@ -2326,7 +2323,7 @@ static ir_node *transform_node_Add(ir_node *n) {
                                if (is_Const(b) && is_Const_one(b)) {
                                        /* ~x + 1 = -x */
                                        ir_node *blk = get_nodes_block(n);
-                                       n = new_rd_Minus(get_irn_dbg_info(n), current_ir_graph, blk, op, mode);
+                                       n = new_rd_Minus(get_irn_dbg_info(n), blk, op, mode);
                                        DBG_OPT_ALGSIM0(oldn, n, FS_OPT_NOT_PLUS_1);
                                        return n;
                                }
@@ -2391,7 +2388,7 @@ static ir_node *transform_node_Sub(ir_node *n) {
                if (is_Const(b) && is_Const_null(b) && mode_is_reference(lmode)) {
                        /* a Sub(a, NULL) is a hidden Conv */
                        dbg_info *dbg = get_irn_dbg_info(n);
-                       n = new_rd_Conv(dbg, current_ir_graph, get_nodes_block(n), a, mode);
+                       n = new_rd_Conv(dbg, get_nodes_block(n), a, mode);
                        DBG_OPT_ALGSIM0(oldn, n, FS_OPT_SUB_TO_CONV);
                        return n;
                }
@@ -2402,7 +2399,7 @@ static ir_node *transform_node_Sub(ir_node *n) {
                    get_Const_tarval(a) == get_mode_minus_one(mode)) {
                        /* -1 - x -> ~x */
                        dbg_info *dbg = get_irn_dbg_info(n);
-                       n = new_rd_Not(dbg, current_ir_graph, get_nodes_block(n), b, mode);
+                       n = new_rd_Not(dbg, get_nodes_block(n), b, mode);
                        DBG_OPT_ALGSIM0(oldn, n, FS_OPT_SUB_TO_NOT);
                        return n;
                }
@@ -2421,56 +2418,52 @@ restart:
                if (cnst != NULL) {
                        ir_node  *block = get_nodes_block(n);
                        dbg_info *dbgi  = get_irn_dbg_info(n);
-                       ir_graph *irg   = get_irn_irg(n);
 
-                       n = new_rd_Add(dbgi, irg, block, a, cnst, mode);
+                       n = new_rd_Add(dbgi, block, a, cnst, mode);
                        DBG_OPT_ALGSIM0(oldn, n, FS_OPT_SUB_TO_ADD);
                        return n;
                }
        }
 
        if (is_Minus(a)) { /* (-a) - b -> -(a + b) */
-               ir_graph *irg   = current_ir_graph;
                dbg_info *dbg   = get_irn_dbg_info(n);
                ir_node  *block = get_nodes_block(n);
                ir_node  *left  = get_Minus_op(a);
-               ir_node  *add   = new_rd_Add(dbg, irg, block, left, b, mode);
+               ir_node  *add   = new_rd_Add(dbg, block, left, b, mode);
 
-               n = new_rd_Minus(dbg, irg, block, add, mode);
+               n = new_rd_Minus(dbg, block, add, mode);
                DBG_OPT_ALGSIM0(oldn, n, FS_OPT_SUB_TO_ADD);
                return n;
        } else if (is_Minus(b)) { /* a - (-b) -> a + b */
-               ir_graph *irg   = current_ir_graph;
                dbg_info *dbg   = get_irn_dbg_info(n);
                ir_node  *block = get_nodes_block(n);
                ir_node  *right = get_Minus_op(b);
 
-               n = new_rd_Add(dbg, irg, block, a, right, mode);
+               n = new_rd_Add(dbg, block, a, right, mode);
                DBG_OPT_ALGSIM0(oldn, n, FS_OPT_SUB_MINUS);
                return n;
        } else if (is_Sub(b)) {
                /* a - (b - c) -> a + (c - b)
                 *             -> (a - b) + c iff (b - c) is a pointer */
-               ir_graph *irg     = current_ir_graph;
                dbg_info *s_dbg   = get_irn_dbg_info(b);
                ir_node  *s_block = get_nodes_block(b);
                ir_node  *s_left  = get_Sub_left(b);
                ir_node  *s_right = get_Sub_right(b);
                ir_mode  *s_mode  = get_irn_mode(b);
                if (mode_is_reference(s_mode)) {
-                       ir_node  *sub     = new_rd_Sub(s_dbg, irg, s_block, a, s_left, mode);
+                       ir_node  *sub     = new_rd_Sub(s_dbg, s_block, a, s_left, mode);
                        dbg_info *a_dbg   = get_irn_dbg_info(n);
                        ir_node  *a_block = get_nodes_block(n);
 
                        if (s_mode != mode)
-                               s_right = new_r_Conv(irg, a_block, s_right, mode);
-                       n = new_rd_Add(a_dbg, irg, a_block, sub, s_right, mode);
+                               s_right = new_r_Conv(a_block, s_right, mode);
+                       n = new_rd_Add(a_dbg, a_block, sub, s_right, mode);
                } else {
-                       ir_node  *sub     = new_rd_Sub(s_dbg, irg, s_block, s_right, s_left, s_mode);
+                       ir_node  *sub     = new_rd_Sub(s_dbg, s_block, s_right, s_left, s_mode);
                        dbg_info *a_dbg   = get_irn_dbg_info(n);
                        ir_node  *a_block = get_nodes_block(n);
 
-                       n = new_rd_Add(a_dbg, irg, a_block, a, sub, mode);
+                       n = new_rd_Add(a_dbg, a_block, a, sub, mode);
                }
                DBG_OPT_ALGSIM0(oldn, n, FS_OPT_SUB_TO_ADD);
                return n;
@@ -2479,16 +2472,15 @@ restart:
                if (is_Const(m_right)) {
                        ir_node *cnst2 = const_negate(m_right);
                        if (cnst2 != NULL) {
-                               ir_graph *irg     = current_ir_graph;
                                dbg_info *m_dbg   = get_irn_dbg_info(b);
                                ir_node  *m_block = get_nodes_block(b);
                                ir_node  *m_left  = get_Mul_left(b);
                                ir_mode  *m_mode  = get_irn_mode(b);
-                               ir_node  *mul     = new_rd_Mul(m_dbg, irg, m_block, m_left, cnst2, m_mode);
+                               ir_node  *mul     = new_rd_Mul(m_dbg, m_block, m_left, cnst2, m_mode);
                                dbg_info *a_dbg   = get_irn_dbg_info(n);
                                ir_node  *a_block = get_nodes_block(n);
 
-                               n = new_rd_Add(a_dbg, irg, a_block, a, mul, mode);
+                               n = new_rd_Add(a_dbg, a_block, a, mul, mode);
                                DBG_OPT_ALGSIM0(oldn, n, FS_OPT_SUB_TO_ADD);
                                return n;
                        }
@@ -2499,7 +2491,6 @@ restart:
        if (mode_is_num(mode) && mode == get_irn_mode(a) && is_Const(a) && is_Const_null(a)) {
                n = new_rd_Minus(
                                get_irn_dbg_info(n),
-                               current_ir_graph,
                                get_nodes_block(n),
                                b,
                                mode);
@@ -2515,7 +2506,7 @@ restart:
                        if (left == b) {
                                if (mode != get_irn_mode(right)) {
                                        /* This Sub is an effective Cast */
-                                       right = new_r_Conv(get_irn_irg(n), get_nodes_block(n), right, mode);
+                                       right = new_r_Conv(get_nodes_block(n), right, mode);
                                }
                                n = right;
                                DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_ADD_SUB);
@@ -2523,7 +2514,7 @@ restart:
                        } else if (right == b) {
                                if (mode != get_irn_mode(left)) {
                                        /* This Sub is an effective Cast */
-                                       left = new_r_Conv(get_irn_irg(n), get_nodes_block(n), left, mode);
+                                       left = new_r_Conv(get_nodes_block(n), left, mode);
                                }
                                n = left;
                                DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_ADD_SUB);
@@ -2540,20 +2531,20 @@ restart:
                        if (left == a) {
                                ir_mode *r_mode = get_irn_mode(right);
 
-                               n = new_r_Minus(get_irn_irg(n), get_nodes_block(n), right, r_mode);
+                               n = new_r_Minus(get_nodes_block(n), right, r_mode);
                                if (mode != r_mode) {
                                        /* This Sub is an effective Cast */
-                                       n = new_r_Conv(get_irn_irg(n), get_nodes_block(n), n, mode);
+                                       n = new_r_Conv(get_nodes_block(n), n, mode);
                                }
                                DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_ADD_SUB);
                                return n;
                        } else if (right == a) {
                                ir_mode *l_mode = get_irn_mode(left);
 
-                               n = new_r_Minus(get_irn_irg(n), get_nodes_block(n), left, l_mode);
+                               n = new_r_Minus(get_nodes_block(n), left, l_mode);
                                if (mode != l_mode) {
                                        /* This Sub is an effective Cast */
-                                       n = new_r_Conv(get_irn_irg(n), get_nodes_block(n), n, mode);
+                                       n = new_r_Conv(get_nodes_block(n), n, mode);
                                }
                                DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_ADD_SUB);
                                return n;
@@ -2591,11 +2582,11 @@ restart:
                        ir_node *blk = get_nodes_block(n);
                        n = new_rd_Mul(
                                        get_irn_dbg_info(n),
-                                       current_ir_graph, blk,
+                                       blk,
                                        ma,
                                        new_rd_Sub(
                                                get_irn_dbg_info(n),
-                                               current_ir_graph, blk,
+                                               blk,
                                                mb,
                                                new_Const_long(mode, 1),
                                                mode),
@@ -2606,11 +2597,11 @@ restart:
                        ir_node *blk = get_nodes_block(n);
                        n = new_rd_Mul(
                                        get_irn_dbg_info(n),
-                                       current_ir_graph, blk,
+                                       blk,
                                        mb,
                                        new_rd_Sub(
                                                get_irn_dbg_info(n),
-                                               current_ir_graph, blk,
+                                               blk,
                                                ma,
                                                new_Const_long(mode, 1),
                                                mode),
@@ -2620,7 +2611,7 @@ restart:
                }
        }
        if (is_Sub(a)) { /* (x - y) - b -> x - (y + b) */
-               ir_node *x   =      get_Sub_left(a);
+               ir_node *x        = get_Sub_left(a);
                ir_node *y        = get_Sub_right(a);
                ir_node *blk      = get_nodes_block(n);
                ir_mode *m_b      = get_irn_mode(b);
@@ -2645,9 +2636,9 @@ restart:
                        return n;
                }
 
-               add = new_r_Add(current_ir_graph, blk, y, b, add_mode);
+               add = new_r_Add(blk, y, b, add_mode);
 
-               n = new_rd_Sub(get_irn_dbg_info(n), current_ir_graph, blk, x, add, mode);
+               n = new_rd_Sub(get_irn_dbg_info(n), blk, x, add, mode);
                DBG_OPT_ALGSIM0(oldn, n, FS_OPT_SUB_SUB_X_Y_Z);
                return n;
        }
@@ -2661,7 +2652,7 @@ restart:
                        if (tv != tarval_bad) {
                                ir_node *blk = get_nodes_block(n);
                                ir_node *c = new_Const(tv);
-                               n = new_rd_Add(get_irn_dbg_info(n), current_ir_graph, blk, get_Not_op(b), c, mode);
+                               n = new_rd_Add(get_irn_dbg_info(n), blk, get_Not_op(b), c, mode);
                                DBG_OPT_ALGSIM0(oldn, n, FS_OPT_SUB_C_NOT_X);
                                return n;
                        }
@@ -2685,30 +2676,30 @@ static ir_node *transform_node_Mul2n(ir_node *n, ir_mode *mode) {
        if (ta == get_mode_one(smode)) {
                /* (L)1 * (L)b = (L)b */
                ir_node *blk = get_nodes_block(n);
-               n = new_rd_Conv(get_irn_dbg_info(n), current_ir_graph, blk, b, mode);
+               n = new_rd_Conv(get_irn_dbg_info(n), blk, b, mode);
                DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_NEUTRAL_1);
                return n;
        }
        else if (ta == get_mode_minus_one(smode)) {
                /* (L)-1 * (L)b = (L)b */
                ir_node *blk = get_nodes_block(n);
-               n = new_rd_Minus(get_irn_dbg_info(n), current_ir_graph, blk, b, smode);
-               n = new_rd_Conv(get_irn_dbg_info(n), current_ir_graph, blk, n, mode);
+               n = new_rd_Minus(get_irn_dbg_info(n), blk, b, smode);
+               n = new_rd_Conv(get_irn_dbg_info(n), blk, n, mode);
                DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_MUL_MINUS_1);
                return n;
        }
        if (tb == get_mode_one(smode)) {
                /* (L)a * (L)1 = (L)a */
                ir_node *blk = get_irn_n(a, -1);
-               n = new_rd_Conv(get_irn_dbg_info(n), current_ir_graph, blk, a, mode);
+               n = new_rd_Conv(get_irn_dbg_info(n), blk, a, mode);
                DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_NEUTRAL_1);
                return n;
        }
        else if (tb == get_mode_minus_one(smode)) {
                /* (L)a * (L)-1 = (L)-a */
                ir_node *blk = get_nodes_block(n);
-               n = new_rd_Minus(get_irn_dbg_info(n), current_ir_graph, blk, a, smode);
-               n = new_rd_Conv(get_irn_dbg_info(n), current_ir_graph, blk, n, mode);
+               n = new_rd_Minus(get_irn_dbg_info(n), blk, a, smode);
+               n = new_rd_Conv(get_irn_dbg_info(n), blk, n, mode);
                DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_MUL_MINUS_1);
                return n;
        }
@@ -2742,7 +2733,7 @@ static ir_node *transform_node_Mul(ir_node *n) {
                else if (value_of(b) == get_mode_minus_one(mode))
                        r = a;
                if (r) {
-                       n = new_rd_Minus(get_irn_dbg_info(n), current_ir_graph, get_nodes_block(n), r, mode);
+                       n = new_rd_Minus(get_irn_dbg_info(n), get_nodes_block(n), r, mode);
                        DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_MUL_MINUS_1);
                        return n;
                }
@@ -2753,24 +2744,23 @@ static ir_node *transform_node_Mul(ir_node *n) {
                        if (cnst != NULL) {
                                dbg_info *dbgi  = get_irn_dbg_info(n);
                                ir_node  *block = get_nodes_block(n);
-                               n = new_rd_Mul(dbgi, current_ir_graph, block, get_Minus_op(a), cnst, mode);
+                               n = new_rd_Mul(dbgi, block, get_Minus_op(a), cnst, mode);
                                DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_MUL_MINUS_1);
                                return n;
                        }
                } else if (is_Minus(b)) { /* (-a) * (-b) -> a * b */
                        dbg_info *dbgi  = get_irn_dbg_info(n);
                        ir_node  *block = get_nodes_block(n);
-                       n = new_rd_Mul(dbgi, current_ir_graph, block, get_Minus_op(a), get_Minus_op(b), mode);
+                       n = new_rd_Mul(dbgi, block, get_Minus_op(a), get_Minus_op(b), mode);
                        DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_MUL_MINUS_MINUS);
                        return n;
                } else if (is_Sub(b)) { /* (-a) * (b - c) -> a * (c - b) */
                        ir_node  *sub_l = get_Sub_left(b);
                        ir_node  *sub_r = get_Sub_right(b);
                        dbg_info *dbgi  = get_irn_dbg_info(n);
-                       ir_graph *irg   = current_ir_graph;
                        ir_node  *block = get_nodes_block(n);
-                       ir_node  *new_b = new_rd_Sub(dbgi, irg, block, sub_r, sub_l, mode);
-                       n = new_rd_Mul(dbgi, irg, block, get_Minus_op(a), new_b, mode);
+                       ir_node  *new_b = new_rd_Sub(dbgi, block, sub_r, sub_l, mode);
+                       n = new_rd_Mul(dbgi, block, get_Minus_op(a), new_b, mode);
                        DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_MUL_MINUS);
                        return n;
                }
@@ -2779,10 +2769,9 @@ static ir_node *transform_node_Mul(ir_node *n) {
                        ir_node  *sub_l = get_Sub_left(a);
                        ir_node  *sub_r = get_Sub_right(a);
                        dbg_info *dbgi  = get_irn_dbg_info(n);
-                       ir_graph *irg   = current_ir_graph;
                        ir_node  *block = get_nodes_block(n);
-                       ir_node  *new_a = new_rd_Sub(dbgi, irg, block, sub_r, sub_l, mode);
-                       n = new_rd_Mul(dbgi, irg, block, new_a, get_Minus_op(b), mode);
+                       ir_node  *new_a = new_rd_Sub(dbgi, block, sub_r, sub_l, mode);
+                       n = new_rd_Mul(dbgi, block, new_a, get_Minus_op(b), mode);
                        DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_MUL_MINUS);
                        return n;
                }
@@ -2793,7 +2782,7 @@ static ir_node *transform_node_Mul(ir_node *n) {
                        if (tarval_ieee754_get_exponent(tv) == 1 && tarval_ieee754_zero_mantissa(tv)
                                        && !tarval_is_negative(tv)) {
                                /* 2.0 * b = b + b */
-                               n = new_rd_Add(get_irn_dbg_info(n), current_ir_graph, get_nodes_block(n), b, b, mode);
+                               n = new_rd_Add(get_irn_dbg_info(n), get_nodes_block(n), b, b, mode);
                                DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_ADD_A_A);
                                return n;
                        }
@@ -2803,7 +2792,7 @@ static ir_node *transform_node_Mul(ir_node *n) {
                        if (tarval_ieee754_get_exponent(tv) == 1 && tarval_ieee754_zero_mantissa(tv)
                                        && !tarval_is_negative(tv)) {
                                /* a * 2.0 = a + a */
-                               n = new_rd_Add(get_irn_dbg_info(n), current_ir_graph, get_nodes_block(n), a, a, mode);
+                               n = new_rd_Add(get_irn_dbg_info(n), get_nodes_block(n), a, a, mode);
                                DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_ADD_A_A);
                                return n;
                        }
@@ -2860,7 +2849,7 @@ static ir_node *transform_node_Div(ir_node *n) {
 
                        if (tv == get_mode_minus_one(mode)) {
                                /* a / -1 */
-                               value = new_rd_Minus(get_irn_dbg_info(n), current_ir_graph, get_nodes_block(n), a, mode);
+                               value = new_rd_Minus(get_irn_dbg_info(n), get_nodes_block(n), a, mode);
                                DBG_OPT_CSTEVAL(n, value);
                                goto make_tuple;
                        }
@@ -2881,7 +2870,7 @@ make_tuple:
                mem = skip_Pin(mem);
                turn_into_tuple(n, pn_Div_max);
                set_Tuple_pred(n, pn_Div_M,         mem);
-               set_Tuple_pred(n, pn_Div_X_regular, new_r_Jmp(current_ir_graph, blk));
+               set_Tuple_pred(n, pn_Div_X_regular, new_r_Jmp(blk));
                set_Tuple_pred(n, pn_Div_X_except,  new_Bad());
                set_Tuple_pred(n, pn_Div_res,       value);
        }
@@ -2968,7 +2957,7 @@ make_tuple:
                mem = skip_Pin(mem);
                turn_into_tuple(n, pn_Mod_max);
                set_Tuple_pred(n, pn_Mod_M,         mem);
-               set_Tuple_pred(n, pn_Mod_X_regular, new_r_Jmp(current_ir_graph, blk));
+               set_Tuple_pred(n, pn_Mod_X_regular, new_r_Jmp(blk));
                set_Tuple_pred(n, pn_Mod_X_except,  new_Bad());
                set_Tuple_pred(n, pn_Mod_res,       value);
        }
@@ -3039,7 +3028,7 @@ static ir_node *transform_node_DivMod(ir_node *n) {
                        DBG_OPT_CSTEVAL(n, vb);
                        goto make_tuple;
                } else if (mode_is_signed(mode) && tb == get_mode_minus_one(mode)) {
-                       va = new_rd_Minus(get_irn_dbg_info(n), current_ir_graph, get_nodes_block(n), a, mode);
+                       va = new_rd_Minus(get_irn_dbg_info(n), get_nodes_block(n), a, mode);
                        vb = new_Const(get_mode_null(mode));
                        DBG_OPT_CSTEVAL(n, va);
                        DBG_OPT_CSTEVAL(n, vb);
@@ -3079,7 +3068,7 @@ make_tuple:
                blk = get_nodes_block(n);
                turn_into_tuple(n, pn_DivMod_max);
                set_Tuple_pred(n, pn_DivMod_M,         mem);
-               set_Tuple_pred(n, pn_DivMod_X_regular, new_r_Jmp(current_ir_graph, blk));
+               set_Tuple_pred(n, pn_DivMod_X_regular, new_r_Jmp(blk));
                set_Tuple_pred(n, pn_DivMod_X_except,  new_Bad());  /* no exception */
                set_Tuple_pred(n, pn_DivMod_res_div,   va);
                set_Tuple_pred(n, pn_DivMod_res_mod,   vb);
@@ -3119,15 +3108,15 @@ static ir_node *transform_node_Quot(ir_node *n) {
                                ir_node *blk = get_nodes_block(n);
                                ir_node *c = new_Const(tv);
                                ir_node *a = get_Quot_left(n);
-                               ir_node *m = new_rd_Mul(get_irn_dbg_info(n), current_ir_graph, blk, a, c, mode);
+                               ir_node *m = new_rd_Mul(get_irn_dbg_info(n), blk, a, c, mode);
                                ir_node *mem = get_Quot_mem(n);
 
                                /* skip a potential Pin */
                                mem = skip_Pin(mem);
                                turn_into_tuple(n, pn_Quot_max);
                                set_Tuple_pred(n, pn_Quot_M, mem);
-                               set_Tuple_pred(n, pn_Quot_X_regular, new_r_Jmp(current_ir_graph, blk));
-                               set_Tuple_pred(n, pn_Quot_X_except,  new_r_Bad(current_ir_graph));
+                               set_Tuple_pred(n, pn_Quot_X_regular, new_r_Jmp(blk));
+                               set_Tuple_pred(n, pn_Quot_X_except,  new_Bad());
                                set_Tuple_pred(n, pn_Quot_res, m);
                                DBG_OPT_ALGSIM1(oldn, a, b, m, FS_OPT_FP_INV_MUL);
                        }
@@ -3160,8 +3149,7 @@ static ir_node *transform_node_Abs(ir_node *n) {
                 * Note that -x would create a new node, so we could
                 * not run it in the equivalent_node() context.
                 */
-               n = new_rd_Minus(get_irn_dbg_info(n), current_ir_graph,
-                               get_nodes_block(n), a, mode);
+               n = new_rd_Minus(get_irn_dbg_info(n), get_nodes_block(n), a, mode);
 
                DBG_OPT_CONFIRM(oldn, n);
                return n;
@@ -3177,8 +3165,7 @@ static ir_node *transform_node_Abs(ir_node *n) {
        if (is_Minus(a)) {
                /* Abs(-x) = Abs(x) */
                mode = get_irn_mode(n);
-               n = new_rd_Abs(get_irn_dbg_info(n), current_ir_graph,
-                               get_nodes_block(n), get_Minus_op(a), mode);
+               n = new_rd_Abs(get_irn_dbg_info(n), get_nodes_block(n), get_Minus_op(a), mode);
                DBG_OPT_ALGSIM0(oldn, n, FS_OPT_ABS_MINUS_X);
                return n;
        }
@@ -3203,8 +3190,7 @@ static ir_node *transform_node_Cmp(ir_node *n) {
                !mode_overflow_on_unary_Minus(get_irn_mode(left))) {
                ir_node *const new_left  = get_Minus_op(right);
                ir_node *const new_right = get_Minus_op(left);
-               n = new_rd_Cmp(get_irn_dbg_info(n), current_ir_graph,
-                       get_nodes_block(n), new_left, new_right);
+               n = new_rd_Cmp(get_irn_dbg_info(n), get_nodes_block(n), new_left, new_right);
                DBG_OPT_ALGSIM0(oldn, n, FS_OPT_CMP_OP_OP);
        }
        return n;
@@ -3233,7 +3219,7 @@ static ir_node *transform_node_Cond(ir_node *n) {
                /* It's a boolean Cond, branching on a boolean constant.
                   Replace it by a tuple (Bad, Jmp) or (Jmp, Bad) */
                ir_node *blk = get_nodes_block(n);
-               jmp = new_r_Jmp(current_ir_graph, blk);
+               jmp = new_r_Jmp(blk);
                turn_into_tuple(n, pn_Cond_max);
                if (ta == tarval_b_true) {
                        set_Tuple_pred(n, pn_Cond_false, new_Bad());
@@ -3285,7 +3271,7 @@ static ir_node *transform_bitwise_distributive(ir_node *n,
                        set_binop_right(n, b_op);
                        set_irn_mode(n, a_mode);
                        n = trans_func(n);
-                       n = new_r_Conv(current_ir_graph, blk, n, get_irn_mode(oldn));
+                       n = new_r_Conv(blk, n, get_irn_mode(oldn));
 
                        DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_SHIFT_AND);
                        return n;
@@ -3339,11 +3325,10 @@ static ir_node *transform_bitwise_distributive(ir_node *n,
 
                        if(op_root == op_Eor && op == op_Or) {
                                dbg_info  *dbgi = get_irn_dbg_info(n);
-                               ir_graph  *irg  = current_ir_graph;
                                ir_mode   *mode = get_irn_mode(c);
 
-                               c = new_rd_Not(dbgi, irg, blk, c, mode);
-                               n = new_rd_And(dbgi, irg, blk, new_n, c, mode);
+                               c = new_rd_Not(dbgi, blk, c, mode);
+                               n = new_rd_And(dbgi, blk, new_n, c, mode);
                        } else {
                                n = exact_copy(a);
                                set_nodes_block(n, blk);
@@ -3384,7 +3369,7 @@ static ir_node *transform_node_And(ir_node *n) {
                        /* yes, we can simply calculate with pncs */
                        pn_Cmp new_pnc  = pn_a & pn_b;
 
-                       return new_rd_Proj(dbgi, current_ir_graph, block, pred_a, mode_b, new_pnc);
+                       return new_rd_Proj(dbgi, block, pred_a, mode_b, new_pnc);
                }
        }
        if (is_Or(a)) {
@@ -3399,7 +3384,7 @@ static ir_node *transform_node_And(ir_node *n) {
                                        /* (a|b) & ~(a&b) = a^b */
                                        ir_node *block = get_nodes_block(n);
 
-                                       n = new_rd_Eor(get_irn_dbg_info(n), current_ir_graph, block, ba, bb, mode);
+                                       n = new_rd_Eor(get_irn_dbg_info(n), block, ba, bb, mode);
                                        DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_TO_EOR);
                                        return n;
                                }
@@ -3418,7 +3403,7 @@ static ir_node *transform_node_And(ir_node *n) {
                                        /* (a|b) & ~(a&b) = a^b */
                                        ir_node *block = get_nodes_block(n);
 
-                                       n = new_rd_Eor(get_irn_dbg_info(n), current_ir_graph, block, aa, ab, mode);
+                                       n = new_rd_Eor(get_irn_dbg_info(n), block, aa, ab, mode);
                                        DBG_OPT_ALGSIM1(oldn, a, b, n, FS_OPT_TO_EOR);
                                        return n;
                                }
@@ -3434,8 +3419,8 @@ static ir_node *transform_node_And(ir_node *n) {
                        dbg_info *dbg  = get_irn_dbg_info(n);
                        ir_node *block = get_nodes_block(n);
 
-                       ar = new_rd_Not(dbg, current_ir_graph, block, ar, mode);
-                       n  = new_rd_And(dbg, current_ir_graph, block, ar, b, mode);
+                       ar = new_rd_Not(dbg, block, ar, mode);
+                       n  = new_rd_And(dbg, block, ar, b, mode);
                        DBG_OPT_ALGSIM0(oldn, n, FS_OPT_EOR_TO_NOT);
                        return n;
                }
@@ -3444,8 +3429,8 @@ static ir_node *transform_node_And(ir_node *n) {
                        dbg_info *dbg  = get_irn_dbg_info(n);
                        ir_node *block = get_nodes_block(n);
 
-                       al = new_rd_Not(dbg, current_ir_graph, block, al, mode);
-                       n  = new_rd_And(dbg, current_ir_graph, block, al, b, mode);
+                       al = new_rd_Not(dbg, block, al, mode);
+                       n  = new_rd_And(dbg, block, al, b, mode);
                        DBG_OPT_ALGSIM0(oldn, n, FS_OPT_EOR_TO_NOT);
                        return n;
                }
@@ -3459,8 +3444,8 @@ static ir_node *transform_node_And(ir_node *n) {
                        dbg_info *dbg  = get_irn_dbg_info(n);
                        ir_node *block = get_nodes_block(n);
 
-                       br = new_rd_Not(dbg, current_ir_graph, block, br, mode);
-                       n  = new_rd_And(dbg, current_ir_graph, block, br, a, mode);
+                       br = new_rd_Not(dbg, block, br, mode);
+                       n  = new_rd_And(dbg, block, br, a, mode);
                        DBG_OPT_ALGSIM0(oldn, n, FS_OPT_EOR_TO_NOT);
                        return n;
                }
@@ -3469,8 +3454,8 @@ static ir_node *transform_node_And(ir_node *n) {
                        dbg_info *dbg  = get_irn_dbg_info(n);
                        ir_node *block = get_nodes_block(n);
 
-                       bl = new_rd_Not(dbg, current_ir_graph, block, bl, mode);
-                       n  = new_rd_And(dbg, current_ir_graph, block, bl, a, mode);
+                       bl = new_rd_Not(dbg, block, bl, mode);
+                       n  = new_rd_And(dbg, block, bl, a, mode);
                        DBG_OPT_ALGSIM0(oldn, n, FS_OPT_EOR_TO_NOT);
                        return n;
                }
@@ -3482,8 +3467,8 @@ static ir_node *transform_node_And(ir_node *n) {
 
                a = get_Not_op(a);
                b = get_Not_op(b);
-               n = new_rd_Or(get_irn_dbg_info(n), current_ir_graph, block, a, b, mode);
-               n = new_rd_Not(get_irn_dbg_info(n), current_ir_graph, block, n, mode);
+               n = new_rd_Or(get_irn_dbg_info(n), block, a, b, mode);
+               n = new_rd_Not(get_irn_dbg_info(n), block, n, mode);
                DBG_OPT_ALGSIM0(oldn, n, FS_OPT_DEMORGAN);
                return n;
        }
@@ -3516,8 +3501,7 @@ static ir_node *transform_node_Eor(ir_node *n) {
                        /* yes, we can simply calculate with pncs */
                        pn_Cmp new_pnc  = pn_a ^ pn_b;
 
-                       return new_rd_Proj(dbgi, current_ir_graph, block, pred_a, mode_b,
-                                          new_pnc);
+                       return new_rd_Proj(dbgi, block, pred_a, mode_b, new_pnc);
                }
        }
 
@@ -3531,7 +3515,7 @@ static ir_node *transform_node_Eor(ir_node *n) {
                        is_Const(b) && is_Const_one(b) &&
                        is_Cmp(get_Proj_pred(a))) {
                /* The Eor negates a Cmp. The Cmp has the negated result anyways! */
-               n = new_r_Proj(current_ir_graph, get_nodes_block(n), get_Proj_pred(a),
+               n = new_r_Proj(get_nodes_block(n), get_Proj_pred(a),
                                mode_b, get_negated_pnc(get_Proj_proj(a), mode));
 
                DBG_OPT_ALGSIM0(oldn, n, FS_OPT_EOR_TO_NOT_BOOL);
@@ -3540,13 +3524,12 @@ static ir_node *transform_node_Eor(ir_node *n) {
                        ir_node  *cnst   = new_Const(tarval_not(get_Const_tarval(b)));
                        ir_node  *not_op = get_Not_op(a);
                        dbg_info *dbg    = get_irn_dbg_info(n);
-                       ir_graph *irg    = current_ir_graph;
                        ir_node  *block  = get_nodes_block(n);
                        ir_mode  *mode   = get_irn_mode(n);
-                       n = new_rd_Eor(dbg, irg, block, not_op, cnst, mode);
+                       n = new_rd_Eor(dbg, block, not_op, cnst, mode);
                        return n;
                } else if (is_Const_all_one(b)) { /* x ^ 1...1 -> ~1 */
-                       n = new_r_Not(current_ir_graph, get_nodes_block(n), a, mode);
+                       n = new_r_Not(get_nodes_block(n), a, mode);
                        DBG_OPT_ALGSIM0(oldn, n, FS_OPT_EOR_TO_NOT);
                }
        } else {
@@ -3572,7 +3555,7 @@ static ir_node *transform_node_Not(ir_node *n) {
                if (is_Cmp(a_pred)) {
                        ir_node *cmp_block = get_nodes_block(a_pred);
                        /* We negate a Cmp. The Cmp has the negated result anyways! */
-                       n = new_r_Proj(current_ir_graph, cmp_block, get_Proj_pred(a),
+                       n = new_r_Proj(cmp_block, get_Proj_pred(a),
                                       mode_b, get_negated_pnc(get_Proj_proj(a), mode_b));
                        DBG_OPT_ALGSIM0(oldn, n, FS_OPT_NOT_CMP);
                        return n;
@@ -3584,10 +3567,9 @@ static ir_node *transform_node_Not(ir_node *n) {
                        ir_node  *cnst  = new_Const(tarval_not(get_Const_tarval(eor_b)));
                        ir_node  *eor_a = get_Eor_left(a);
                        dbg_info *dbg   = get_irn_dbg_info(n);
-                       ir_graph *irg   = current_ir_graph;
                        ir_node  *block = get_nodes_block(n);
                        ir_mode  *mode  = get_irn_mode(n);
-                       n = new_rd_Eor(dbg, irg, block, eor_a, cnst, mode);
+                       n = new_rd_Eor(dbg, block, eor_a, cnst, mode);
                        return n;
                }
        }
@@ -3598,14 +3580,14 @@ static ir_node *transform_node_Not(ir_node *n) {
                        ir_node  *block = get_nodes_block(n);
                        ir_node  *add_l = get_Minus_op(a);
                        ir_node  *add_r = new_rd_Const(dbg, irg, get_mode_minus_one(mode));
-                       n = new_rd_Add(dbg, irg, block, add_l, add_r, mode);
+                       n = new_rd_Add(dbg, block, add_l, add_r, mode);
                } else if (is_Add(a)) {
                        ir_node *add_r = get_Add_right(a);
                        if (is_Const(add_r) && is_Const_all_one(add_r)) {
                                /* ~(x + -1) = -x */
                                ir_node *op = get_Add_left(a);
                                ir_node *blk = get_nodes_block(n);
-                               n = new_rd_Minus(get_irn_dbg_info(n), current_ir_graph, blk, op, get_irn_mode(n));
+                               n = new_rd_Minus(get_irn_dbg_info(n), blk, op, get_irn_mode(n));
                                DBG_OPT_ALGSIM0(oldn, n, FS_OPT_NOT_MINUS_1);
                        }
                }
@@ -3638,7 +3620,7 @@ static ir_node *transform_node_Minus(ir_node *n) {
                        tarval *tv    = get_mode_one(mode);
                        ir_node *blk  = get_nodes_block(n);
                        ir_node *c    = new_Const(tv);
-                       n = new_rd_Add(get_irn_dbg_info(n), current_ir_graph, blk, op, c, mode);
+                       n = new_rd_Add(get_irn_dbg_info(n), blk, op, c, mode);
                        DBG_OPT_ALGSIM2(oldn, a, n, FS_OPT_MINUS_NOT);
                        return n;
                }
@@ -3652,7 +3634,7 @@ static ir_node *transform_node_Minus(ir_node *n) {
                                        /* -(a >>u (size-1)) = a >>s (size-1) */
                                        ir_node *v = get_Shr_left(a);
 
-                                       n = new_rd_Shrs(get_irn_dbg_info(n), current_ir_graph, get_nodes_block(n), v, c, mode);
+                                       n = new_rd_Shrs(get_irn_dbg_info(n), get_nodes_block(n), v, c, mode);
                                        DBG_OPT_ALGSIM2(oldn, a, n, FS_OPT_PREDICATE);
                                        return n;
                                }
@@ -3668,7 +3650,7 @@ static ir_node *transform_node_Minus(ir_node *n) {
                                        /* -(a >>s (size-1)) = a >>u (size-1) */
                                        ir_node *v = get_Shrs_left(a);
 
-                                       n = new_rd_Shr(get_irn_dbg_info(n), current_ir_graph, get_nodes_block(n), v, c, mode);
+                                       n = new_rd_Shr(get_irn_dbg_info(n), get_nodes_block(n), v, c, mode);
                                        DBG_OPT_ALGSIM2(oldn, a, n, FS_OPT_PREDICATE);
                                        return n;
                                }
@@ -3681,7 +3663,7 @@ static ir_node *transform_node_Minus(ir_node *n) {
                ir_node *ra  = get_Sub_right(a);
                ir_node *blk = get_nodes_block(n);
 
-               n = new_rd_Sub(get_irn_dbg_info(n), current_ir_graph, blk, ra, la, mode);
+               n = new_rd_Sub(get_irn_dbg_info(n), blk, ra, la, mode);
                DBG_OPT_ALGSIM2(oldn, a, n, FS_OPT_MINUS_SUB);
                return n;
        }
@@ -3695,9 +3677,8 @@ static ir_node *transform_node_Minus(ir_node *n) {
                        if (tv != tarval_bad) {
                                ir_node  *cnst  = new_Const(tv);
                                dbg_info *dbg   = get_irn_dbg_info(a);
-                               ir_graph *irg   = current_ir_graph;
                                ir_node  *block = get_nodes_block(a);
-                               n = new_rd_Mul(dbg, irg, block, mul_l, cnst, mode);
+                               n = new_rd_Mul(dbg, block, mul_l, cnst, mode);
                                DBG_OPT_ALGSIM2(oldn, a, n, FS_OPT_MINUS_MUL_C);
                                return n;
                        }
@@ -3719,7 +3700,7 @@ static ir_node *transform_node_Cast(ir_node *n) {
                n = new_rd_Const_type(NULL, current_ir_graph, get_Const_tarval(pred), tp);
                DBG_OPT_CSTEVAL(oldn, n);
        } else if (is_SymConst(pred) && get_SymConst_value_type(pred) != tp) {
-               n = new_rd_SymConst_type(NULL, current_ir_graph, get_irn_n(pred, -1), get_irn_mode(pred),
+               n = new_rd_SymConst_type(NULL, current_ir_graph, get_irn_mode(pred),
                        get_SymConst_symbol(pred), get_SymConst_kind(pred), tp);
                DBG_OPT_CSTEVAL(oldn, n);
        }
@@ -3749,7 +3730,7 @@ static ir_node *transform_node_Proj_Load(ir_node *proj) {
                                        return get_irg_bad(current_ir_graph);
                                } else {
                                        ir_node *blk = get_nodes_block(load);
-                                       return new_r_Jmp(current_ir_graph, blk);
+                                       return new_r_Jmp(blk);
                                }
                        }
                }
@@ -3779,7 +3760,7 @@ static ir_node *transform_node_Proj_Store(ir_node *proj) {
                                        return get_irg_bad(current_ir_graph);
                                } else {
                                        ir_node *blk = get_nodes_block(store);
-                                       return new_r_Jmp(current_ir_graph, blk);
+                                       return new_r_Jmp(blk);
                                }
                        }
                }
@@ -3811,7 +3792,7 @@ static ir_node *transform_node_Proj_Div(ir_node *proj) {
                proj_nr = get_Proj_proj(proj);
                switch (proj_nr) {
                case pn_Div_X_regular:
-                       return new_r_Jmp(current_ir_graph, get_irn_n(div, -1));
+                       return new_r_Jmp(get_nodes_block(div));
 
                case pn_Div_X_except:
                        /* we found an exception handler, remove it */
@@ -3824,7 +3805,7 @@ static ir_node *transform_node_Proj_Div(ir_node *proj) {
 
                        if (confirm) {
                                /* This node can only float up to the Confirm block */
-                               new_mem = new_r_Pin(current_ir_graph, get_nodes_block(confirm), new_mem);
+                               new_mem = new_r_Pin(get_nodes_block(confirm), new_mem);
                        }
                        set_irn_pinned(div, op_pin_state_floats);
                        /* this is a Div without exception, we can remove the memory edge */
@@ -3861,7 +3842,7 @@ static ir_node *transform_node_Proj_Mod(ir_node *proj) {
                switch (proj_nr) {
 
                case pn_Mod_X_regular:
-                       return new_r_Jmp(current_ir_graph, get_irn_n(mod, -1));
+                       return new_r_Jmp(get_irn_n(mod, -1));
 
                case pn_Mod_X_except:
                        /* we found an exception handler, remove it */
@@ -3874,7 +3855,7 @@ static ir_node *transform_node_Proj_Mod(ir_node *proj) {
 
                        if (confirm) {
                                /* This node can only float up to the Confirm block */
-                               new_mem = new_r_Pin(current_ir_graph, get_nodes_block(confirm), new_mem);
+                               new_mem = new_r_Pin(get_nodes_block(confirm), new_mem);
                        }
                        /* this is a Mod without exception, we can remove the memory edge */
                        set_Mod_mem(mod, new_mem);
@@ -3919,7 +3900,7 @@ static ir_node *transform_node_Proj_DivMod(ir_node *proj) {
                switch (proj_nr) {
 
                case pn_DivMod_X_regular:
-                       return new_r_Jmp(current_ir_graph, get_irn_n(divmod, -1));
+                       return new_r_Jmp(get_nodes_block(divmod));
 
                case pn_DivMod_X_except:
                        /* we found an exception handler, remove it */
@@ -3932,7 +3913,7 @@ static ir_node *transform_node_Proj_DivMod(ir_node *proj) {
 
                        if (confirm) {
                                /* This node can only float up to the Confirm block */
-                               new_mem = new_r_Pin(current_ir_graph, get_nodes_block(confirm), new_mem);
+                               new_mem = new_r_Pin(get_nodes_block(confirm), new_mem);
                        }
                        /* this is a DivMod without exception, we can remove the memory edge */
                        set_DivMod_mem(divmod, new_mem);
@@ -4061,7 +4042,6 @@ static ir_node *transform_node_Proj_Cmp(ir_node *proj) {
 
                if (smaller_mode(mode_left, mode) && smaller_mode(mode_right, mode)
                                && mode_left != mode_b && mode_right != mode_b) {
-                       ir_graph *irg   = current_ir_graph;
                        ir_node  *block = get_nodes_block(n);
 
                        if (mode_left == mode_right) {
@@ -4070,13 +4050,13 @@ static ir_node *transform_node_Proj_Cmp(ir_node *proj) {
                                changed |= 1;
                                DBG_OPT_ALGSIM0(n, n, FS_OPT_CMP_CONV_CONV);
                        } else if (smaller_mode(mode_left, mode_right)) {
-                               left  = new_r_Conv(irg, block, op_left, mode_right);
+                               left  = new_r_Conv(block, op_left, mode_right);
                                right = op_right;
                                changed |= 1;
                                DBG_OPT_ALGSIM0(n, n, FS_OPT_CMP_CONV);
                        } else if (smaller_mode(mode_right, mode_left)) {
                                left  = op_left;
-                               right = new_r_Conv(irg, block, op_right, mode_left);
+                               right = new_r_Conv(block, op_right, mode_left);
                                changed |= 1;
                                DBG_OPT_ALGSIM0(n, n, FS_OPT_CMP_CONV);
                        }
@@ -4214,7 +4194,6 @@ static ir_node *transform_node_Proj_Cmp(ir_node *proj) {
 
                                        ir_node *llr = get_Shr_right(ll);
                                        if (is_Const(llr)) {
-                                               ir_graph *irg = current_ir_graph;
                                                dbg_info *dbg = get_irn_dbg_info(left);
 
                                                tarval *c1    = get_Const_tarval(llr);
@@ -4223,7 +4202,7 @@ static ir_node *transform_node_Proj_Cmp(ir_node *proj) {
                                                tarval *mask  = tarval_shl(c2, c1);
                                                tarval *value = tarval_shl(c3, c1);
 
-                                               left  = new_rd_And(dbg, irg, block, get_Shr_left(ll), new_Const(mask), mode);
+                                               left  = new_rd_And(dbg, block, get_Shr_left(ll), new_Const(mask), mode);
                                                right = new_Const(value);
                                                changed |= 1;
                                        }
@@ -4234,17 +4213,16 @@ static ir_node *transform_node_Proj_Cmp(ir_node *proj) {
 
        /* replace mode_b compares with ands/ors */
        if (get_irn_mode(left) == mode_b) {
-               ir_graph *irg   = current_ir_graph;
                ir_node  *block = get_nodes_block(n);
                ir_node  *bres;
 
                switch (proj_nr) {
-                       case pn_Cmp_Le: bres = new_r_Or( irg, block, new_r_Not(irg, block, left, mode_b), right, mode_b); break;
-                       case pn_Cmp_Lt: bres = new_r_And(irg, block, new_r_Not(irg, block, left, mode_b), right, mode_b); break;
-                       case pn_Cmp_Ge: bres = new_r_Or( irg, block, left, new_r_Not(irg, block, right, mode_b), mode_b); break;
-                       case pn_Cmp_Gt: bres = new_r_And(irg, block, left, new_r_Not(irg, block, right, mode_b), mode_b); break;
-                       case pn_Cmp_Lg: bres = new_r_Eor(irg, block, left, right, mode_b); break;
-                       case pn_Cmp_Eq: bres = new_r_Not(irg, block, new_r_Eor(irg, block, left, right, mode_b), mode_b); break;
+                       case pn_Cmp_Le: bres = new_r_Or( block, new_r_Not(block, left, mode_b), right, mode_b); break;
+                       case pn_Cmp_Lt: bres = new_r_And(block, new_r_Not(block, left, mode_b), right, mode_b); break;
+                       case pn_Cmp_Ge: bres = new_r_Or( block, left, new_r_Not(block, right, mode_b), mode_b); break;
+                       case pn_Cmp_Gt: bres = new_r_And(block, left, new_r_Not(block, right, mode_b), mode_b); break;
+                       case pn_Cmp_Lg: bres = new_r_Eor(block, left, right, mode_b); break;
+                       case pn_Cmp_Eq: bres = new_r_Not(block, new_r_Eor(block, left, right, mode_b), mode_b); break;
                        default: bres = NULL;
                }
                if (bres) {
@@ -4524,7 +4502,7 @@ static ir_node *transform_node_Proj_Cmp(ir_node *proj) {
                                                }
                                                sl   = get_Shl_left(left);
                                                blk  = get_nodes_block(n);
-                                               left = new_rd_And(get_irn_dbg_info(left), current_ir_graph, blk, sl, new_Const(amask), mode);
+                                               left = new_rd_And(get_irn_dbg_info(left), blk, sl, new_Const(amask), mode);
                                                tv   = tarval_shr(tv, tv1);
                                                changed |= 2;
                                                DBG_OPT_ALGSIM0(n, n, FS_OPT_CMP_SHF_TO_AND);
@@ -4555,7 +4533,7 @@ static ir_node *transform_node_Proj_Cmp(ir_node *proj) {
                                                }
                                                sl   = get_Shr_left(left);
                                                blk  = get_nodes_block(n);
-                                               left = new_rd_And(get_irn_dbg_info(left), current_ir_graph, blk, sl, new_Const(amask), mode);
+                                               left = new_rd_And(get_irn_dbg_info(left), blk, sl, new_Const(amask), mode);
                                                tv   = tarval_shl(tv, tv1);
                                                changed |= 2;
                                                DBG_OPT_ALGSIM0(n, n, FS_OPT_CMP_SHF_TO_AND);
@@ -4589,7 +4567,7 @@ static ir_node *transform_node_Proj_Cmp(ir_node *proj) {
                                                }
                                                sl   = get_Shrs_left(left);
                                                blk  = get_nodes_block(n);
-                                               left = new_rd_And(get_irn_dbg_info(left), current_ir_graph, blk, sl, new_Const(amask), mode);
+                                               left = new_rd_And(get_irn_dbg_info(left), blk, sl, new_Const(amask), mode);
                                                tv   = tarval_shl(tv, tv1);
                                                changed |= 2;
                                                DBG_OPT_ALGSIM0(n, n, FS_OPT_CMP_SHF_TO_AND);
@@ -4620,7 +4598,7 @@ static ir_node *transform_node_Proj_Cmp(ir_node *proj) {
                                        ir_mode *mode = get_irn_mode(v);
 
                                        tv = tarval_sub(tv, get_mode_one(mode), NULL);
-                                       left = new_rd_And(get_irn_dbg_info(op), current_ir_graph, blk, v, new_Const(tv), mode);
+                                       left = new_rd_And(get_irn_dbg_info(op), blk, v, new_Const(tv), mode);
                                        changed |= 1;
                                        DBG_OPT_ALGSIM0(n, n, FS_OPT_CMP_MOD_TO_AND);
                                }
@@ -4632,8 +4610,8 @@ static ir_node *transform_node_Proj_Cmp(ir_node *proj) {
                ir_node *block = get_nodes_block(n);
 
                /* create a new compare */
-               n = new_rd_Cmp(get_irn_dbg_info(n), current_ir_graph, block, left, right);
-               proj = new_rd_Proj(get_irn_dbg_info(proj), current_ir_graph, block, n, get_irn_mode(proj), proj_nr);
+               n = new_rd_Cmp(get_irn_dbg_info(n), block, left, right);
+               proj = new_rd_Proj(get_irn_dbg_info(proj), block, n, get_irn_mode(proj), proj_nr);
        }
 
        return proj;
@@ -4652,12 +4630,12 @@ static ir_node *transform_node_Proj_CopyB(ir_node *proj) {
                case pn_CopyB_X_regular:
                        /* Turn CopyB into a tuple (mem, jmp, bad, bad) */
                        DBG_OPT_EXC_REM(proj);
-                       proj = new_r_Jmp(current_ir_graph, get_nodes_block(copyb));
+                       proj = new_r_Jmp(get_nodes_block(copyb));
                        break;
                case pn_CopyB_M_except:
                case pn_CopyB_X_except:
                        DBG_OPT_EXC_REM(proj);
-                       proj = get_irg_bad(current_ir_graph);
+                       proj = get_irg_bad(get_irn_irg(proj));
                        break;
                default:
                        break;
@@ -4706,7 +4684,7 @@ static ir_node *transform_node_Proj_Bound(ir_node *proj) {
                        break;
                case pn_Bound_X_except:
                        DBG_OPT_EXC_REM(proj);
-                       proj = get_irg_bad(current_ir_graph);
+                       proj = get_irg_bad(get_irn_irg(proj));
                        break;
                case pn_Bound_res:
                        proj = idx;
@@ -4714,7 +4692,7 @@ static ir_node *transform_node_Proj_Bound(ir_node *proj) {
                        break;
                case pn_Bound_X_regular:
                        DBG_OPT_EXC_REM(proj);
-                       proj = new_r_Jmp(current_ir_graph, get_nodes_block(bound));
+                       proj = new_r_Jmp(get_nodes_block(bound));
                        break;
                default:
                        break;
@@ -4771,8 +4749,8 @@ static ir_node *transform_node_Phi(ir_node *phi) {
                        }
                        /* move the Confirm nodes "behind" the Phi */
                        block = get_irn_n(phi, -1);
-                       new_Phi = new_r_Phi(current_ir_graph, block, n, in, get_irn_mode(phi));
-                       return new_r_Confirm(current_ir_graph, block, new_Phi, bound, pnc);
+                       new_Phi = new_r_Phi(block, n, in, get_irn_mode(phi));
+                       return new_r_Confirm(block, new_Phi, bound, pnc);
                }
        }
        return phi;
@@ -4884,8 +4862,7 @@ static ir_node *transform_node_Or_bf_store(ir_node *or) {
                /* ok, all conditions met */
                block = get_irn_n(or, -1);
 
-               new_and = new_r_And(current_ir_graph, block,
-                       value, new_Const(tarval_and(tv4, tv2)), mode);
+               new_and = new_r_And(block, value, new_Const(tarval_and(tv4, tv2)), mode);
 
                new_const = new_Const(tarval_or(tv3, tv1));
 
@@ -4945,7 +4922,7 @@ static ir_node *transform_node_Or_Rotl(ir_node *or) {
                /* yet, condition met */
                block = get_nodes_block(or);
 
-               n = new_r_Rotl(current_ir_graph, block, x, c1, mode);
+               n = new_r_Rotl(block, x, c1, mode);
 
                DBG_OPT_ALGSIM1(or, shl, shr, n, FS_OPT_OR_SHFT_TO_ROTL);
                return n;
@@ -4978,7 +4955,7 @@ static ir_node *transform_node_Or_Rotl(ir_node *or) {
        /* yet, condition met */
        block = get_nodes_block(or);
 
-       n = new_r_Rotl(current_ir_graph, block, x, rotval, mode);
+       n = new_r_Rotl(block, x, rotval, mode);
 
        DBG_OPT_ALGSIM0(or, n, FS_OPT_OR_SHFT_TO_ROTL);
        return n;
@@ -5000,8 +4977,8 @@ static ir_node *transform_node_Or(ir_node *n) {
                mode = get_irn_mode(n);
                a = get_Not_op(a);
                b = get_Not_op(b);
-               n = new_rd_And(get_irn_dbg_info(n), current_ir_graph, block, a, b, mode);
-               n = new_rd_Not(get_irn_dbg_info(n), current_ir_graph, block, n, mode);
+               n = new_rd_And(get_irn_dbg_info(n), block, a, b, mode);
+               n = new_rd_Not(get_irn_dbg_info(n), block, n, mode);
                DBG_OPT_ALGSIM0(oldn, n, FS_OPT_DEMORGAN);
                return n;
        }
@@ -5018,8 +4995,7 @@ static ir_node *transform_node_Or(ir_node *n) {
                        /* yes, we can simply calculate with pncs */
                        pn_Cmp new_pnc  = pn_a | pn_b;
 
-                       return new_rd_Proj(dbgi, current_ir_graph, block, pred_a, mode_b,
-                                          new_pnc);
+                       return new_rd_Proj(dbgi, block, pred_a, mode_b, new_pnc);
                }
        }
 
@@ -5086,8 +5062,7 @@ static ir_node *transform_node_shift(ir_node *n) {
                                        dbg_info *dbgi  = get_irn_dbg_info(n);
                                        ir_mode  *smode  = get_irn_mode(right);
                                        ir_node  *cnst  = new_Const_long(smode, get_mode_size_bits(mode) - 1);
-                                       return new_rd_Shrs(dbgi, irg, block, get_binop_left(left),
-                                                          cnst, mode);
+                                       return new_rd_Shrs(dbgi, block, get_binop_left(left), cnst, mode);
                                }
 
                                return new_Const(get_mode_null(mode));
@@ -5103,7 +5078,7 @@ static ir_node *transform_node_shift(ir_node *n) {
        in[0] = get_binop_left(left);
        in[1] = new_Const(res);
 
-       irn = new_ir_node(NULL, current_ir_graph, block, get_irn_op(n), mode, 2, in);
+       irn = new_ir_node(NULL, get_Block_irg(block), block, get_irn_op(n), mode, 2, in);
 
        DBG_OPT_ALGSIM0(n, irn, FS_OPT_REASSOC_SHIFT);
 
@@ -5124,7 +5099,6 @@ static ir_node *transform_node_bitop_shift(ir_node *n) {
        ir_node  *bitop_left;
        ir_node  *bitop_right;
        ir_op    *op_left;
-       ir_graph *irg;
        ir_node  *block;
        dbg_info *dbgi;
        ir_node  *new_shift;
@@ -5156,7 +5130,6 @@ static ir_node *transform_node_bitop_shift(ir_node *n) {
 
        bitop_left = get_binop_left(left);
 
-       irg   = get_irn_irg(n);
        block = get_nodes_block(n);
        dbgi  = get_irn_dbg_info(n);
        tv1   = get_Const_tarval(bitop_right);
@@ -5165,17 +5138,17 @@ static ir_node *transform_node_bitop_shift(ir_node *n) {
        assert(get_tarval_mode(tv1) == mode);
 
        if (is_Shl(n)) {
-               new_shift = new_rd_Shl(dbgi, irg, block, bitop_left, right, mode);
+               new_shift = new_rd_Shl(dbgi, block, bitop_left, right, mode);
                tv_shift  = tarval_shl(tv1, tv2);
        } else if(is_Shr(n)) {
-               new_shift = new_rd_Shr(dbgi, irg, block, bitop_left, right, mode);
+               new_shift = new_rd_Shr(dbgi, block, bitop_left, right, mode);
                tv_shift  = tarval_shr(tv1, tv2);
        } else if(is_Shrs(n)) {
-               new_shift = new_rd_Shrs(dbgi, irg, block, bitop_left, right, mode);
+               new_shift = new_rd_Shrs(dbgi, block, bitop_left, right, mode);
                tv_shift  = tarval_shrs(tv1, tv2);
        } else {
                assert(is_Rotl(n));
-               new_shift = new_rd_Rotl(dbgi, irg, block, bitop_left, right, mode);
+               new_shift = new_rd_Rotl(dbgi, block, bitop_left, right, mode);
                tv_shift  = tarval_rotl(tv1, tv2);
        }
 
@@ -5183,12 +5156,12 @@ static ir_node *transform_node_bitop_shift(ir_node *n) {
        new_const = new_Const(tv_shift);
 
        if (op_left == op_And) {
-               new_bitop = new_rd_And(dbgi, irg, block, new_shift, new_const, mode);
+               new_bitop = new_rd_And(dbgi, block, new_shift, new_const, mode);
        } else if(op_left == op_Or) {
-               new_bitop = new_rd_Or(dbgi, irg, block, new_shift, new_const, mode);
+               new_bitop = new_rd_Or(dbgi, block, new_shift, new_const, mode);
        } else {
                assert(op_left == op_Eor);
-               new_bitop = new_rd_Eor(dbgi, irg, block, new_shift, new_const, mode);
+               new_bitop = new_rd_Eor(dbgi, block, new_shift, new_const, mode);
        }
 
        return new_bitop;
@@ -5279,19 +5252,19 @@ static ir_node *transform_node_shl_shr(ir_node *n) {
                tv_shift  = tarval_sub(tv_shr, tv_shl, NULL);
                new_const = new_Const(tv_shift);
                if (need_shrs) {
-                       new_shift = new_rd_Shrs(dbgi, irg, block, x, new_const, mode);
+                       new_shift = new_rd_Shrs(dbgi, block, x, new_const, mode);
                } else {
-                       new_shift = new_rd_Shr(dbgi, irg, block, x, new_const, mode);
+                       new_shift = new_rd_Shr(dbgi, block, x, new_const, mode);
                }
        } else {
                assert(pnc == pn_Cmp_Gt);
                tv_shift  = tarval_sub(tv_shl, tv_shr, NULL);
                new_const = new_Const(tv_shift);
-               new_shift = new_rd_Shl(dbgi, irg, block, x, new_const, mode);
+               new_shift = new_rd_Shl(dbgi, block, x, new_const, mode);
        }
 
        new_const = new_Const(tv_mask);
-       new_and   = new_rd_And(dbgi, irg, block, new_shift, new_const, mode);
+       new_and   = new_rd_And(dbgi, block, new_shift, new_const, mode);
 
        return new_and;
 }
@@ -5407,7 +5380,7 @@ static ir_node *transform_node_Conv(ir_node *n) {
                        ir_node *lop = get_Conv_op(l);
                        if(get_irn_mode(lop) == mode) {
                                /* ConvP(AddI(ConvI(P), x)) -> AddP(P, x) */
-                               n = new_rd_Add(dbgi, current_ir_graph, block, lop, r, mode);
+                               n = new_rd_Add(dbgi, block, lop, r, mode);
                                return n;
                        }
                }
@@ -5415,7 +5388,7 @@ static ir_node *transform_node_Conv(ir_node *n) {
                        ir_node *rop = get_Conv_op(r);
                        if(get_irn_mode(rop) == mode) {
                                /* ConvP(AddI(x, ConvI(P))) -> AddP(x, P) */
-                               n = new_rd_Add(dbgi, current_ir_graph, block, l, rop, mode);
+                               n = new_rd_Add(dbgi, block, l, rop, mode);
                                return n;
                        }
                }
@@ -5494,8 +5467,8 @@ static ir_node *transform_node_Mux(ir_node *n) {
                ir_node*  f1    = get_Mux_false(t);
                if (f == f1) {
                        /* Mux(cond0, Mux(cond1, x, y), y) -> typical if (cond0 && cond1) x else y */
-                       ir_node* and_    = new_r_And(irg, block, c0, c1, mode_b);
-                       ir_node* new_mux = new_r_Mux(irg, block, and_, f1, t1, mode);
+                       ir_node* and_    = new_r_And(block, c0, c1, mode_b);
+                       ir_node* new_mux = new_r_Mux(block, and_, f1, t1, mode);
                        n   = new_mux;
                        sel = and_;
                        f   = f1;
@@ -5503,9 +5476,9 @@ static ir_node *transform_node_Mux(ir_node *n) {
                        DBG_OPT_ALGSIM0(oldn, t, FS_OPT_MUX_COMBINE);
                } else if (f == t1) {
                        /* Mux(cond0, Mux(cond1, x, y), x) */
-                       ir_node* not_c1  = new_r_Not(irg, block, c1, mode_b);
-                       ir_node* and_    = new_r_And(irg, block, c0, not_c1, mode_b);
-                       ir_node* new_mux = new_r_Mux(irg, block, and_, t1, f1, mode);
+                       ir_node* not_c1  = new_r_Not(block, c1, mode_b);
+                       ir_node* and_    = new_r_And(block, c0, not_c1, mode_b);
+                       ir_node* new_mux = new_r_Mux(block, and_, t1, f1, mode);
                        n   = new_mux;
                        sel = and_;
                        f   = t1;
@@ -5520,8 +5493,8 @@ static ir_node *transform_node_Mux(ir_node *n) {
                ir_node*  f1    = get_Mux_false(f);
                if (t == t1) {
                        /* Mux(cond0, x, Mux(cond1, x, y)) -> typical if (cond0 || cond1) x else y */
-                       ir_node* or_     = new_r_Or(irg, block, c0, c1, mode_b);
-                       ir_node* new_mux = new_r_Mux(irg, block, or_, f1, t1, mode);
+                       ir_node* or_     = new_r_Or(block, c0, c1, mode_b);
+                       ir_node* new_mux = new_r_Mux(block, or_, f1, t1, mode);
                        n   = new_mux;
                        sel = or_;
                        f   = f1;
@@ -5529,9 +5502,9 @@ static ir_node *transform_node_Mux(ir_node *n) {
                        DBG_OPT_ALGSIM0(oldn, f, FS_OPT_MUX_COMBINE);
                } else if (t == f1) {
                        /* Mux(cond0, x, Mux(cond1, y, x)) */
-                       ir_node* not_c1  = new_r_Not(irg, block, c1, mode_b);
-                       ir_node* or_     = new_r_Or(irg, block, c0, not_c1, mode_b);
-                       ir_node* new_mux = new_r_Mux(irg, block, or_, t1, f1, mode);
+                       ir_node* not_c1  = new_r_Not(block, c1, mode_b);
+                       ir_node* or_     = new_r_Or(block, c0, not_c1, mode_b);
+                       ir_node* new_mux = new_r_Mux(block, or_, t1, f1, mode);
                        n   = new_mux;
                        sel = or_;
                        f   = t1;
@@ -5550,9 +5523,9 @@ static ir_node *transform_node_Mux(ir_node *n) {
 
                                /* Mux(x, 0, y) => Mux(x, y, 0) */
                                pn_Cmp pnc = get_Proj_proj(sel);
-                               sel = new_r_Proj(irg, get_nodes_block(cmp), cmp, mode_b,
+                               sel = new_r_Proj(get_nodes_block(cmp), cmp, mode_b,
                                        get_negated_pnc(pnc, get_irn_mode(get_Cmp_left(cmp))));
-                               n        = new_rd_Mux(get_irn_dbg_info(n), irg, get_nodes_block(n), sel, t, f, mode);
+                               n        = new_rd_Mux(get_irn_dbg_info(n), get_nodes_block(n), sel, t, f, mode);
                                tmp = t;
                                t = f;
                                f = tmp;
@@ -5564,7 +5537,6 @@ static ir_node *transform_node_Mux(ir_node *n) {
        if (mode == mode_b) {
                dbg_info *dbg   = get_irn_dbg_info(n);
                ir_node  *block = get_nodes_block(n);
-               ir_graph *irg   = current_ir_graph;
 
                if (is_Const(t)) {
                        tarval *tv_t = get_Const_tarval(t);
@@ -5576,7 +5548,7 @@ static ir_node *transform_node_Mux(ir_node *n) {
                                        return sel;
                                } else {
                                        /* Muxb(sel, true, x) = Or(sel, x) */
-                                       n = new_rd_Or(dbg, irg, block, sel, f, mode_b);
+                                       n = new_rd_Or(dbg, block, sel, f, mode_b);
                                        DBG_OPT_ALGSIM0(oldn, n, FS_OPT_MUX_OR_BOOL);
                                        return n;
                                }
@@ -5585,14 +5557,14 @@ static ir_node *transform_node_Mux(ir_node *n) {
                        tarval *tv_f = get_Const_tarval(f);
                        if (tv_f == tarval_b_true) {
                                /* Muxb(sel, x, true) = Or(Not(sel), x) */
-                               ir_node* not_sel = new_rd_Not(dbg, irg, block, sel, mode_b);
+                               ir_node* not_sel = new_rd_Not(dbg, block, sel, mode_b);
                                DBG_OPT_ALGSIM0(oldn, n, FS_OPT_MUX_ORNOT_BOOL);
-                               n = new_rd_Or(dbg, irg, block, not_sel, t, mode_b);
+                               n = new_rd_Or(dbg, block, not_sel, t, mode_b);
                                return n;
                        } else {
                                /* Muxb(sel, x, false) = And(sel, x) */
                                assert(tv_f == tarval_b_false);
-                               n = new_rd_And(dbg, irg, block, sel, t, mode_b);
+                               n = new_rd_And(dbg, block, sel, t, mode_b);
                                DBG_OPT_ALGSIM0(oldn, n, FS_OPT_MUX_AND_BOOL);
                                return n;
                        }
@@ -5607,14 +5579,14 @@ static ir_node *transform_node_Mux(ir_node *n) {
 
                if (tarval_is_one(a) && tarval_is_null(b)) {
                        ir_node *block = get_nodes_block(n);
-                       ir_node *conv  = new_r_Conv(current_ir_graph, block, sel, mode);
+                       ir_node *conv  = new_r_Conv(block, sel, mode);
                        n = conv;
                        DBG_OPT_ALGSIM0(oldn, n, FS_OPT_MUX_CONV);
                        return n;
                } else if (tarval_is_null(a) && tarval_is_one(b)) {
                        ir_node *block = get_nodes_block(n);
-                       ir_node *not_  = new_r_Not(current_ir_graph, block, sel, mode_b);
-                       ir_node *conv  = new_r_Conv(current_ir_graph, block, not_, mode);
+                       ir_node *not_  = new_r_Not(block, sel, mode_b);
+                       ir_node *conv  = new_r_Conv(block, not_, mode);
                        n = conv;
                        DBG_OPT_ALGSIM0(oldn, n, FS_OPT_MUX_CONV);
                        return n;
@@ -5634,8 +5606,8 @@ static ir_node *transform_node_Mux(ir_node *n) {
                        ir_node  *block = get_nodes_block(n);
                        ir_node  *t     = new_Const(tarval_sub(a, min, NULL));
                        ir_node  *f     = new_Const(tarval_sub(b, min, NULL));
-                       n = new_rd_Mux(dbg, irg, block, sel, f, t, mode);
-                       n = new_rd_Add(dbg, irg, block, n, new_Const(min), mode);
+                       n = new_rd_Mux(dbg, block, sel, f, t, mode);
+                       n = new_rd_Add(dbg, block, n, new_Const(min), mode);
                        return n;
                }
        }
@@ -5666,18 +5638,15 @@ static ir_node *transform_node_Mux(ir_node *n) {
                                                || (cmp_l == f && (pn == pn_Cmp_Le || pn == pn_Cmp_Lt)))
                                        {
                                                /* Mux(a >/>= 0, a, -a) = Mux(a </<= 0, -a, a) ==> Abs(a) */
-                                               n = new_rd_Abs(get_irn_dbg_info(n), current_ir_graph, block,
-                                                                                cmp_l, mode);
+                                               n = new_rd_Abs(get_irn_dbg_info(n), block, cmp_l, mode);
                                                DBG_OPT_ALGSIM1(oldn, cmp, sel, n, FS_OPT_MUX_TO_ABS);
                                                return n;
                                        } else if ((cmp_l == t && (pn == pn_Cmp_Le || pn == pn_Cmp_Lt))
                                                || (cmp_l == f && (pn == pn_Cmp_Ge || pn == pn_Cmp_Gt)))
                                        {
                                                /* Mux(a </<= 0, a, -a) = Mux(a >/>= 0, -a, a) ==> -Abs(a) */
-                                               n = new_rd_Abs(get_irn_dbg_info(n), current_ir_graph, block,
-                                                                                cmp_l, mode);
-                                               n = new_rd_Minus(get_irn_dbg_info(n), current_ir_graph,
-                                                                                                                block, n, mode);
+                                               n = new_rd_Abs(get_irn_dbg_info(n), block, cmp_l, mode);
+                                               n = new_rd_Minus(get_irn_dbg_info(n), block, n, mode);
                                                DBG_OPT_ALGSIM1(oldn, cmp, sel, n, FS_OPT_MUX_TO_ABS);
                                                return n;
                                        }
@@ -5698,7 +5667,7 @@ static ir_node *transform_node_Mux(ir_node *n) {
                                                                        DBG_OPT_ALGSIM1(oldn, cmp, sel, n, FS_OPT_MUX_TO_BITOP);
                                                                } else {
                                                                        /* Mux((a & 2^C) == 0, 2^C, 0) */
-                                                                       n = new_rd_Eor(get_irn_dbg_info(n), current_ir_graph,
+                                                                       n = new_rd_Eor(get_irn_dbg_info(n),
                                                                                block, cmp_l, t, mode);
                                                                        DBG_OPT_ALGSIM1(oldn, cmp, sel, n, FS_OPT_MUX_TO_BITOP);
                                                                }
@@ -5715,7 +5684,7 @@ static ir_node *transform_node_Mux(ir_node *n) {
                                                                                DBG_OPT_ALGSIM1(oldn, cmp, sel, n, FS_OPT_MUX_TO_BITOP);
                                                                        } else {
                                                                                /* (a & (1 << n)) == 0, (1 << n), 0) */
-                                                                               n = new_rd_Eor(get_irn_dbg_info(n), current_ir_graph,
+                                                                               n = new_rd_Eor(get_irn_dbg_info(n),
                                                                                        block, cmp_l, t, mode);
                                                                                DBG_OPT_ALGSIM1(oldn, cmp, sel, n, FS_OPT_MUX_TO_BITOP);
                                                                        }
@@ -5734,7 +5703,7 @@ static ir_node *transform_node_Mux(ir_node *n) {
                                                                                DBG_OPT_ALGSIM1(oldn, cmp, sel, n, FS_OPT_MUX_TO_BITOP);
                                                                        } else {
                                                                                /* ((1 << n) & a) == 0, (1 << n), 0) */
-                                                                               n = new_rd_Eor(get_irn_dbg_info(n), current_ir_graph,
+                                                                               n = new_rd_Eor(get_irn_dbg_info(n),
                                                                                        block, cmp_l, t, mode);
                                                                                DBG_OPT_ALGSIM1(oldn, cmp, sel, n, FS_OPT_MUX_TO_BITOP);
                                                                        }
@@ -5861,7 +5830,7 @@ static ir_node *transform_node_Call(ir_node *call) {
        db  = get_irn_dbg_info(call);
        bl  = get_nodes_block(call);
 
-       res = new_rd_Call(db, current_ir_graph, bl, mem, adr, n_param + 1, in, ctp);
+       res = new_rd_Call(db, bl, mem, adr, n_param + 1, in, ctp);
        if (get_irn_pinned(call) == op_pin_state_floats)
                set_irn_pinned(res, op_pin_state_floats);
        return res;
index 8828375..84d307f 100644 (file)
@@ -122,14 +122,14 @@ instrument_block(ir_node *bb, ir_node *address, unsigned int id)
 
        unknown = new_r_Unknown(irg, mode_M);
        cnst    = new_r_Const_long(irg, mode_Iu, get_mode_size_bytes(mode_Iu) * id);
-       offset  = new_r_Add(irg, bb, address, cnst, get_modeP_data());
-       load    = new_r_Load(irg, bb, unknown, offset, mode_Iu, 0);
-       projm   = new_r_Proj(irg, bb, load, mode_M, pn_Load_M);
-       proji   = new_r_Proj(irg, bb, load, mode_Iu, pn_Load_res);
+       offset  = new_r_Add(bb, address, cnst, get_modeP_data());
+       load    = new_r_Load(bb, unknown, offset, mode_Iu, 0);
+       projm   = new_r_Proj(bb, load, mode_M, pn_Load_M);
+       proji   = new_r_Proj(bb, load, mode_Iu, pn_Load_res);
        cnst    = new_r_Const_long(irg, mode_Iu, 1);
-       add     = new_r_Add(irg, bb, proji, cnst, mode_Iu);
-       store   = new_r_Store(irg, bb, projm, offset, add, 0);
-       projm   = new_r_Proj(irg, bb, store, mode_M, pn_Store_M);
+       add     = new_r_Add(bb, proji, cnst, mode_Iu);
+       store   = new_r_Store(bb, projm, offset, add, 0);
+       projm   = new_r_Proj(bb, store, mode_M, pn_Store_M);
        set_irn_link(bb, projm);
        set_irn_link(projm, load);
 }
@@ -159,13 +159,12 @@ fix_ssa(ir_node * bb, void * data)
        } else {
                int n;
                ir_node **ins;
-               ir_graph *irg = current_ir_graph;
 
                NEW_ARR_A(ir_node*, ins, arity);
                for (n = arity - 1; n >= 0; --n) {
                        ins[n] = get_irn_link(get_Block_cfgpred_block(bb, n));
                }
-               mem = new_r_Phi(irg, bb, arity, ins, mode_M);
+               mem = new_r_Phi(bb, arity, ins, mode_M);
        }
        set_Load_mem(get_irn_link(get_irn_link(bb)), mem);
 }
@@ -195,10 +194,8 @@ static void add_constructor(ir_entity *method)
  *      void __firmprof_initializer(void) { __init_firmprof(ent_filename, bblock_id, bblock_counts, n_blocks); }
  */
 static ir_graph *
-gen_initializer_irg(ir_entity * ent_filename, ir_entity * bblock_id, ir_entity * bblock_counts, int n_blocks)
+gen_initializer_irg(ir_entity *ent_filename, ir_entity *bblock_id, ir_entity *bblock_counts, int n_blocks)
 {
-       ir_node *start_block;
-
        ir_node   *ins[4];
        ident     *name = new_id_from_str("__firmprof_initializer");
        ir_entity *ent  = new_entity(get_glob_type(), name, new_type_method(name, 0, 0));
@@ -232,21 +229,19 @@ gen_initializer_irg(ir_entity * ent_filename, ir_entity * bblock_id, ir_entity *
 
        bb = get_cur_block();
 
-       start_block = get_irg_start_block(irg);
-
        sym.entity_p = init_ent;
-       symconst     = new_r_SymConst(irg, start_block, mode_P_data, sym, symconst_addr_ent);
+       symconst     = new_r_SymConst(irg, mode_P_data, sym, symconst_addr_ent);
 
        sym.entity_p = ent_filename;
-       ins[0] = new_r_SymConst(irg, start_block, mode_P_data, sym, symconst_addr_ent);
+       ins[0] = new_r_SymConst(irg, mode_P_data, sym, symconst_addr_ent);
        sym.entity_p = bblock_id;
-       ins[1] = new_r_SymConst(irg, start_block, mode_P_data, sym, symconst_addr_ent);
+       ins[1] = new_r_SymConst(irg, mode_P_data, sym, symconst_addr_ent);
        sym.entity_p = bblock_counts;
-       ins[2] = new_r_SymConst(irg, start_block, mode_P_data, sym, symconst_addr_ent);
+       ins[2] = new_r_SymConst(irg, mode_P_data, sym, symconst_addr_ent);
        ins[3] = new_r_Const_long(irg, mode_Iu, n_blocks);
 
-       call = new_r_Call(irg, bb, get_irg_initial_mem(irg), symconst, 4, ins, init_type);
-       ret = new_r_Return(irg, bb, new_r_Proj(irg, bb, call, mode_M, pn_Call_M_regular), 0, NULL);
+       call = new_r_Call(bb, get_irg_initial_mem(irg), symconst, 4, ins, init_type);
+       ret = new_r_Return(bb, new_r_Proj(bb, call, mode_M, pn_Call_M_regular), 0, NULL);
        mature_immBlock(bb);
 
        add_immBlock_pred(get_irg_end_block(irg), ret);
@@ -466,7 +461,7 @@ ir_profile_instrument(const char *filename, unsigned flags)
 
                /* generate a symbolic constant pointing to the count array */
                sym.entity_p = bblock_counts;
-               wd.symconst  = new_r_SymConst(irg, get_irg_start_block(irg), mode_P_data, sym, symconst_addr_ent);
+               wd.symconst  = new_r_SymConst(irg, mode_P_data, sym, symconst_addr_ent);
 
                irg_block_walk_graph(irg, block_id_walker, NULL, &wd);
                start_block = get_irg_start_block(irg);
@@ -482,13 +477,13 @@ ir_profile_instrument(const char *filename, unsigned flags)
                        case iro_Return:
                                ins[0] = get_irn_link(bb);
                                ins[1] = get_Return_mem(node);
-                               sync   = new_r_Sync(irg, bb, 2, ins);
+                               sync   = new_r_Sync(bb, 2, ins);
                                set_Return_mem(node, sync);
                                break;
                        case iro_Raise:
                                ins[0] = get_irn_link(bb);
                                ins[1] = get_Raise_mem(node);
-                               sync   = new_r_Sync(irg, bb, 2, ins);
+                               sync   = new_r_Sync(bb, 2, ins);
                                set_Raise_mem(node, sync);
                                break;
                        default:
index 0f0c0e2..97f633b 100644 (file)
@@ -518,7 +518,6 @@ static ir_node *get_dummy_sel(ir_graph *irg, ir_node *block, ir_type *tp, wlk_en
                }
        }
        return new_r_simpleSel(
-               irg,
                block,
                get_irg_no_mem(irg),
                get_irg_frame(irg),
@@ -569,7 +568,7 @@ static void add_hidden_param(ir_graph *irg, int n_com, ir_node **ins, cl_entry *
                turn_into_tuple(p, pn_CopyB_max);
                set_Tuple_pred(p, pn_CopyB_M_regular, mem);
                set_Tuple_pred(p, pn_CopyB_M_except,  get_irg_bad(irg));
-               set_Tuple_pred(p, pn_CopyB_X_regular, new_r_Jmp(irg, blk));
+               set_Tuple_pred(p, pn_CopyB_X_regular, new_r_Jmp(blk));
                set_Tuple_pred(p, pn_CopyB_X_except,  get_irg_bad(irg));
                ++n_args;
        }
@@ -769,7 +768,7 @@ static void transform_irg(const lower_params_t *lp, ir_graph *irg)
 
                        if (is_compound_type(tp)) {
                                ir_node *arg = get_irg_args(irg);
-                               arg = new_r_Proj(irg, get_nodes_block(arg), arg, mode_P_data, env.first_hidden + k);
+                               arg = new_r_Proj(get_nodes_block(arg), arg, mode_P_data, env.first_hidden + k);
                                ++k;
 
                                if (is_Unknown(pred)) {
@@ -790,13 +789,13 @@ static void transform_irg(const lower_params_t *lp, ir_graph *irg)
                                                ++n_cr_opt;
                                        } else { /* copy-return optimization is impossible, do the copy. */
                                                copy = new_r_CopyB(
-                                                       irg, bl,
+                                                       bl,
                                                        mem,
                                                        arg,
                                                        pred,
                                                        tp
                                                        );
-                                               mem = new_r_Proj(irg, bl, copy, mode_M, pn_CopyB_M_regular);
+                                               mem = new_r_Proj(bl, copy, mode_M, pn_CopyB_M_regular);
                                        }
                                }
                                if (lp->flags & LF_RETURN_HIDDEN) {
index ae4a7af..8060ab0 100644 (file)
@@ -99,17 +99,17 @@ static void lower_copyb_nodes(ir_node *irn, unsigned mode_bytes) {
                        ir_node *store_mem;
 
                        addr_const = new_r_Const_long(irg, mode_Iu, offset);
-                       add        = new_r_Add(irg, block, addr_src, addr_const, addr_mode);
+                       add        = new_r_Add(block, addr_src, addr_const, addr_mode);
 
-                       load     = new_r_Load(irg, block, mem, add, mode, 0);
-                       load_res = new_r_Proj(irg, block, load, mode, pn_Load_res);
-                       load_mem = new_r_Proj(irg, block, load, mode_M, pn_Load_M);
+                       load     = new_r_Load(block, mem, add, mode, 0);
+                       load_res = new_r_Proj(block, load, mode, pn_Load_res);
+                       load_mem = new_r_Proj(block, load, mode_M, pn_Load_M);
 
                        addr_const = new_r_Const_long(irg, mode_Iu, offset);
-                       add        = new_r_Add(irg, block, addr_dst, addr_const, addr_mode);
+                       add        = new_r_Add(block, addr_dst, addr_const, addr_mode);
 
-                       store     = new_r_Store(irg, block, load_mem, add, load_res, 0);
-                       store_mem = new_r_Proj(irg, block, store, mode_M, pn_Store_M);
+                       store     = new_r_Store(block, load_mem, add, load_res, 0);
+                       store_mem = new_r_Proj(block, store, mode_M, pn_Store_M);
 
                        mem = store_mem;
                }
index 4ca21af..7532b76 100644 (file)
@@ -373,21 +373,17 @@ static void lower_Load(ir_node *node, ir_mode *mode, lower_env_t *env) {
 
        if (env->params->little_endian) {
                low  = adr;
-               high = new_r_Add(irg, block, adr,
-                       new_r_Const(irg, env->tv_mode_bytes),
-                       get_irn_mode(adr));
+               high = new_r_Add(block, adr, new_r_Const(irg, env->tv_mode_bytes), get_irn_mode(adr));
        } else {
-               low  = new_r_Add(irg, block, adr,
-                       new_r_Const(irg, env->tv_mode_bytes),
-                       get_irn_mode(adr));
+               low  = new_r_Add(block, adr, new_r_Const(irg, env->tv_mode_bytes), get_irn_mode(adr));
                high = adr;
        }  /* if */
 
        /* create two loads */
        dbg  = get_irn_dbg_info(node);
-       low  = new_rd_Load(dbg, irg, block, mem,  low,  low_mode, volatility);
-       proj = new_r_Proj(irg, block, low, mode_M, pn_Load_M);
-       high = new_rd_Load(dbg, irg, block, proj, high, mode, volatility);
+       low  = new_rd_Load(dbg, block, mem,  low,  low_mode, volatility);
+       proj = new_r_Proj(block, low, mode_M, pn_Load_M);
+       high = new_rd_Load(dbg, block, proj, high, mode, volatility);
 
        idx = get_irn_idx(node);
        assert(idx < env->n_entries);
@@ -408,8 +404,8 @@ static void lower_Load(ir_node *node, ir_mode *mode, lower_env_t *env) {
                        break;
                case pn_Load_res:       /* Result of load operation. */
                        assert(idx < env->n_entries);
-                       env->entries[idx]->low_word  = new_r_Proj(irg, block, low,  low_mode, pn_Load_res);
-                       env->entries[idx]->high_word = new_r_Proj(irg, block, high, mode,     pn_Load_res);
+                       env->entries[idx]->low_word  = new_r_Proj(block, low,  low_mode, pn_Load_res);
+                       env->entries[idx]->high_word = new_r_Proj(block, high, mode,     pn_Load_res);
                        break;
                default:
                        assert(0 && "unexpected Proj number");
@@ -451,21 +447,17 @@ static void lower_Store(ir_node *node, ir_mode *mode, lower_env_t *env) {
 
        if (env->params->little_endian) {
                low  = adr;
-               high = new_r_Add(irg, block, adr,
-                       new_r_Const(irg, env->tv_mode_bytes),
-                       get_irn_mode(adr));
+               high = new_r_Add(block, adr, new_r_Const(irg, env->tv_mode_bytes), get_irn_mode(adr));
        } else {
-               low  = new_r_Add(irg, block, adr,
-                       new_r_Const(irg, env->tv_mode_bytes),
-                       get_irn_mode(adr));
+               low  = new_r_Add(block, adr, new_r_Const(irg, env->tv_mode_bytes), get_irn_mode(adr));
                high = adr;
        }  /* if */
 
        /* create two Stores */
        dbg = get_irn_dbg_info(node);
-       low  = new_rd_Store(dbg, irg, block, mem, low,  entry->low_word, volatility);
-       proj = new_r_Proj(irg, block, low, mode_M, pn_Store_M);
-       high = new_rd_Store(dbg, irg, block, proj, high, entry->high_word, volatility);
+       low  = new_rd_Store(dbg, block, mem, low,  entry->low_word, volatility);
+       proj = new_r_Proj(block, low, mode_M, pn_Store_M);
+       high = new_rd_Store(dbg, block, proj, high, entry->high_word, volatility);
 
        idx = get_irn_idx(node);
        assert(idx < env->n_entries);
@@ -527,7 +519,7 @@ static ir_node *get_intrinsic_address(ir_type *method, ir_op *op,
                ent = entry->ent;
        }  /* if */
        sym.entity_p = ent;
-       return new_r_SymConst(current_ir_graph, block, mode_P_code, sym, symconst_addr_ent);
+       return new_r_SymConst(current_ir_graph, mode_P_code, sym, symconst_addr_ent);
 }  /* get_intrinsic_address */
 
 /**
@@ -542,7 +534,6 @@ static void lower_Div(ir_node *node, ir_mode *mode, lower_env_t *env) {
        dbg_info *dbg;
        ir_type  *mtp;
        int      idx;
-       ir_graph *irg;
        node_entry_t *entry;
 
        irn   = get_Div_left(node);
@@ -573,15 +564,13 @@ static void lower_Div(ir_node *node, ir_mode *mode, lower_env_t *env) {
 
        dbg   = get_irn_dbg_info(node);
        block = get_nodes_block(node);
-       irg   = current_ir_graph;
 
        mtp = mode_is_signed(mode) ? binop_tp_s : binop_tp_u;
        opmode = get_irn_op_mode(node);
        irn = get_intrinsic_address(mtp, get_irn_op(node), opmode, opmode, block, env);
-       call = new_rd_Call(dbg, irg, block, get_Div_mem(node),
-               irn, 4, in, mtp);
+       call = new_rd_Call(dbg, block, get_Div_mem(node), irn, 4, in, mtp);
        set_irn_pinned(call, get_irn_pinned(node));
-       irn = new_r_Proj(irg, block, call, mode_T, pn_Call_T_result);
+       irn = new_r_Proj(block, call, mode_T, pn_Call_T_result);
 
        for (proj = get_irn_link(node); proj; proj = get_irn_link(proj)) {
                switch (get_Proj_proj(proj)) {
@@ -598,8 +587,8 @@ static void lower_Div(ir_node *node, ir_mode *mode, lower_env_t *env) {
                case pn_Div_res:       /* Result of computation. */
                        idx = get_irn_idx(proj);
                        assert(idx < env->n_entries);
-                       env->entries[idx]->low_word  = new_r_Proj(current_ir_graph, block, irn, env->params->low_unsigned, 0);
-                       env->entries[idx]->high_word = new_r_Proj(current_ir_graph, block, irn, mode,                      1);
+                       env->entries[idx]->low_word  = new_r_Proj(block, irn, env->params->low_unsigned, 0);
+                       env->entries[idx]->high_word = new_r_Proj(block, irn, mode,                      1);
                        break;
                default:
                        assert(0 && "unexpected Proj number");
@@ -622,7 +611,6 @@ static void lower_Mod(ir_node *node, ir_mode *mode, lower_env_t *env) {
        dbg_info *dbg;
        ir_type  *mtp;
        int      idx;
-       ir_graph *irg;
        node_entry_t *entry;
 
        irn   = get_Mod_left(node);
@@ -653,15 +641,13 @@ static void lower_Mod(ir_node *node, ir_mode *mode, lower_env_t *env) {
 
        dbg   = get_irn_dbg_info(node);
        block = get_nodes_block(node);
-       irg   = current_ir_graph;
 
        mtp = mode_is_signed(mode) ? binop_tp_s : binop_tp_u;
        opmode = get_irn_op_mode(node);
        irn = get_intrinsic_address(mtp, get_irn_op(node), opmode, opmode, block, env);
-       call = new_rd_Call(dbg, irg, block, get_Mod_mem(node),
-               irn, 4, in, mtp);
+       call = new_rd_Call(dbg, block, get_Mod_mem(node), irn, 4, in, mtp);
        set_irn_pinned(call, get_irn_pinned(node));
-       irn = new_r_Proj(irg, block, call, mode_T, pn_Call_T_result);
+       irn = new_r_Proj(block, call, mode_T, pn_Call_T_result);
 
        for (proj = get_irn_link(node); proj; proj = get_irn_link(proj)) {
                switch (get_Proj_proj(proj)) {
@@ -678,8 +664,8 @@ static void lower_Mod(ir_node *node, ir_mode *mode, lower_env_t *env) {
                case pn_Mod_res:       /* Result of computation. */
                        idx = get_irn_idx(proj);
                        assert(idx < env->n_entries);
-                       env->entries[idx]->low_word  = new_r_Proj(irg, block, irn, env->params->low_unsigned, 0);
-                       env->entries[idx]->high_word = new_r_Proj(irg, block, irn, mode,                      1);
+                       env->entries[idx]->low_word  = new_r_Proj(block, irn, env->params->low_unsigned, 0);
+                       env->entries[idx]->high_word = new_r_Proj(block, irn, mode,                      1);
                        break;
                default:
                        assert(0 && "unexpected Proj number");
@@ -706,7 +692,6 @@ static void lower_DivMod(ir_node *node, ir_mode *mode, lower_env_t *env) {
        int      idx;
        node_entry_t *entry;
        unsigned flags = 0;
-       ir_graph *irg;
 
        /* check if both results are needed */
        for (proj = get_irn_link(node); proj; proj = get_irn_link(proj)) {
@@ -745,7 +730,6 @@ static void lower_DivMod(ir_node *node, ir_mode *mode, lower_env_t *env) {
 
        dbg   = get_irn_dbg_info(node);
        block = get_nodes_block(node);
-       irg   = current_ir_graph;
 
        mem = get_DivMod_mem(node);
 
@@ -754,20 +738,18 @@ static void lower_DivMod(ir_node *node, ir_mode *mode, lower_env_t *env) {
        if (flags & 1) {
                opmode = get_irn_op_mode(node);
                irn = get_intrinsic_address(mtp, op_Div, opmode, opmode, block, env);
-               callDiv = new_rd_Call(dbg, irg, block, mem,
-                       irn, 4, in, mtp);
+               callDiv = new_rd_Call(dbg, block, mem, irn, 4, in, mtp);
                set_irn_pinned(callDiv, get_irn_pinned(node));
-               resDiv = new_r_Proj(irg, block, callDiv, mode_T, pn_Call_T_result);
+               resDiv = new_r_Proj(block, callDiv, mode_T, pn_Call_T_result);
        }  /* if */
        if (flags & 2) {
                if (flags & 1)
-                       mem = new_r_Proj(irg, block, callDiv, mode_M, pn_Call_M);
+                       mem = new_r_Proj(block, callDiv, mode_M, pn_Call_M);
                opmode = get_irn_op_mode(node);
                irn = get_intrinsic_address(mtp, op_Mod, opmode, opmode, block, env);
-               callMod = new_rd_Call(dbg, irg, block, mem,
-                       irn, 4, in, mtp);
+               callMod = new_rd_Call(dbg, block, mem, irn, 4, in, mtp);
                set_irn_pinned(callMod, get_irn_pinned(node));
-               resMod = new_r_Proj(irg, block, callMod, mode_T, pn_Call_T_result);
+               resMod = new_r_Proj(block, callMod, mode_T, pn_Call_T_result);
        }  /* if */
 
        for (proj = get_irn_link(node); proj; proj = get_irn_link(proj)) {
@@ -785,13 +767,13 @@ static void lower_DivMod(ir_node *node, ir_mode *mode, lower_env_t *env) {
                case pn_DivMod_res_div:   /* Result of Div. */
                        idx = get_irn_idx(proj);
                        assert(idx < env->n_entries);
-                       env->entries[idx]->low_word  = new_r_Proj(irg, block, resDiv, env->params->low_unsigned, 0);
-                       env->entries[idx]->high_word = new_r_Proj(irg, block, resDiv, mode,                      1);
+                       env->entries[idx]->low_word  = new_r_Proj(block, resDiv, env->params->low_unsigned, 0);
+                       env->entries[idx]->high_word = new_r_Proj(block, resDiv, mode,                      1);
                        break;
                case pn_DivMod_res_mod:   /* Result of Mod. */
                        idx = get_irn_idx(proj);
-                       env->entries[idx]->low_word  = new_r_Proj(irg, block, resMod, env->params->low_unsigned, 0);
-                       env->entries[idx]->high_word = new_r_Proj(irg, block, resMod, mode,                      1);
+                       env->entries[idx]->low_word  = new_r_Proj(block, resMod, env->params->low_unsigned, 0);
+                       env->entries[idx]->high_word = new_r_Proj(block, resMod, mode,                      1);
                        break;
                default:
                        assert(0 && "unexpected Proj number");
@@ -848,15 +830,15 @@ static void lower_Binop(ir_node *node, ir_mode *mode, lower_env_t *env) {
 
        mtp = mode_is_signed(mode) ? binop_tp_s : binop_tp_u;
        irn = get_intrinsic_address(mtp, get_irn_op(node), mode, mode, block, env);
-       irn = new_rd_Call(dbg, irg, block, get_irg_no_mem(current_ir_graph),
+       irn = new_rd_Call(dbg, block, get_irg_no_mem(current_ir_graph),
                irn, 4, in, mtp);
        set_irn_pinned(irn, get_irn_pinned(node));
-       irn = new_r_Proj(irg, block, irn, mode_T, pn_Call_T_result);
+       irn = new_r_Proj(block, irn, mode_T, pn_Call_T_result);
 
        idx = get_irn_idx(node);
        assert(idx < env->n_entries);
-       env->entries[idx]->low_word  = new_r_Proj(irg, block, irn, env->params->low_unsigned, 0);
-       env->entries[idx]->high_word = new_r_Proj(irg, block, irn, mode,                      1);
+       env->entries[idx]->low_word  = new_r_Proj(block, irn, env->params->low_unsigned, 0);
+       env->entries[idx]->high_word = new_r_Proj(block, irn, mode,                      1);
 }  /* lower_Binop */
 
 /**
@@ -895,15 +877,15 @@ static void lower_Shiftop(ir_node *node, ir_mode *mode, lower_env_t *env) {
 
        mtp = mode_is_signed(mode) ? shiftop_tp_s : shiftop_tp_u;
        irn = get_intrinsic_address(mtp, get_irn_op(node), mode, mode, block, env);
-       irn = new_rd_Call(dbg, irg, block, get_irg_no_mem(current_ir_graph),
+       irn = new_rd_Call(dbg, block, get_irg_no_mem(current_ir_graph),
                irn, 3, in, mtp);
        set_irn_pinned(irn, get_irn_pinned(node));
-       irn = new_r_Proj(irg, block, irn, mode_T, pn_Call_T_result);
+       irn = new_r_Proj(block, irn, mode_T, pn_Call_T_result);
 
        idx = get_irn_idx(node);
        assert(idx < env->n_entries);
-       env->entries[idx]->low_word  = new_r_Proj(irg, block, irn, env->params->low_unsigned, 0);
-       env->entries[idx]->high_word = new_r_Proj(irg, block, irn, mode,                      1);
+       env->entries[idx]->low_word  = new_r_Proj(block, irn, env->params->low_unsigned, 0);
+       env->entries[idx]->high_word = new_r_Proj(block, irn, mode,                      1);
 }  /* lower_Shiftop */
 
 /**
@@ -929,7 +911,7 @@ static void lower_Shr(ir_node *node, ir_mode *mode, lower_env_t *env) {
 
                        if (shf_cnt > 0) {
                                c = new_r_Const_long(irg, env->params->low_unsigned, shf_cnt);
-                               env->entries[idx]->low_word = new_r_Shr(irg, block, left, c, mode);
+                               env->entries[idx]->low_word = new_r_Shr(block, left, c, mode);
                        } else {
                                env->entries[idx]->low_word = left;
                        }  /* if */
@@ -960,13 +942,13 @@ static void lower_Shl(ir_node *node, ir_mode *mode, lower_env_t *env) {
                        long shf_cnt = get_tarval_long(tv) - get_mode_size_bits(mode);
                        int idx = get_irn_idx(left);
 
-                       left = new_r_Conv(irg, block, env->entries[idx]->low_word, mode);
+                       left = new_r_Conv(block, env->entries[idx]->low_word, mode);
                        idx = get_irn_idx(node);
 
                        mode_l = env->params->low_unsigned;
                        if (shf_cnt > 0) {
                                c = new_r_Const_long(irg, mode_l, shf_cnt);
-                               env->entries[idx]->high_word = new_r_Shl(irg, block, left, c, mode);
+                               env->entries[idx]->high_word = new_r_Shl(block, left, c, mode);
                        } else {
                                env->entries[idx]->high_word = left;
                        }  /* if */
@@ -1004,15 +986,15 @@ static void lower_Shrs(ir_node *node, ir_mode *mode, lower_env_t *env) {
                        mode_l = env->params->low_unsigned;
                        if (shf_cnt > 0) {
                                c   = new_r_Const_long(irg, mode_l, shf_cnt);
-                               low = new_r_Shrs(irg, block, left, c, mode);
+                               low = new_r_Shrs(block, left, c, mode);
                        } else {
                                low = left;
                        }  /* if */
                        /* low word is expected to have mode_l */
-                       env->entries[idx]->low_word = new_r_Conv(irg, block, low, mode_l);
+                       env->entries[idx]->low_word = new_r_Conv(block, low, mode_l);
 
                        c = new_r_Const_long(irg, mode_l, get_mode_size_bits(mode) - 1);
-                       env->entries[idx]->high_word = new_r_Shrs(irg, block, left, c, mode);
+                       env->entries[idx]->high_word = new_r_Shrs(block, left, c, mode);
 
                        return;
                }  /* if */
@@ -1033,7 +1015,6 @@ static void prepare_links_and_handle_rotl(ir_node *node, void *env) {
                                ir_node  *right = get_Rotl_right(node);
                                ir_node  *left, *shl, *shr, *or, *block, *sub, *c;
                                ir_mode  *omode, *rmode;
-                               ir_graph *irg;
                                dbg_info *dbg;
                                optimization_state_t state;
 
@@ -1051,18 +1032,17 @@ static void prepare_links_and_handle_rotl(ir_node *node, void *env) {
                                dbg   = get_irn_dbg_info(node);
                                omode = get_irn_mode(node);
                                left  = get_Rotl_left(node);
-                               irg   = current_ir_graph;
                                block = get_nodes_block(node);
-                               shl   = new_rd_Shl(dbg, irg, block, left, right, omode);
+                               shl   = new_rd_Shl(dbg, block, left, right, omode);
                                rmode = get_irn_mode(right);
                                c     = new_Const_long(rmode, get_mode_size_bits(omode));
-                               sub   = new_rd_Sub(dbg, irg, block, c, right, rmode);
-                               shr   = new_rd_Shr(dbg, irg, block, left, sub, omode);
+                               sub   = new_rd_Sub(dbg, block, c, right, rmode);
+                               shr   = new_rd_Shr(dbg, block, left, sub, omode);
 
                                /* optimization must be switched off here, or we will get the Rotl back */
                                save_optimization_state(&state);
                                set_opt_algebraic_simplification(0);
-                               or = new_rd_Or(dbg, irg, block, shl, shr, omode);
+                               or = new_rd_Or(dbg, block, shl, shr, omode);
                                restore_optimization_state(&state);
 
                                exchange(node, or);
@@ -1113,7 +1093,6 @@ static void lower_Unop(ir_node *node, ir_mode *mode, lower_env_t *env) {
        dbg_info *dbg;
        ir_type  *mtp;
        int      idx;
-       ir_graph *irg;
        node_entry_t *entry;
 
        irn   = get_unop_op(node);
@@ -1131,19 +1110,18 @@ static void lower_Unop(ir_node *node, ir_mode *mode, lower_env_t *env) {
 
        dbg   = get_irn_dbg_info(node);
        block = get_nodes_block(node);
-       irg   = current_ir_graph;
 
        mtp = mode_is_signed(mode) ? unop_tp_s : unop_tp_u;
        irn = get_intrinsic_address(mtp, get_irn_op(node), mode, mode, block, env);
-       irn = new_rd_Call(dbg, irg, block, get_irg_no_mem(current_ir_graph),
+       irn = new_rd_Call(dbg, block, get_irg_no_mem(current_ir_graph),
                irn, 2, in, mtp);
        set_irn_pinned(irn, get_irn_pinned(node));
-       irn = new_r_Proj(irg, block, irn, mode_T, pn_Call_T_result);
+       irn = new_r_Proj(block, irn, mode_T, pn_Call_T_result);
 
        idx = get_irn_idx(node);
        assert(idx < env->n_entries);
-       env->entries[idx]->low_word  = new_r_Proj(irg, block, irn, env->params->low_unsigned, 0);
-       env->entries[idx]->high_word = new_r_Proj(irg, block, irn, mode,                      1);
+       env->entries[idx]->low_word  = new_r_Proj(block, irn, env->params->low_unsigned, 0);
+       env->entries[idx]->high_word = new_r_Proj(block, irn, mode,                      1);
 }  /* lower_Unop */
 
 /**
@@ -1152,7 +1130,7 @@ static void lower_Unop(ir_node *node, ir_mode *mode, lower_env_t *env) {
  * Create two logical Binops.
  */
 static void lower_Binop_logical(ir_node *node, ir_mode *mode, lower_env_t *env,
-                                                               ir_node *(*constr_rd)(dbg_info *db, ir_graph *irg, ir_node *block, ir_node *op1, ir_node *op2, ir_mode *mode) ) {
+                                                               ir_node *(*constr_rd)(dbg_info *db, ir_node *block, ir_node *op1, ir_node *op2, ir_mode *mode) ) {
        ir_node  *block, *irn;
        ir_node  *lop_l, *lop_h, *rop_l, *rop_h;
        dbg_info *dbg;
@@ -1192,8 +1170,8 @@ static void lower_Binop_logical(ir_node *node, ir_mode *mode, lower_env_t *env,
        idx = get_irn_idx(node);
        assert(idx < env->n_entries);
        irg = current_ir_graph;
-       env->entries[idx]->low_word  = constr_rd(dbg, irg, block, lop_l, rop_l, env->params->low_unsigned);
-       env->entries[idx]->high_word = constr_rd(dbg, irg, block, lop_h, rop_h, mode);
+       env->entries[idx]->low_word  = constr_rd(dbg, block, lop_l, rop_l, env->params->low_unsigned);
+       env->entries[idx]->high_word = constr_rd(dbg, block, lop_h, rop_h, mode);
 }  /* lower_Binop_logical */
 
 /** create a logical operation transformation */
@@ -1216,7 +1194,6 @@ static void lower_Not(ir_node *node, ir_mode *mode, lower_env_t *env) {
        ir_node  *op_l, *op_h;
        dbg_info *dbg;
        int      idx;
-       ir_graph *irg;
        node_entry_t *entry;
 
        irn   = get_Not_op(node);
@@ -1234,12 +1211,11 @@ static void lower_Not(ir_node *node, ir_mode *mode, lower_env_t *env) {
 
        dbg   = get_irn_dbg_info(node);
        block = get_nodes_block(node);
-       irg   = current_ir_graph;
 
        idx = get_irn_idx(node);
        assert(idx < env->n_entries);
-       env->entries[idx]->low_word  = new_rd_Not(dbg, current_ir_graph, block, op_l, env->params->low_unsigned);
-       env->entries[idx]->high_word = new_rd_Not(dbg, current_ir_graph, block, op_h, mode);
+       env->entries[idx]->low_word  = new_rd_Not(dbg, block, op_l, env->params->low_unsigned);
+       env->entries[idx]->high_word = new_rd_Not(dbg, block, op_h, mode);
 }  /* lower_Not */
 
 /**
@@ -1258,8 +1234,8 @@ static void lower_Cond(ir_node *node, ir_mode *mode, lower_env_t *env) {
                ir_node  *new_bl, *cmpH, *cmpL, *irn;
                ir_node  *projHF, *projHT;
                ir_node  *dst_blk;
-               ir_graph *irg;
                pn_Cmp   pnc;
+               ir_graph *irg;
                dbg_info *dbg;
 
                if(!is_Proj(sel))
@@ -1307,26 +1283,26 @@ static void lower_Cond(ir_node *node, ir_mode *mode, lower_env_t *env) {
 
                /* create a new high compare */
                block = get_nodes_block(node);
+               irg   = get_Block_irg(block);
                dbg   = get_irn_dbg_info(cmp);
-               irg   = current_ir_graph;
                pnc   = get_Proj_proj(sel);
 
                if (is_Const(right) && is_Const_null(right)) {
                        if (pnc == pn_Cmp_Eq || pnc == pn_Cmp_Lg) {
                                /* x ==/!= 0 ==> or(low,high) ==/!= 0 */
                                ir_mode *mode = env->params->low_unsigned;
-                               ir_node *low  = new_r_Conv(irg, block, lentry->low_word, mode);
-                               ir_node *high = new_r_Conv(irg, block, lentry->high_word, mode);
-                               ir_node *or   = new_rd_Or(dbg, irg, block, low, high, mode);
-                               ir_node *cmp  = new_rd_Cmp(dbg, irg, block, or, new_Const_long(mode, 0));
+                               ir_node *low  = new_r_Conv(block, lentry->low_word, mode);
+                               ir_node *high = new_r_Conv(block, lentry->high_word, mode);
+                               ir_node *or   = new_rd_Or(dbg, block, low, high, mode);
+                               ir_node *cmp  = new_rd_Cmp(dbg, block, or, new_Const_long(mode, 0));
 
-                               ir_node *proj = new_r_Proj(irg, block, cmp, mode_b, pnc);
+                               ir_node *proj = new_r_Proj(block, cmp, mode_b, pnc);
                                set_Cond_selector(node, proj);
                                return;
                        }
                }
 
-               cmpH = new_rd_Cmp(dbg, irg, block, lentry->high_word, rentry->high_word);
+               cmpH = new_rd_Cmp(dbg, block, lentry->high_word, rentry->high_word);
 
                if (pnc == pn_Cmp_Eq) {
                        /* simple case:a == b <==> a_h == b_h && a_l == b_l */
@@ -1335,30 +1311,30 @@ static void lower_Cond(ir_node *node, ir_mode *mode, lower_env_t *env) {
                        assert(entry);
                        dst_blk = entry->value;
 
-                       irn = new_r_Proj(irg, block, cmpH, mode_b, pn_Cmp_Eq);
+                       irn = new_r_Proj(block, cmpH, mode_b, pn_Cmp_Eq);
                        dbg = get_irn_dbg_info(node);
-                       irn = new_rd_Cond(dbg, irg, block, irn);
+                       irn = new_rd_Cond(dbg, block, irn);
 
-                       projHF = new_r_Proj(irg, block, irn, mode_X, pn_Cond_false);
+                       projHF = new_r_Proj(block, irn, mode_X, pn_Cond_false);
                        mark_irn_visited(projHF);
                        exchange(projF, projHF);
 
-                       projHT = new_r_Proj(irg, block, irn, mode_X, pn_Cond_true);
+                       projHT = new_r_Proj(block, irn, mode_X, pn_Cond_true);
                        mark_irn_visited(projHT);
 
                        new_bl = new_r_Block(irg, 1, &projHT);
 
                        dbg   = get_irn_dbg_info(cmp);
-                       cmpL = new_rd_Cmp(dbg, irg, new_bl, lentry->low_word, rentry->low_word);
-                       irn = new_r_Proj(irg, new_bl, cmpL, mode_b, pn_Cmp_Eq);
+                       cmpL = new_rd_Cmp(dbg, new_bl, lentry->low_word, rentry->low_word);
+                       irn = new_r_Proj(new_bl, cmpL, mode_b, pn_Cmp_Eq);
                        dbg = get_irn_dbg_info(node);
-                       irn = new_rd_Cond(dbg, irg, new_bl, irn);
+                       irn = new_rd_Cond(dbg, new_bl, irn);
 
-                       proj = new_r_Proj(irg, new_bl, irn, mode_X, pn_Cond_false);
+                       proj = new_r_Proj(new_bl, irn, mode_X, pn_Cond_false);
                        mark_irn_visited(proj);
                        add_block_cf_input(dst_blk, projHF, proj);
 
-                       proj = new_r_Proj(irg, new_bl, irn, mode_X, pn_Cond_true);
+                       proj = new_r_Proj(new_bl, irn, mode_X, pn_Cond_true);
                        mark_irn_visited(proj);
                        exchange(projT, proj);
                } else if (pnc == pn_Cmp_Lg) {
@@ -1368,30 +1344,30 @@ static void lower_Cond(ir_node *node, ir_mode *mode, lower_env_t *env) {
                        assert(entry);
                        dst_blk = entry->value;
 
-                       irn = new_r_Proj(irg, block, cmpH, mode_b, pn_Cmp_Lg);
+                       irn = new_r_Proj(block, cmpH, mode_b, pn_Cmp_Lg);
                        dbg = get_irn_dbg_info(node);
-                       irn = new_rd_Cond(dbg, irg, block, irn);
+                       irn = new_rd_Cond(dbg, block, irn);
 
-                       projHT = new_r_Proj(irg, block, irn, mode_X, pn_Cond_true);
+                       projHT = new_r_Proj(block, irn, mode_X, pn_Cond_true);
                        mark_irn_visited(projHT);
                        exchange(projT, projHT);
 
-                       projHF = new_r_Proj(irg, block, irn, mode_X, pn_Cond_false);
+                       projHF = new_r_Proj(block, irn, mode_X, pn_Cond_false);
                        mark_irn_visited(projHF);
 
                        new_bl = new_r_Block(irg, 1, &projHF);
 
                        dbg   = get_irn_dbg_info(cmp);
-                       cmpL = new_rd_Cmp(dbg, irg, new_bl, lentry->low_word, rentry->low_word);
-                       irn = new_r_Proj(irg, new_bl, cmpL, mode_b, pn_Cmp_Lg);
+                       cmpL = new_rd_Cmp(dbg, new_bl, lentry->low_word, rentry->low_word);
+                       irn = new_r_Proj(new_bl, cmpL, mode_b, pn_Cmp_Lg);
                        dbg = get_irn_dbg_info(node);
-                       irn = new_rd_Cond(dbg, irg, new_bl, irn);
+                       irn = new_rd_Cond(dbg, new_bl, irn);
 
-                       proj = new_r_Proj(irg, new_bl, irn, mode_X, pn_Cond_true);
+                       proj = new_r_Proj(new_bl, irn, mode_X, pn_Cond_true);
                        mark_irn_visited(proj);
                        add_block_cf_input(dst_blk, projHT, proj);
 
-                       proj = new_r_Proj(irg, new_bl, irn, mode_X, pn_Cond_false);
+                       proj = new_r_Proj(new_bl, irn, mode_X, pn_Cond_false);
                        mark_irn_visited(proj);
                        exchange(projF, proj);
                } else {
@@ -1407,44 +1383,44 @@ static void lower_Cond(ir_node *node, ir_mode *mode, lower_env_t *env) {
                        assert(entry);
                        dstF = entry->value;
 
-                       irn = new_r_Proj(irg, block, cmpH, mode_b, pnc & ~pn_Cmp_Eq);
+                       irn = new_r_Proj(block, cmpH, mode_b, pnc & ~pn_Cmp_Eq);
                        dbg = get_irn_dbg_info(node);
-                       irn = new_rd_Cond(dbg, irg, block, irn);
+                       irn = new_rd_Cond(dbg, block, irn);
 
-                       projHT = new_r_Proj(irg, block, irn, mode_X, pn_Cond_true);
+                       projHT = new_r_Proj(block, irn, mode_X, pn_Cond_true);
                        mark_irn_visited(projHT);
                        exchange(projT, projHT);
                        projT = projHT;
 
-                       projHF = new_r_Proj(irg, block, irn, mode_X, pn_Cond_false);
+                       projHF = new_r_Proj(block, irn, mode_X, pn_Cond_false);
                        mark_irn_visited(projHF);
 
                        newbl_eq = new_r_Block(irg, 1, &projHF);
 
-                       irn = new_r_Proj(irg, block, cmpH, mode_b, pn_Cmp_Eq);
-                       irn = new_rd_Cond(dbg, irg, newbl_eq, irn);
+                       irn = new_r_Proj(block, cmpH, mode_b, pn_Cmp_Eq);
+                       irn = new_rd_Cond(dbg, newbl_eq, irn);
 
-                       proj = new_r_Proj(irg, newbl_eq, irn, mode_X, pn_Cond_false);
+                       proj = new_r_Proj(newbl_eq, irn, mode_X, pn_Cond_false);
                        mark_irn_visited(proj);
                        exchange(projF, proj);
                        projF = proj;
 
-                       proj = new_r_Proj(irg, newbl_eq, irn, mode_X, pn_Cond_true);
+                       proj = new_r_Proj(newbl_eq, irn, mode_X, pn_Cond_true);
                        mark_irn_visited(proj);
 
                        newbl_l = new_r_Block(irg, 1, &proj);
 
                        dbg   = get_irn_dbg_info(cmp);
-                       cmpL = new_rd_Cmp(dbg, irg, newbl_l, lentry->low_word, rentry->low_word);
-                       irn = new_r_Proj(irg, newbl_l, cmpL, mode_b, pnc);
+                       cmpL = new_rd_Cmp(dbg, newbl_l, lentry->low_word, rentry->low_word);
+                       irn = new_r_Proj(newbl_l, cmpL, mode_b, pnc);
                        dbg = get_irn_dbg_info(node);
-                       irn = new_rd_Cond(dbg, irg, newbl_l, irn);
+                       irn = new_rd_Cond(dbg, newbl_l, irn);
 
-                       proj = new_r_Proj(irg, newbl_l, irn, mode_X, pn_Cond_true);
+                       proj = new_r_Proj(newbl_l, irn, mode_X, pn_Cond_true);
                        mark_irn_visited(proj);
                        add_block_cf_input(dstT, projT, proj);
 
-                       proj = new_r_Proj(irg, newbl_l, irn, mode_X, pn_Cond_false);
+                       proj = new_r_Proj(newbl_l, irn, mode_X, pn_Cond_false);
                        mark_irn_visited(proj);
                        add_block_cf_input(dstF, projF, proj);
                }  /* if */
@@ -1497,18 +1473,18 @@ static void lower_Conv_to_Ls(ir_node *node, lower_env_t *env) {
                                pdeq_putr(env->waitq, node);
                                return;
                        }  /* if */
-                       env->entries[idx]->low_word  = new_rd_Conv(dbg, irg, block, env->entries[op_idx]->low_word,  dst_mode_l);
-                       env->entries[idx]->high_word = new_rd_Conv(dbg, irg, block, env->entries[op_idx]->high_word, dst_mode_h);
+                       env->entries[idx]->low_word  = new_rd_Conv(dbg, block, env->entries[op_idx]->low_word,  dst_mode_l);
+                       env->entries[idx]->high_word = new_rd_Conv(dbg, block, env->entries[op_idx]->high_word, dst_mode_h);
                } else {
                        /* simple case: create a high word */
                        if (imode != dst_mode_l)
-                               op = new_rd_Conv(dbg, irg, block, op, dst_mode_l);
+                               op = new_rd_Conv(dbg, block, op, dst_mode_l);
 
                        env->entries[idx]->low_word  = op;
 
                        if (mode_is_signed(imode)) {
-                               ir_node *op_conv = new_rd_Conv(dbg, irg, block, op, dst_mode_h);
-                               env->entries[idx]->high_word = new_rd_Shrs(dbg, irg, block, op_conv,
+                               ir_node *op_conv = new_rd_Conv(dbg, block, op, dst_mode_h);
+                               env->entries[idx]->high_word = new_rd_Shrs(dbg, block, op_conv,
                                        new_Const_long(dst_mode_l, get_mode_size_bits(dst_mode_h) - 1), dst_mode_h);
                        } else {
                                env->entries[idx]->high_word = new_Const(get_mode_null(dst_mode_h));
@@ -1520,12 +1496,12 @@ static void lower_Conv_to_Ls(ir_node *node, lower_env_t *env) {
                ir_type *mtp = get_conv_type(imode, omode, env);
 
                irn = get_intrinsic_address(mtp, get_irn_op(node), imode, omode, block, env);
-               call = new_rd_Call(dbg, irg, block, get_irg_no_mem(irg), irn, 1, &op, mtp);
+               call = new_rd_Call(dbg, block, get_irg_no_mem(irg), irn, 1, &op, mtp);
                set_irn_pinned(call, get_irn_pinned(node));
-               irn = new_r_Proj(irg, block, call, mode_T, pn_Call_T_result);
+               irn = new_r_Proj(block, call, mode_T, pn_Call_T_result);
 
-               env->entries[idx]->low_word  = new_r_Proj(irg, block, irn, dst_mode_l, 0);
-               env->entries[idx]->high_word = new_r_Proj(irg, block, irn, dst_mode_h, 1);
+               env->entries[idx]->low_word  = new_r_Proj(block, irn, dst_mode_l, 0);
+               env->entries[idx]->high_word = new_r_Proj(block, irn, dst_mode_h, 1);
        }  /* if */
 }  /* lower_Conv_to_Ls */
 
@@ -1553,17 +1529,17 @@ static void lower_Conv_to_Lu(ir_node *node, lower_env_t *env) {
                                pdeq_putr(env->waitq, node);
                                return;
                        }  /* if */
-                       env->entries[idx]->low_word  = new_rd_Conv(dbg, irg, block, env->entries[op_idx]->low_word, dst_mode);
-                       env->entries[idx]->high_word = new_rd_Conv(dbg, irg, block, env->entries[op_idx]->high_word, dst_mode);
+                       env->entries[idx]->low_word  = new_rd_Conv(dbg, block, env->entries[op_idx]->low_word, dst_mode);
+                       env->entries[idx]->high_word = new_rd_Conv(dbg, block, env->entries[op_idx]->high_word, dst_mode);
                } else {
                        /* simple case: create a high word */
                        if (imode != dst_mode)
-                               op = new_rd_Conv(dbg, irg, block, op, dst_mode);
+                               op = new_rd_Conv(dbg, block, op, dst_mode);
 
                        env->entries[idx]->low_word  = op;
 
                        if (mode_is_signed(imode)) {
-                               env->entries[idx]->high_word = new_rd_Shrs(dbg, irg, block, op,
+                               env->entries[idx]->high_word = new_rd_Shrs(dbg, block, op,
                                        new_Const_long(dst_mode, get_mode_size_bits(dst_mode) - 1), dst_mode);
                        } else {
                                env->entries[idx]->high_word = new_Const(get_mode_null(dst_mode));
@@ -1576,12 +1552,12 @@ static void lower_Conv_to_Lu(ir_node *node, lower_env_t *env) {
 
                /* do an intrinsic call */
                irn = get_intrinsic_address(mtp, get_irn_op(node), imode, omode, block, env);
-               call = new_rd_Call(dbg, irg, block, get_irg_no_mem(irg), irn, 1, &op, mtp);
+               call = new_rd_Call(dbg, block, get_irg_no_mem(irg), irn, 1, &op, mtp);
                set_irn_pinned(call, get_irn_pinned(node));
-               irn = new_r_Proj(irg, block, call, mode_T, pn_Call_T_result);
+               irn = new_r_Proj(block, call, mode_T, pn_Call_T_result);
 
-               env->entries[idx]->low_word  = new_r_Proj(irg, block, irn, dst_mode, 0);
-               env->entries[idx]->high_word = new_r_Proj(irg, block, irn, dst_mode, 1);
+               env->entries[idx]->low_word  = new_r_Proj(block, irn, dst_mode, 0);
+               env->entries[idx]->high_word = new_r_Proj(block, irn, dst_mode, 1);
        }  /* if */
 }  /* lower_Conv_to_Lu */
 
@@ -1609,7 +1585,7 @@ static void lower_Conv_from_Ls(ir_node *node, lower_env_t *env) {
 
                /* simple case: create a high word */
                if (omode != env->params->low_signed)
-                       op = new_rd_Conv(dbg, irg, block, op, omode);
+                       op = new_rd_Conv(dbg, block, op, omode);
 
                set_Conv_op(node, op);
        } else {
@@ -1621,11 +1597,11 @@ static void lower_Conv_from_Ls(ir_node *node, lower_env_t *env) {
                in[0] = env->entries[idx]->low_word;
                in[1] = env->entries[idx]->high_word;
 
-               call = new_rd_Call(dbg, irg, block, get_irg_no_mem(irg), irn, 2, in, mtp);
+               call = new_rd_Call(dbg, block, get_irg_no_mem(irg), irn, 2, in, mtp);
                set_irn_pinned(call, get_irn_pinned(node));
-               irn = new_r_Proj(irg, block, call, mode_T, pn_Call_T_result);
+               irn = new_r_Proj(block, call, mode_T, pn_Call_T_result);
 
-               exchange(node, new_r_Proj(irg, block, irn, omode, 0));
+               exchange(node, new_r_Proj(block, irn, omode, 0));
        }  /* if */
 }  /* lower_Conv_from_Ls */
 
@@ -1653,7 +1629,7 @@ static void lower_Conv_from_Lu(ir_node *node, lower_env_t *env) {
 
                /* simple case: create a high word */
                if (omode != env->params->low_unsigned)
-                       op = new_rd_Conv(dbg, irg, block, op, omode);
+                       op = new_rd_Conv(dbg, block, op, omode);
 
                set_Conv_op(node, op);
        } else {
@@ -1665,11 +1641,11 @@ static void lower_Conv_from_Lu(ir_node *node, lower_env_t *env) {
                in[0] = env->entries[idx]->low_word;
                in[1] = env->entries[idx]->high_word;
 
-               call = new_rd_Call(dbg, irg, block, get_irg_no_mem(irg), irn, 2, in, mtp);
+               call = new_rd_Call(dbg, block, get_irg_no_mem(irg), irn, 2, in, mtp);
                set_irn_pinned(call, get_irn_pinned(node));
-               irn = new_r_Proj(irg, block, call, mode_T, pn_Call_T_result);
+               irn = new_r_Proj(block, call, mode_T, pn_Call_T_result);
 
-               exchange(node, new_r_Proj(irg, block, irn, omode, 0));
+               exchange(node, new_r_Proj(block, irn, omode, 0));
        }  /* if */
 }  /* lower_Conv_from_Lu */
 
@@ -1892,7 +1868,7 @@ static void lower_Return(ir_node *node, ir_mode *mode, lower_env_t *env) {
  * Translate the parameters.
  */
 static void lower_Start(ir_node *node, ir_mode *mode, lower_env_t *env) {
-       ir_graph  *irg = current_ir_graph;
+       ir_graph  *irg = get_irn_irg(node);
        ir_entity *ent = get_irg_entity(irg);
        ir_type   *tp  = get_entity_type(ent);
        ir_type   *mtp;
@@ -1970,9 +1946,9 @@ static void lower_Start(ir_node *node, ir_mode *mode, lower_env_t *env) {
 
                        dbg = get_irn_dbg_info(proj);
                        env->entries[idx]->low_word  =
-                               new_rd_Proj(dbg, irg, get_nodes_block(proj), args, low_mode, new_projs[proj_nr]);
+                               new_rd_Proj(dbg, get_nodes_block(proj), args, low_mode, new_projs[proj_nr]);
                        env->entries[idx]->high_word =
-                               new_rd_Proj(dbg, irg, get_nodes_block(proj), args, mode, new_projs[proj_nr] + 1);
+                               new_rd_Proj(dbg, get_nodes_block(proj), args, mode, new_projs[proj_nr] + 1);
                }  /* if */
        }  /* for */
        set_optimize(rem);
@@ -2103,9 +2079,9 @@ static void lower_Call(ir_node *node, ir_mode *mode, lower_env_t *env) {
 
                                        dbg = get_irn_dbg_info(proj);
                                        env->entries[idx]->low_word  =
-                                               new_rd_Proj(dbg, irg, get_nodes_block(proj), results, low_mode, res_numbers[proj_nr]);
+                                               new_rd_Proj(dbg, get_nodes_block(proj), results, low_mode, res_numbers[proj_nr]);
                                        env->entries[idx]->high_word =
-                                               new_rd_Proj(dbg, irg, get_nodes_block(proj), results, mode, res_numbers[proj_nr] + 1);
+                                               new_rd_Proj(dbg, get_nodes_block(proj), results, mode, res_numbers[proj_nr] + 1);
                                }  /* if */
                                mark_irn_visited(proj);
                        }  /* if */
@@ -2119,7 +2095,7 @@ static void lower_Call(ir_node *node, ir_mode *mode, lower_env_t *env) {
  */
 static void lower_Unknown(ir_node *node, ir_mode *mode, lower_env_t *env) {
        int      idx = get_irn_idx(node);
-       ir_graph *irg = current_ir_graph;
+       ir_graph *irg = get_irn_irg(node);
        ir_mode  *low_mode = env->params->low_unsigned;
 
        env->entries[idx]->low_word  = new_r_Unknown(irg, low_mode);
@@ -2133,7 +2109,7 @@ static void lower_Unknown(ir_node *node, ir_mode *mode, lower_env_t *env) {
  */
 static void lower_Phi(ir_node *phi, ir_mode *mode, lower_env_t *env) {
        ir_mode  *mode_l = env->params->low_unsigned;
-       ir_graph *irg = current_ir_graph;
+       ir_graph *irg = get_irn_irg(phi);
        ir_node  *block, *unk_l, *unk_h, *phi_l, *phi_h;
        ir_node  **inl, **inh;
        dbg_info *dbg;
@@ -2186,8 +2162,8 @@ static void lower_Phi(ir_node *phi, ir_mode *mode, lower_env_t *env) {
 
        idx = get_irn_idx(phi);
        assert(idx < env->n_entries);
-       env->entries[idx]->low_word  = phi_l = new_rd_Phi(dbg, irg, block, arity, inl, mode_l);
-       env->entries[idx]->high_word = phi_h = new_rd_Phi(dbg, irg, block, arity, inh, mode);
+       env->entries[idx]->low_word  = phi_l = new_rd_Phi(dbg, block, arity, inl, mode_l);
+       env->entries[idx]->high_word = phi_h = new_rd_Phi(dbg, block, arity, inh, mode);
 
        /* Don't forget to link the new Phi nodes into the block.
         * Beware that some Phis might be optimized away. */
@@ -2206,7 +2182,6 @@ static void lower_Phi(ir_node *phi, ir_mode *mode, lower_env_t *env) {
  * Translate a Mux.
  */
 static void lower_Mux(ir_node *mux, ir_mode *mode, lower_env_t *env) {
-       ir_graph *irg = current_ir_graph;
        ir_node  *block, *val;
        ir_node  *true_l, *true_h, *false_l, *false_h, *sel;
        dbg_info *dbg;
@@ -2244,8 +2219,8 @@ static void lower_Mux(ir_node *mux, ir_mode *mode, lower_env_t *env) {
 
        idx = get_irn_idx(mux);
        assert(idx < env->n_entries);
-       env->entries[idx]->low_word  = new_rd_Mux(dbg, irg, block, sel, false_l, true_l, mode);
-       env->entries[idx]->high_word = new_rd_Mux(dbg, irg, block, sel, false_h, true_h, mode);
+       env->entries[idx]->low_word  = new_rd_Mux(dbg, block, sel, false_l, true_l, mode);
+       env->entries[idx]->high_word = new_rd_Mux(dbg, block, sel, false_h, true_h, mode);
 }  /* lower_Mux */
 
 /**
@@ -2326,7 +2301,6 @@ static ir_node *lower_boolean_Proj_Cmp(ir_node *proj, ir_node *cmp, lower_env_t
        ir_node  *l, *r, *low, *high, *t, *res;
        pn_Cmp   pnc;
        ir_node  *blk;
-       ir_graph *irg = current_ir_graph;
        dbg_info *db;
 
        l    = get_Cmp_left(cmp);
@@ -2346,29 +2320,29 @@ static ir_node *lower_boolean_Proj_Cmp(ir_node *proj, ir_node *cmp, lower_env_t
        pnc  = get_Proj_proj(proj);
        blk  = get_nodes_block(cmp);
        db   = get_irn_dbg_info(cmp);
-       low  = new_rd_Cmp(db, irg, blk, env->entries[lidx]->low_word, env->entries[ridx]->low_word);
-       high = new_rd_Cmp(db, irg, blk, env->entries[lidx]->high_word, env->entries[ridx]->high_word);
+       low  = new_rd_Cmp(db, blk, env->entries[lidx]->low_word, env->entries[ridx]->low_word);
+       high = new_rd_Cmp(db, blk, env->entries[lidx]->high_word, env->entries[ridx]->high_word);
 
        if (pnc == pn_Cmp_Eq) {
                /* simple case:a == b <==> a_h == b_h && a_l == b_l */
-               res = new_rd_And(db, irg, blk,
-                       new_r_Proj(irg, blk, low, mode_b, pnc),
-                       new_r_Proj(irg, blk, high, mode_b, pnc),
+               res = new_rd_And(db, blk,
+                       new_r_Proj(blk, low, mode_b, pnc),
+                       new_r_Proj(blk, high, mode_b, pnc),
                        mode_b);
        } else if (pnc == pn_Cmp_Lg) {
                /* simple case:a != b <==> a_h != b_h || a_l != b_l */
-               res = new_rd_Or(db, irg, blk,
-                       new_r_Proj(irg, blk, low, mode_b, pnc),
-                       new_r_Proj(irg, blk, high, mode_b, pnc),
+               res = new_rd_Or(db, blk,
+                       new_r_Proj(blk, low, mode_b, pnc),
+                       new_r_Proj(blk, high, mode_b, pnc),
                        mode_b);
        } else {
                /* a rel b <==> a_h REL b_h || (a_h == b_h && a_l rel b_l) */
-               t = new_rd_And(db, irg, blk,
-                       new_r_Proj(irg, blk, low, mode_b, pnc),
-                       new_r_Proj(irg, blk, high, mode_b, pn_Cmp_Eq),
+               t = new_rd_And(db, blk,
+                       new_r_Proj(blk, low, mode_b, pnc),
+                       new_r_Proj(blk, high, mode_b, pn_Cmp_Eq),
                        mode_b);
-               res = new_rd_Or(db, irg, blk,
-                       new_r_Proj(irg, blk, high, mode_b, pnc & ~pn_Cmp_Eq),
+               res = new_rd_Or(db, blk,
+                       new_r_Proj(blk, high, mode_b, pnc & ~pn_Cmp_Eq),
                        t,
                        mode_b);
        }  /* if */
index 1ea642c..4986c7c 100644 (file)
@@ -77,8 +77,8 @@ static void lower_sel(ir_node *sel) {
                sym.entity_p = ent;
                bl = get_nodes_block(sel);
 
-               cnst = new_rd_SymConst(dbg, irg, bl, mode, sym, symconst_addr_ent);
-               newn = new_rd_Add(dbg, irg, bl, ptr, cnst, mode);
+               cnst = new_rd_SymConst(dbg, irg, mode, sym, symconst_addr_ent);
+               newn = new_rd_Add(dbg, bl, ptr, cnst, mode);
        } else {
                /* not TLS */
 
@@ -141,12 +141,12 @@ static void lower_sel(ir_node *sel) {
 
                                        assert(irg == current_ir_graph);
                                        if (! is_Unknown(lb))
-                                               lb = new_rd_Conv(dbg, irg, bl, copy_const_value(get_irn_dbg_info(sel), lb), mode_Int);
+                                               lb = new_rd_Conv(dbg, bl, copy_const_value(get_irn_dbg_info(sel), lb), mode_Int);
                                        else
                                                lb = NULL;
 
                                        if (! is_Unknown(ub))
-                                               ub = new_rd_Conv(dbg, irg, bl, copy_const_value(get_irn_dbg_info(sel), ub), mode_Int);
+                                               ub = new_rd_Conv(dbg, bl, copy_const_value(get_irn_dbg_info(sel), ub), mode_Int);
                                        else
                                                ub = NULL;
 
@@ -159,35 +159,35 @@ static void lower_sel(ir_node *sel) {
                                                assert(ub != NULL && "upper bound has to be set in multi-dim array");
 
                                                /* Elements in one Dimension */
-                                               elms = new_rd_Sub(dbg, irg, bl, ub, lb, mode_Int);
+                                               elms = new_rd_Sub(dbg, bl, ub, lb, mode_Int);
                                        }
 
-                                       ind = new_rd_Conv(dbg, irg, bl, get_Sel_index(sel, dim), mode_Int);
+                                       ind = new_rd_Conv(dbg, bl, get_Sel_index(sel, dim), mode_Int);
 
                                        /*
                                         * Normalize index, id lower bound is set, also assume
                                         * lower bound == 0
                                         */
                                        if (lb != NULL)
-                                               ind = new_rd_Sub(dbg, irg, bl, ind, lb, mode_Int);
+                                               ind = new_rd_Sub(dbg, bl, ind, lb, mode_Int);
 
-                                       n = new_rd_Mul(dbg, irg, bl, ind, last_size, mode_Int);
+                                       n = new_rd_Mul(dbg, bl, ind, last_size, mode_Int);
 
                                        /*
                                         * see comment above.
                                         */
                                        if (i > 0)
-                                               last_size = new_rd_Mul(dbg, irg, bl, last_size, elms, mode_Int);
+                                               last_size = new_rd_Mul(dbg, bl, last_size, elms, mode_Int);
 
-                                       newn = new_rd_Add(dbg, irg, bl, newn, n, mode);
+                                       newn = new_rd_Add(dbg, bl, newn, n, mode);
                                }
                        } else {
                                /* no array type */
                                ir_mode *idx_mode = get_irn_mode(index);
                                tarval *tv = new_tarval_from_long(get_mode_size_bytes(basemode), idx_mode);
 
-                               newn = new_rd_Add(dbg, irg, bl, get_Sel_ptr(sel),
-                                       new_rd_Mul(dbg, irg, bl, index,
+                               newn = new_rd_Add(dbg, bl, get_Sel_ptr(sel),
+                                       new_rd_Mul(dbg, bl, index,
                                        new_r_Const(irg, tv),
                                        idx_mode),
                                        mode);
@@ -202,15 +202,15 @@ static void lower_sel(ir_node *sel) {
                        /* We need an additional load when accessing methods from a dispatch table. */
                        tv   = new_tarval_from_long(get_entity_offset(ent), mode_Int);
                        cnst = new_rd_Const(dbg, irg, tv);
-                       add  = new_rd_Add(dbg, irg, bl, get_Sel_ptr(sel), cnst, mode);
+                       add  = new_rd_Add(dbg, bl, get_Sel_ptr(sel), cnst, mode);
 #ifdef DO_CACHEOPT  /* cacheopt version */
-                       newn = new_rd_Load(dbg, irg, bl, get_Sel_mem(sel), sel, ent_mode, 0);
+                       newn = new_rd_Load(dbg, bl, get_Sel_mem(sel), sel, ent_mode, 0);
                        cacheopt_map_addrs_register_node(newn);
                        set_Load_ptr(newn, add);
 #else /* normal code */
-                       newn = new_rd_Load(dbg, irg, bl, get_Sel_mem(sel), add, ent_mode, 0);
+                       newn = new_rd_Load(dbg, bl, get_Sel_mem(sel), add, ent_mode, 0);
 #endif
-                       newn = new_r_Proj(irg, bl, newn, ent_mode, pn_Load_res);
+                       newn = new_r_Proj(bl, newn, ent_mode, pn_Load_res);
 
                } else if (get_entity_owner(ent) != get_glob_type()) {
                        int offset;
@@ -225,11 +225,11 @@ static void lower_sel(ir_node *sel) {
 
                                tv = new_tarval_from_long(offset, mode_UInt);
                                cnst = new_r_Const(irg, tv);
-                               newn = new_rd_Add(dbg, irg, bl, newn, cnst, mode);
+                               newn = new_rd_Add(dbg, bl, newn, cnst, mode);
                        }
                } else {
                        /* global_type */
-                       newn = new_rd_SymConst_addr_ent(NULL, current_ir_graph, mode, ent, firm_unknown_type);
+                       newn = new_rd_SymConst_addr_ent(NULL, irg, mode, ent, firm_unknown_type);
                }
        }
        /* run the hooks */
@@ -373,7 +373,7 @@ static void lower_bitfields_loads(ir_node *proj, ir_node *load) {
        /* abandon bitfield sel */
        ptr = get_Sel_ptr(sel);
        db  = get_irn_dbg_info(sel);
-       ptr = new_rd_Add(db, current_ir_graph, block, ptr, new_Const_long(mode_Is, offset), get_irn_mode(ptr));
+       ptr = new_rd_Add(db, block, ptr, new_Const_long(mode_Is, offset), get_irn_mode(ptr));
 
        set_Load_ptr(load, ptr);
        set_Load_mode(load, mode);
@@ -382,7 +382,7 @@ static void lower_bitfields_loads(ir_node *proj, ir_node *load) {
        /* create new proj, switch off CSE or we may get the old one back */
        old_cse = get_opt_cse();
        set_opt_cse(0);
-       res = n_proj = new_r_Proj(current_ir_graph, block, load, mode, pn_Load_res);
+       res = n_proj = new_r_Proj(block, load, mode, pn_Load_res);
        set_opt_cse(old_cse);
 
        if (mode_is_signed(mode)) { /* signed */
@@ -390,24 +390,20 @@ static void lower_bitfields_loads(ir_node *proj, ir_node *load) {
                int shift_count_down  = bits - bf_bits;
 
                if (shift_count_up) {
-                       res = new_r_Shl(current_ir_graph, block, res,
-                               new_Const_long(mode_Iu, shift_count_up), mode);
+                       res = new_r_Shl(block, res,     new_Const_long(mode_Iu, shift_count_up), mode);
                }
                if (shift_count_down) {
-                       res = new_r_Shrs(current_ir_graph, block, res,
-                               new_Const_long(mode_Iu, shift_count_down), mode);
+                       res = new_r_Shrs(block, res, new_Const_long(mode_Iu, shift_count_down), mode);
                }
        } else { /* unsigned */
                int shift_count_down  = bit_offset;
                unsigned mask = ((unsigned)-1) >> (bits - bf_bits);
 
                if (shift_count_down) {
-                       res = new_r_Shr(current_ir_graph, block, res,
-                               new_Const_long(mode_Iu, shift_count_down), mode);
+                       res = new_r_Shr(block, res,     new_Const_long(mode_Iu, shift_count_down), mode);
                }
                if (bits != bf_bits) {
-                       res = new_r_And(current_ir_graph, block, res,
-                               new_Const_long(mode, mask), mode);
+                       res = new_r_And(block, res, new_Const_long(mode, mask), mode);
                }
        }
 
@@ -471,26 +467,23 @@ static void lower_bitfields_stores(ir_node *store) {
        /* abandon bitfield sel */
        ptr = get_Sel_ptr(sel);
        db  = get_irn_dbg_info(sel);
-       ptr = new_rd_Add(db, current_ir_graph, block, ptr, new_Const_long(mode_Is, offset), get_irn_mode(ptr));
+       ptr = new_rd_Add(db, block, ptr, new_Const_long(mode_Is, offset), get_irn_mode(ptr));
 
        if (neg_mask) {
                /* there are some bits, normal case */
-               irn  = new_r_Load(current_ir_graph, block, mem, ptr, mode, 0);
-               mem  = new_r_Proj(current_ir_graph, block, irn, mode_M, pn_Load_M);
-               irn  = new_r_Proj(current_ir_graph, block, irn, mode, pn_Load_res);
+               irn  = new_r_Load( block, mem, ptr, mode, 0);
+               mem  = new_r_Proj( block, irn, mode_M, pn_Load_M);
+               irn  = new_r_Proj( block, irn, mode, pn_Load_res);
 
-               irn = new_r_And(current_ir_graph, block, irn,
-                       new_Const_long(mode, neg_mask), mode);
+               irn = new_r_And(block, irn, new_Const_long(mode, neg_mask), mode);
 
                if (bit_offset > 0) {
-                       value = new_r_Shl(current_ir_graph, block, value,
-                               new_Const_long(mode_Iu, bit_offset), mode);
+                       value = new_r_Shl(block, value, new_Const_long(mode_Iu, bit_offset), mode);
                }
 
-               value = new_r_And(current_ir_graph, block, value,
-                       new_Const_long(mode, mask), mode);
+               value = new_r_And(block, value, new_Const_long(mode, mask), mode);
 
-               value = new_r_Or(current_ir_graph, block, value, irn, mode);
+               value = new_r_Or(block, value, irn, mode);
        }
 
        set_Store_mem(store, mem);
index a485cd7..aa44a8b 100644 (file)
@@ -175,11 +175,11 @@ static void replace_call(ir_node *irn, ir_node *call, ir_node *mem, ir_node *reg
                /* Beware: do we need here a protection against CSE? Better we do it. */
                int old_cse = get_opt_cse();
                set_opt_cse(0);
-               reg_jmp = new_r_Jmp(current_ir_graph, block);
+               reg_jmp = new_r_Jmp(block);
                set_opt_cse(old_cse);
                exc_jmp = new_Bad();
        }
-       irn = new_r_Tuple(current_ir_graph, block, 1, &irn);
+       irn = new_r_Tuple(block, 1, &irn);
 
        turn_into_tuple(call, pn_Call_max);
        set_Tuple_pred(call, pn_Call_M_regular, mem);
@@ -199,7 +199,7 @@ int i_mapper_abs(ir_node *call, void *ctx) {
        dbg_info *dbg  = get_irn_dbg_info(call);
        (void) ctx;
 
-       irn = new_rd_Abs(dbg, current_ir_graph, block, op, get_irn_mode(op));
+       irn = new_rd_Abs(dbg, block, op, get_irn_mode(op));
        DBG_OPT_ALGSIM0(call, irn, FS_OPT_RTS_ABS);
        replace_call(irn, call, mem, NULL, NULL);
        return 1;
@@ -215,10 +215,10 @@ int i_mapper_bswap(ir_node *call, void *ctx) {
        ir_node *irn;
        (void) ctx;
 
-       irn = new_rd_Builtin(dbg, current_ir_graph, block, get_irg_no_mem(current_ir_graph), 1, &op, ir_bk_bswap, tp);
+       irn = new_rd_Builtin(dbg, block, get_irg_no_mem(current_ir_graph), 1, &op, ir_bk_bswap, tp);
        set_irn_pinned(irn, op_pin_state_floats);
        DBG_OPT_ALGSIM0(call, irn, FS_OPT_RTS_ABS);
-       irn = new_r_Proj(current_ir_graph, block, irn, get_irn_mode(op), pn_Builtin_1_result);
+       irn = new_r_Proj(block, irn, get_irn_mode(op), pn_Builtin_1_result);
        replace_call(irn, call, mem, NULL, NULL);
        return 1;
 }  /* i_mapper_bswap */
@@ -238,14 +238,14 @@ int i_mapper_alloca(ir_node *call, void *ctx) {
                if (mode == NULL) {
                        panic("Cannot find unsigned mode for %M", mode);
                }
-               op = new_rd_Conv(dbg, current_ir_graph, block, op, mode);
+               op = new_rd_Conv(dbg, block, op, mode);
        }
 
-       irn    = new_rd_Alloc(dbg, current_ir_graph, block, mem, op, firm_unknown_type, stack_alloc);
-       mem    = new_rd_Proj(dbg, current_ir_graph, block, irn, mode_M, pn_Alloc_M);
-       no_exc = new_rd_Proj(dbg, current_ir_graph, block, irn, mode_X, pn_Alloc_X_regular);
-       exc    = new_rd_Proj(dbg, current_ir_graph, block, irn, mode_X, pn_Alloc_X_except);
-       irn    = new_rd_Proj(dbg, current_ir_graph, block, irn, get_modeP_data(), pn_Alloc_res);
+       irn    = new_rd_Alloc(dbg, block, mem, op, firm_unknown_type, stack_alloc);
+       mem    = new_rd_Proj(dbg, block, irn, mode_M, pn_Alloc_M);
+       no_exc = new_rd_Proj(dbg, block, irn, mode_X, pn_Alloc_X_regular);
+       exc    = new_rd_Proj(dbg, block, irn, mode_X, pn_Alloc_X_except);
+       irn    = new_rd_Proj(dbg, block, irn, get_modeP_data(), pn_Alloc_res);
 
        DBG_OPT_ALGSIM0(call, irn, FS_OPT_RTS_ALLOCA);
        replace_call(irn, call, mem, no_exc, exc);
@@ -335,11 +335,11 @@ int i_mapper_pow(ir_node *call, void *ctx) {
                ir_node *quot;
 
                irn  = new_Const(get_mode_one(mode));
-               quot = new_rd_Quot(dbg, current_ir_graph, block, mem, irn, left, mode, op_pin_state_pinned);
-               mem  = new_r_Proj(current_ir_graph, block, quot, mode_M, pn_Quot_M);
-               irn  = new_r_Proj(current_ir_graph, block, quot, mode, pn_Quot_res);
-               reg_jmp = new_r_Proj(current_ir_graph, block, quot, mode_X, pn_Quot_X_regular);
-               exc_jmp = new_r_Proj(current_ir_graph, block, quot, mode_X, pn_Quot_X_except);
+               quot = new_rd_Quot(dbg, block, mem, irn, left, mode, op_pin_state_pinned);
+               mem  = new_r_Proj(block, quot, mode_M, pn_Quot_M);
+               irn  = new_r_Proj(block, quot, mode, pn_Quot_res);
+               reg_jmp = new_r_Proj(block, quot, mode_X, pn_Quot_X_regular);
+               exc_jmp = new_r_Proj(block, quot, mode_X, pn_Quot_X_except);
        }
        DBG_OPT_ALGSIM0(call, irn, FS_OPT_RTS_POW);
        replace_call(irn, call, mem, reg_jmp, exc_jmp);
@@ -417,7 +417,7 @@ static int i_mapper_symmetric_zero_to_one(ir_node *call, void *ctx, int reason)
                        dbg_info *dbg  = get_irn_dbg_info(val);
 
                        op = get_Minus_op(op);
-                       val = new_rd_Conv(dbg, current_ir_graph, block, op, mode);
+                       val = new_rd_Conv(dbg, block, op, mode);
                        if (is_Conv(val)) {
                                /* still a Conv ? */
                                set_Conv_strict(val, 1);
@@ -770,19 +770,19 @@ replace_by_call:
                        mode  = get_type_mode(char_tp);
 
                        /* replace the strcmp by (*x) */
-                       irn = new_rd_Load(dbg, current_ir_graph, block, mem, v, mode, 0);
-                       mem = new_r_Proj(current_ir_graph, block, irn, mode_M, pn_Load_M);
-                       exc = new_r_Proj(current_ir_graph, block, irn, mode_X, pn_Load_X_except);
-                       reg = new_r_Proj(current_ir_graph, block, irn, mode_X, pn_Load_X_regular);
-                       irn = new_r_Proj(current_ir_graph, block, irn, mode, pn_Load_res);
+                       irn = new_rd_Load(dbg, block, mem, v, mode, 0);
+                       mem = new_r_Proj(block, irn, mode_M, pn_Load_M);
+                       exc = new_r_Proj(block, irn, mode_X, pn_Load_X_except);
+                       reg = new_r_Proj(block, irn, mode_X, pn_Load_X_regular);
+                       irn = new_r_Proj(block, irn, mode, pn_Load_res);
 
                        /* conv to the result mode */
                        mode = get_type_mode(res_tp);
-                       irn  = new_rd_Conv(dbg, current_ir_graph, block, irn, mode);
+                       irn  = new_rd_Conv(dbg, block, irn, mode);
 
                        if (v == right) {
                                /* negate in the ("", s) case */
-                               irn = new_rd_Minus(dbg, current_ir_graph, block, irn, mode);
+                               irn = new_rd_Minus(dbg, block, irn, mode);
                        }
                }
        }
@@ -874,7 +874,7 @@ int i_mapper_mempcpy(ir_node *call, void *ctx) {
                ir_node *mem  = get_Call_mem(call);
                ir_node *blk  = get_nodes_block(call);
                ir_mode *mode = get_irn_mode(dst);
-               ir_node *res  = new_rd_Add(dbg, get_irn_irg(blk), blk, dst, len, mode);
+               ir_node *res  = new_rd_Add(dbg, blk, dst, len, mode);
 
                DBG_OPT_ALGSIM0(call, res, FS_OPT_RTS_MEMPCPY);
                replace_call(res, call, mem, NULL, NULL);
@@ -1040,12 +1040,12 @@ int i_mapper_RuntimeCall(ir_node *node, runtime_rt *rt) {
 
        /* step 1: create the call */
        sym.entity_p = rt->ent;
-       addr = new_r_SymConst(irg, bl, mode_P_code, sym, symconst_addr_ent);
-       call = new_rd_Call(get_irn_dbg_info(node), irg, bl, mem, addr, n_param, in, mtp);
+       addr = new_r_SymConst(irg, mode_P_code, sym, symconst_addr_ent);
+       call = new_rd_Call(get_irn_dbg_info(node), bl, mem, addr, n_param, in, mtp);
        set_irn_pinned(call, get_irn_pinned(node));
 
        if (n_res > 0)
-               res_proj = new_r_Proj(irg, bl, call, mode_T, pn_Call_T_result);
+               res_proj = new_r_Proj(bl, call, mode_T, pn_Call_T_result);
        else
                res_proj = NULL;
 
@@ -1058,29 +1058,29 @@ int i_mapper_RuntimeCall(ir_node *node, runtime_rt *rt) {
                for (i = 0; i < n_proj; ++i)
                        set_Tuple_pred(node, i, new_r_Bad(irg));
                if (rt->mem_proj_nr >= 0)
-                       set_Tuple_pred(node, rt->mem_proj_nr, new_r_Proj(irg, bl, call, mode_M, pn_Call_M_regular));
+                       set_Tuple_pred(node, rt->mem_proj_nr, new_r_Proj(bl, call, mode_M, pn_Call_M_regular));
                if (!is_NoMem(mem)) {
                        /* Exceptions can only be handled with real memory */
                        if (rt->regular_proj_nr >= 0)
-                               set_Tuple_pred(node, rt->regular_proj_nr, new_r_Proj(irg, bl, call, mode_X, pn_Call_X_regular));
+                               set_Tuple_pred(node, rt->regular_proj_nr, new_r_Proj(bl, call, mode_X, pn_Call_X_regular));
                        if (rt->exc_proj_nr >= 0)
-                               set_Tuple_pred(node, rt->exc_proj_nr, new_r_Proj(irg, bl, call, mode_X, pn_Call_X_except));
+                               set_Tuple_pred(node, rt->exc_proj_nr, new_r_Proj(bl, call, mode_X, pn_Call_X_except));
                        if (rt->exc_mem_proj_nr >= 0)
-                               set_Tuple_pred(node, rt->mem_proj_nr, new_r_Proj(irg, bl, call, mode_M, pn_Call_M_except));
+                               set_Tuple_pred(node, rt->mem_proj_nr, new_r_Proj(bl, call, mode_M, pn_Call_M_except));
                }
 
                if (rt->res_proj_nr >= 0)
                        for (i = 0; i < n_res; ++i)
                                set_Tuple_pred(node, rt->res_proj_nr + i,
-                               new_r_Proj(irg, bl, res_proj, get_type_mode(get_method_res_type(mtp, i)), i));
+                               new_r_Proj(bl, res_proj, get_type_mode(get_method_res_type(mtp, i)), i));
                        return 1;
        } else {
                /* only one return value supported */
                if (n_res > 0) {
                        ir_mode *mode = get_type_mode(get_method_res_type(mtp, 0));
 
-                       res_proj = new_r_Proj(irg, bl, call, mode_T, pn_Call_T_result);
-                       res_proj = new_r_Proj(irg, bl, res_proj, mode, 0);
+                       res_proj = new_r_Proj(bl, call, mode_T, pn_Call_T_result);
+                       res_proj = new_r_Proj(bl, res_proj, mode, 0);
 
                        exchange(node, res_proj);
                        return 1;
index a6c0f75..d248a87 100644 (file)
@@ -73,20 +73,18 @@ static void maybe_kill_node(ir_node *node)
 
 static ir_node *create_not(dbg_info *dbgi, ir_node *node)
 {
-       ir_graph *irg    = current_ir_graph;
        ir_node  *block  = get_nodes_block(node);
        ir_mode  *mode   = config.lowered_mode;
        tarval   *tv_one = get_tarval_one(mode);
        ir_node  *one    = new_d_Const(dbgi, tv_one);
 
-       return new_rd_Eor(dbgi, irg, block, node, one, mode);
+       return new_rd_Eor(dbgi, block, node, one, mode);
 }
 
 static ir_node *create_convb(ir_node *node)
 {
-       ir_graph *irg   = current_ir_graph;
        ir_node  *block = get_nodes_block(node);
-       ir_node  *conv  = new_rd_Conv(NULL, irg, block, node, mode_b);
+       ir_node  *conv  = new_rd_Conv(NULL, block, node, mode_b);
 
        return conv;
 }
@@ -105,7 +103,6 @@ static ir_type *create_lowered_type(void)
  */
 static ir_node *create_set(ir_node *node)
 {
-       ir_graph *irg     = current_ir_graph;
        dbg_info *dbgi    = get_irn_dbg_info(node);
        ir_mode  *mode    = config.lowered_set_mode;
        tarval   *tv_one  = get_tarval_one(mode);
@@ -114,10 +111,10 @@ static ir_node *create_set(ir_node *node)
        tarval   *tv_zero = get_tarval_null(mode);
        ir_node  *zero    = new_d_Const(dbgi, tv_zero);
 
-       ir_node *set      = new_rd_Mux(dbgi, irg, block, node, zero, one, mode);
+       ir_node *set      = new_rd_Mux(dbgi, block, node, zero, one, mode);
 
        if (mode != config.lowered_mode) {
-               set = new_r_Conv(irg, block, set, config.lowered_mode);
+               set = new_r_Conv(block, set, config.lowered_mode);
        }
 
        return set;
@@ -148,7 +145,6 @@ static void adjust_method_type(ir_type *method_type)
 
 static ir_node *lower_node(ir_node *node)
 {
-       ir_graph *irg   = current_ir_graph;
        dbg_info *dbgi  = get_irn_dbg_info(node);
        ir_node  *block = get_nodes_block(node);
        ir_mode *mode   = config.lowered_mode;
@@ -173,7 +169,7 @@ static ir_node *lower_node(ir_node *node)
                for(i = 0; i < arity; ++i) {
                        in[i] = unknown;
                }
-               new_phi = new_r_Phi(irg, block, arity, in, config.lowered_mode);
+               new_phi = new_r_Phi(block, arity, in, config.lowered_mode);
                set_irn_link(node, new_phi);
                pdeq_putr(lowered_nodes, node);
 
@@ -223,10 +219,10 @@ static ir_node *lower_node(ir_node *node)
                ir_node *v_false     = get_Mux_false(node);
                ir_node *low_v_false = lower_node(v_false);
 
-               ir_node *and0     = new_rd_And(dbgi, irg, block, low_cond, low_v_true, mode);
+               ir_node *and0     = new_rd_And(dbgi, block, low_cond, low_v_true, mode);
                ir_node *not_cond = create_not(dbgi, low_cond);
-               ir_node *and1     = new_rd_And(dbgi, irg, block, not_cond, low_v_false, mode);
-               ir_node *or       = new_rd_Or(dbgi, irg, block, and0, and1, mode);
+               ir_node *and1     = new_rd_And(dbgi, block, not_cond, low_v_false, mode);
+               ir_node *or       = new_rd_Or(dbgi, block, and0, and1, mode);
 
                set_irn_link(node, or);
                pdeq_putr(lowered_nodes, node);
@@ -239,9 +235,8 @@ static ir_node *lower_node(ir_node *node)
                ir_node *zero_cmp = new_d_Const(dbgi, tv_zeroc);
                ir_node *set;
 
-               ir_node *cmp      = new_rd_Cmp(dbgi, irg, block, pred, zero_cmp);
-               ir_node *proj     = new_rd_Proj(dbgi, irg, block, cmp, mode_b,
-                                               pn_Cmp_Lg);
+               ir_node *cmp      = new_rd_Cmp(dbgi, block, pred, zero_cmp);
+               ir_node *proj     = new_rd_Proj(dbgi, block, cmp, mode_b, pn_Cmp_Lg);
                set = create_set(proj);
 
                set_irn_link(node, set);
@@ -292,15 +287,15 @@ static ir_node *lower_node(ir_node *node)
                                        ir_node *shift_cnt = new_d_Const(dbgi, tv);
 
                                        if(cmp_mode != mode) {
-                                               a = new_rd_Conv(dbgi, irg, block, a, mode);
-                                               b = new_rd_Conv(dbgi, irg, block, b, mode);
+                                               a = new_rd_Conv(dbgi, block, a, mode);
+                                               b = new_rd_Conv(dbgi, block, b, mode);
                                        }
 
-                                       res = new_rd_Sub(dbgi, irg, block, a, b, mode);
+                                       res = new_rd_Sub(dbgi, block, a, b, mode);
                                        if(need_not) {
-                                               res = new_rd_Not(dbgi, irg, block, res, mode);
+                                               res = new_rd_Not(dbgi, block, res, mode);
                                        }
-                                       res = new_rd_Shr(dbgi, irg, block, res, shift_cnt, mode);
+                                       res = new_rd_Shr(dbgi, block, res, shift_cnt, mode);
 
                                        set_irn_link(node, res);
                                        pdeq_putr(lowered_nodes, node);
@@ -319,7 +314,7 @@ static ir_node *lower_node(ir_node *node)
                        set_irn_mode(node, mode);
                        return node;
                } else if(is_Proj(pred) && is_Start(get_Proj_pred(pred))) {
-                       ir_entity *entity = get_irg_entity(irg);
+                       ir_entity *entity = get_irg_entity(current_ir_graph);
                        ir_type   *type   = get_entity_type(entity);
                        adjust_method_type(type);
                        set_irn_mode(node, mode);
index 08168a8..1de20a5 100644 (file)
@@ -130,16 +130,14 @@ static ir_node *bool_and(cond_pair* const cpair)
        } else if (tarval_is_one(tarval_sub(tv_hi, tv_lo, NULL))) { /* lo + 1 == hi */
                if (pnc_lo == pn_Cmp_Ge && pnc_hi == pn_Cmp_Lt) {
                        /* x >= c || x < c + 1 -> x == c */
-                       ir_graph *const irg   = current_ir_graph;
                        ir_node  *const block = get_nodes_block(cmp_lo);
-                       ir_node  *const p = new_r_Proj(irg, block, cmp_lo, mode_b, pn_Cmp_Eq);
+                       ir_node  *const p = new_r_Proj(block, cmp_lo, mode_b, pn_Cmp_Eq);
                        return p;
                } else if (pnc_lo == pn_Cmp_Gt) {
                        if (pnc_hi == pn_Cmp_Lg) {
                                /* x > c || x != c + 1 -> x > c + 1 */
-                               ir_graph *const irg   = current_ir_graph;
                                ir_node  *const block = get_nodes_block(cmp_hi);
-                               ir_node  *const p = new_r_Proj(irg, block, cmp_hi, mode_b, pn_Cmp_Gt);
+                               ir_node  *const p = new_r_Proj(block, cmp_hi, mode_b, pn_Cmp_Gt);
                                return p;
                        } else if (pnc_hi == pn_Cmp_Lt) {
                                /* x > c || x < c + 1 -> false */
@@ -147,16 +145,14 @@ static ir_node *bool_and(cond_pair* const cpair)
                                return t;
                        } else if (pnc_hi == pn_Cmp_Le) {
                                /* x > c || x <= c + 1 -> x != c + 1 */
-                               ir_graph *const irg   = current_ir_graph;
                                ir_node  *const block = get_nodes_block(cmp_hi);
-                               ir_node  *const p = new_r_Proj(irg, block, cmp_hi, mode_b, pn_Cmp_Eq);
+                               ir_node  *const p = new_r_Proj(block, cmp_hi, mode_b, pn_Cmp_Eq);
                                return p;
                        }
                } else if (pnc_lo == pn_Cmp_Lg && pnc_hi == pn_Cmp_Lt) {
                        /* x != c || c < c + 1 -> x < c */
-                       ir_graph *const irg   = current_ir_graph;
                        ir_node  *const block = get_nodes_block(cmp_lo);
-                       ir_node  *const p     = new_r_Proj(irg, block, cmp_lo, mode_b, pn_Cmp_Lt);
+                       ir_node  *const p     = new_r_Proj(block, cmp_lo, mode_b, pn_Cmp_Lt);
                        return p;
                }
        }
@@ -191,16 +187,14 @@ static ir_node *bool_or(cond_pair *const cpair)
        } else if (tarval_is_one(tarval_sub(tv_hi, tv_lo, NULL))) { /* lo + 1 == hi */
                if (pnc_lo == pn_Cmp_Lt && pnc_hi == pn_Cmp_Ge) {
                        /* x < c || x >= c + 1 -> x != c */
-                       ir_graph *const irg   = current_ir_graph;
                        ir_node  *const block = get_nodes_block(cmp_lo);
-                       ir_node  *const p = new_r_Proj(irg, block, cmp_lo, mode_b, pn_Cmp_Lg);
+                       ir_node  *const p = new_r_Proj(block, cmp_lo, mode_b, pn_Cmp_Lg);
                        return p;
                } else if (pnc_lo == pn_Cmp_Le) {
                        if (pnc_hi == pn_Cmp_Eq) {
                                /* x <= c || x == c + 1 -> x <= c + 1 */
-                               ir_graph *const irg   = current_ir_graph;
                                ir_node  *const block = get_nodes_block(cmp_hi);
-                               ir_node  *const p = new_r_Proj(irg, block, cmp_hi, mode_b, pn_Cmp_Le);
+                               ir_node  *const p = new_r_Proj(block, cmp_hi, mode_b, pn_Cmp_Le);
                                return p;
                        } else if (pnc_hi == pn_Cmp_Ge) {
                                /* x <= c || x >= c + 1 -> true */
@@ -208,16 +202,14 @@ static ir_node *bool_or(cond_pair *const cpair)
                                return t;
                        } else if (pnc_hi == pn_Cmp_Gt) {
                                /* x <= c || x > c + 1 -> x != c + 1 */
-                               ir_graph *const irg   = current_ir_graph;
                                ir_node  *const block = get_nodes_block(cmp_hi);
-                               ir_node  *const p = new_r_Proj(irg, block, cmp_hi, mode_b, pn_Cmp_Lg);
+                               ir_node  *const p = new_r_Proj(block, cmp_hi, mode_b, pn_Cmp_Lg);
                                return p;
                        }
                } else if (pnc_lo == pn_Cmp_Eq && pnc_hi == pn_Cmp_Ge) {
                        /* x == c || x >= c + 1 -> x >= c */
-                       ir_graph *const irg   = current_ir_graph;
                        ir_node  *const block = get_nodes_block(cmp_lo);
-                       ir_node  *const p     = new_r_Proj(irg, block, cmp_lo, mode_b, pn_Cmp_Ge);
+                       ir_node  *const p     = new_r_Proj(block, cmp_lo, mode_b, pn_Cmp_Ge);
                        return p;
                }
        }
@@ -370,7 +362,6 @@ restart:
                        ir_node   *upper_cond;
                        ir_node   *upper_cond_selector;
                        ir_node   *replacement;
-                       ir_graph  *irg;
                        cond_pair  cpair;
 
                        upper_cf    = get_Block_cfgpred(block, i2);
@@ -395,18 +386,17 @@ restart:
 
                        /* normalize pncs: we need the true case to jump into the
                         * common block (ie. conjunctive normal form) */
-                       irg = current_ir_graph;
                        if(get_Proj_proj(lower_cf) == pn_Cond_false) {
                                if(cpair.proj_lo == cond_selector) {
                                        ir_mode *mode = get_tarval_mode(cpair.tv_lo);
                                        cpair.pnc_lo  = get_negated_pnc(cpair.pnc_lo, mode);
-                                       cpair.proj_lo = new_r_Proj(irg, lower_block,
+                                       cpair.proj_lo = new_r_Proj(lower_block,
                                                        get_Proj_pred(cpair.proj_lo), mode_b, cpair.pnc_lo);
                                } else {
                                        ir_mode *mode = get_tarval_mode(cpair.tv_hi);
                                        assert(cpair.proj_hi == cond_selector);
                                        cpair.pnc_hi  = get_negated_pnc(cpair.pnc_hi, mode);
-                                       cpair.proj_hi = new_r_Proj(irg, lower_block,
+                                       cpair.proj_hi = new_r_Proj(lower_block,
                                                        get_Proj_pred(cpair.proj_hi), mode_b, cpair.pnc_hi);
                                }
                        }
@@ -414,13 +404,13 @@ restart:
                                if(cpair.proj_lo == upper_cond_selector) {
                                        ir_mode *mode = get_tarval_mode(cpair.tv_lo);
                                        cpair.pnc_lo  = get_negated_pnc(cpair.pnc_lo, mode);
-                                       cpair.proj_lo = new_r_Proj(irg, upper_block,
+                                       cpair.proj_lo = new_r_Proj(upper_block,
                                                        get_Proj_pred(cpair.proj_lo), mode_b, cpair.pnc_lo);
                                } else {
                                        ir_mode *mode = get_tarval_mode(cpair.tv_hi);
                                        assert(cpair.proj_hi == upper_cond_selector);
                                        cpair.pnc_hi  = get_negated_pnc(cpair.pnc_hi, mode);
-                                       cpair.proj_hi = new_r_Proj(irg, upper_block,
+                                       cpair.proj_hi = new_r_Proj(upper_block,
                                                        get_Proj_pred(cpair.proj_hi), mode_b, cpair.pnc_hi);
                                }
                        }
@@ -438,8 +428,7 @@ restart:
                        /* the optimisations expected the true case to jump */
                        if(get_Proj_proj(lower_cf) == pn_Cond_false) {
                                ir_node *block = get_nodes_block(replacement);
-                               replacement    = new_rd_Not(NULL, current_ir_graph, block,
-                                                           replacement, mode_b);
+                               replacement    = new_rd_Not(NULL, block, replacement, mode_b);
                        }
                        set_Cond_selector(cond, replacement);
 
index aaa043e..5cddcae 100644 (file)
@@ -102,7 +102,7 @@ static int remove_senseless_conds(ir_node *bl) {
                                ir_node *cond_j = skip_Proj(pred_j);
 
                                if (cond_j == cond_i) {
-                                       ir_node *jmp = new_r_Jmp(current_ir_graph, get_nodes_block(cond_i));
+                                       ir_node *jmp = new_r_Jmp(get_nodes_block(cond_i));
                                        set_irn_n(bl, i, jmp);
                                        set_irn_n(bl, j, new_Bad());
 
@@ -627,7 +627,7 @@ static int handle_switch_cond(ir_node *cond) {
                /* this Cond has only one Proj: must be the defProj */
                assert(get_Cond_default_proj(cond) == get_Proj_proj(proj1));
                /* convert it into a Jmp */
-               jmp = new_r_Jmp(current_ir_graph, blk);
+               jmp = new_r_Jmp(blk);
                exchange(proj1, jmp);
                return 1;
        } else if (get_irn_link(proj2) == NULL) {
@@ -643,7 +643,7 @@ static int handle_switch_cond(ir_node *cond) {
                        if (def_num == get_Proj_proj(proj1)) {
                                /* first one is the defProj */
                                if (num == get_Proj_proj(proj2)) {
-                                       jmp = new_r_Jmp(current_ir_graph, blk);
+                                       jmp = new_r_Jmp(blk);
                                        exchange(proj2, jmp);
                                        exchange(proj1, new_Bad());
                                        return 1;
@@ -651,7 +651,7 @@ static int handle_switch_cond(ir_node *cond) {
                        } else if (def_num == get_Proj_proj(proj2)) {
                                /* second one is the defProj */
                                if (num == get_Proj_proj(proj1)) {
-                                       jmp = new_r_Jmp(current_ir_graph, blk);
+                                       jmp = new_r_Jmp(blk);
                                        exchange(proj1, jmp);
                                        exchange(proj2, new_Bad());
                                        return 1;
@@ -659,12 +659,12 @@ static int handle_switch_cond(ir_node *cond) {
                        } else {
                                /* neither: strange, Cond was not optimized so far */
                                if (num == get_Proj_proj(proj1)) {
-                                       jmp = new_r_Jmp(current_ir_graph, blk);
+                                       jmp = new_r_Jmp(blk);
                                        exchange(proj1, jmp);
                                        exchange(proj2, new_Bad());
                                        return 1;
                                } else if (num == get_Proj_proj(proj2)) {
-                                       jmp = new_r_Jmp(current_ir_graph, blk);
+                                       jmp = new_r_Jmp(blk);
                                        exchange(proj2, jmp);
                                        exchange(proj1, new_Bad());
                                        return 1;
index 6844971..b54f72b 100644 (file)
@@ -3148,7 +3148,7 @@ static void exchange_leader(ir_node *irn, ir_node *leader) {
                ir_node  *block = get_nodes_block(leader);
                dbg_info *dbg   = get_irn_dbg_info(irn);
 
-               leader = new_rd_Conv(dbg, current_ir_graph, block, leader, mode);
+               leader = new_rd_Conv(dbg, block, leader, mode);
        }
        exchange(irn, leader);
 }  /* exchange_leader */
@@ -3271,7 +3271,7 @@ static void apply_result(ir_node *irn, void *ctx) {
 
                                if (is_Cond(cond)) {
                                        if (only_one_reachable_proj(cond)) {
-                                               ir_node *jmp = new_r_Jmp(current_ir_graph, block->node);
+                                               ir_node *jmp = new_r_Jmp(block->node);
                                                set_irn_node(jmp, node);
                                                node->node = jmp;
                                                DB((dbg, LEVEL_1, "%+F is replaced by %+F\n", irn, jmp));
@@ -3313,7 +3313,7 @@ static void apply_result(ir_node *irn, void *ctx) {
                        } else if (is_entity(node->type.sym.entity_p)) {
                                if (! is_SymConst(irn)) {
                                        /* can be replaced by a SymConst */
-                                       ir_node *symc = new_r_SymConst(current_ir_graph, block->node, get_irn_mode(irn), node->type.sym, symconst_addr_ent);
+                                       ir_node *symc = new_r_SymConst(current_ir_graph, get_irn_mode(irn), node->type.sym, symconst_addr_ent);
                                        set_irn_node(symc, node);
                                        node->node = symc;
 
index f557291..606d3bc 100644 (file)
@@ -118,7 +118,7 @@ static ir_node *search_def_and_create_phis(ir_node *block, ir_mode *mode,
        for(i = 0; i < n_cfgpreds; ++i)
                in[i] = new_Unknown(mode);
 
-       phi = new_r_Phi(irg, block, n_cfgpreds, in, mode);
+       phi = new_r_Phi(block, n_cfgpreds, in, mode);
        set_irn_link(block, phi);
        mark_irn_visited(block);
 
@@ -196,7 +196,7 @@ static void split_critical_edge(ir_node *block, int pos) {
 
        in[0] = get_Block_cfgpred(block, pos);
        new_block = new_r_Block(irg, 1, in);
-       new_jmp = new_r_Jmp(irg, new_block);
+       new_jmp = new_r_Jmp(new_block);
        set_Block_cfgpred(block, pos, new_jmp);
 }
 
@@ -662,7 +662,7 @@ static void cond_eval(ir_node* block, void* data)
                return;
        } else if (selector_evaluated == 1) {
                dbg_info *dbgi = get_irn_dbg_info(selector);
-               ir_node  *jmp  = new_rd_Jmp(dbgi, current_ir_graph, get_nodes_block(projx));
+               ir_node  *jmp  = new_rd_Jmp(dbgi, get_nodes_block(projx));
                DBG_OPT_COND_EVAL(projx, jmp);
                exchange(projx, jmp);
                *changed = 1;
index cfee6ee..a6f1612 100644 (file)
@@ -160,7 +160,7 @@ int get_conv_costs(const ir_node *node, ir_mode *dest_mode)
 static ir_node *place_conv(ir_node *node, ir_mode *dest_mode)
 {
        ir_node *block = get_nodes_block(node);
-       ir_node *conv = new_r_Conv(current_ir_graph, block, node, dest_mode);
+       ir_node *conv = new_r_Conv(block, node, dest_mode);
        return conv;
 }
 
index cca885a..cae145c 100644 (file)
@@ -85,7 +85,7 @@ insert:
                                /* set predecessor of new block */
                                block = new_r_Block(irg, 1, &pre);
                                /* insert new jmp node to new block */
-                               jmp = new_r_Jmp(irg, block);
+                               jmp = new_r_Jmp(block);
                                /* set successor of new block */
                                set_irn_n(n, i, jmp);
                                cenv->changed = 1;
index 92a6d72..72e0b63 100644 (file)
@@ -392,7 +392,7 @@ static void transform_allocs(ir_graph *irg, walk_env_t *env)
        blk = get_nodes_block(alloc);
     turn_into_tuple(alloc, pn_Alloc_max);
     set_Tuple_pred(alloc, pn_Alloc_M, mem);
-    set_Tuple_pred(alloc, pn_Alloc_X_regular, new_r_Jmp(irg, blk));
+    set_Tuple_pred(alloc, pn_Alloc_X_regular, new_r_Jmp(blk));
     set_Tuple_pred(alloc, pn_Alloc_X_except, new_r_Bad(irg));
 
     ++env->nr_deads;
@@ -433,13 +433,12 @@ static void transform_allocs(ir_graph *irg, walk_env_t *env)
       name[sizeof(name) - 1] = '\0';
       ent = new_d_entity(ftp, new_id_from_str(name), get_Alloc_type(alloc), dbg);
 
-      sel = new_rd_simpleSel(dbg, irg, get_nodes_block(alloc),
-        get_irg_no_mem(irg), get_irg_frame(irg), ent);
+      sel = new_rd_simpleSel(dbg, get_nodes_block(alloc), get_irg_no_mem(irg), get_irg_frame(irg), ent);
       mem = get_Alloc_mem(alloc);
 
       turn_into_tuple(alloc, pn_Alloc_max);
       set_Tuple_pred(alloc, pn_Alloc_M, mem);
-         set_Tuple_pred(alloc, pn_Alloc_X_regular, new_r_Jmp(irg, blk));
+         set_Tuple_pred(alloc, pn_Alloc_X_regular, new_r_Jmp(blk));
       set_Tuple_pred(alloc, pn_Alloc_X_except, new_r_Bad(irg));
       set_Tuple_pred(alloc, pn_Alloc_res, sel);
 
@@ -487,7 +486,7 @@ static void transform_alloc_calls(ir_graph *irg, walk_env_t *env)
        blk = get_nodes_block(call);
     turn_into_tuple(call, pn_Call_max);
     set_Tuple_pred(call, pn_Call_M_regular, mem);
-       set_Tuple_pred(call, pn_Call_X_regular, new_r_Jmp(irg, blk));
+       set_Tuple_pred(call, pn_Call_X_regular, new_r_Jmp(blk));
     set_Tuple_pred(call, pn_Call_X_except, new_r_Bad(irg));
     set_Tuple_pred(call, pn_Call_T_result, new_r_Bad(irg));
     set_Tuple_pred(call, pn_Call_M_except, mem);
index 21ac4da..0f373f0 100644 (file)
@@ -235,7 +235,7 @@ static void fix_const_call_lists(ir_graph *irg, env_t *ctx) {
                case pn_Call_X_regular: {
                        ir_node *block = get_nodes_block(call);
                        exc_changed = 1;
-                       exchange(proj, new_r_Jmp(irg, block));
+                       exchange(proj, new_r_Jmp(block));
                        break;
                }
                default:
@@ -374,7 +374,7 @@ static void fix_nothrow_call_list(ir_graph *irg, ir_node *call_list, ir_node *pr
                case pn_Call_X_regular: {
                        ir_node *block = get_nodes_block(call);
                        exc_changed = 1;
-                       exchange(proj, new_r_Jmp(irg, block));
+                       exchange(proj, new_r_Jmp(block));
                        break;
                }
                default:
index 3863ff8..087698d 100644 (file)
@@ -119,7 +119,7 @@ static ir_node *add(ir_node *e, ir_node *v)
 
                if (v_pred != pred) {
                        /* must create a new value here */
-                       v = new_r_Proj(current_ir_graph, get_nodes_block(v_pred), v_pred, get_irn_mode(v), get_Proj_proj(v));
+                       v = new_r_Proj(get_nodes_block(v_pred), v_pred, get_irn_mode(v), get_Proj_proj(v));
                }
        }
        v = identify_remember(value_table, v);
@@ -681,7 +681,7 @@ static void insert_nodes(ir_node *block, void *ctx)
                                }
                                in[pos] = pred_info->avail;
                        }  /* for */
-                       phi = new_r_Phi(current_ir_graph, block, arity, in, mode);
+                       phi = new_r_Phi(block, arity, in, mode);
                        l = lookup(expr);
                        if (l == NULL) {
                                l = add(expr, value);
index 1fda437..0108005 100644 (file)
@@ -377,7 +377,7 @@ restart:
                                                        f = val_i;
                                                }
 
-                                               mux = new_rd_Mux(cond_dbg, current_ir_graph, mux_block, sel, f, t, get_irn_mode(phi));
+                                               mux = new_rd_Mux(cond_dbg, mux_block, sel, f, t, get_irn_mode(phi));
                                                DB((dbg, LEVEL_2, "Generating %+F for %+F\n", mux, phi));
                                        }
 
@@ -416,7 +416,7 @@ restart:
 #endif
                                        return;
                                } else {
-                                       rewire(block, i, j, new_r_Jmp(current_ir_graph, mux_block));
+                                       rewire(block, i, j, new_r_Jmp(mux_block));
                                        goto restart;
                                }
                        }
index b4fada2..1c039c6 100644 (file)
@@ -805,11 +805,11 @@ static void walker(ir_node *proj, void *env)
                        in[i++] = p;
                }
                assert(i == n);
-               sync = new_r_Sync(irg, block, n, in);
+               sync = new_r_Sync(block, n, in);
                exchange(proj, sync);
 
                assert(pn_Load_M == pn_Store_M);
-               proj = new_r_Proj(irg, block, mem_op, mode_M, pn_Load_M);
+               proj = new_r_Proj(block, mem_op, mode_M, pn_Load_M);
                set_Sync_pred(sync, 0, proj);
 
                n = ir_nodeset_size(&pi.this_mem);
@@ -826,7 +826,7 @@ static void walker(ir_node *proj, void *env)
                                in[i++] = p;
                        }
                        assert(i == n);
-                       sync = new_r_Sync(irg, block, n, in);
+                       sync = new_r_Sync(block, n, in);
                }
                set_memop_mem(mem_op, sync);
        }
index ed8faf3..ea3b1f1 100644 (file)
@@ -705,7 +705,7 @@ static void handle_load_update(ir_node *load) {
                /* a Load whose value is neither used nor exception checked, remove it */
                exchange(info->projs[pn_Load_M], mem);
                if (info->projs[pn_Load_X_regular])
-                       exchange(info->projs[pn_Load_X_regular], new_r_Jmp(current_ir_graph, get_nodes_block(load)));
+                       exchange(info->projs[pn_Load_X_regular], new_r_Jmp(get_nodes_block(load)));
                kill_node(load);
                reduce_adr_usage(ptr);
        }
@@ -871,14 +871,13 @@ static int try_load_after_store(ir_node *load,
 
                        /* FIXME: only true for little endian */
                        cnst        = new_Const_long(mode_Iu, delta * 8);
-                       store_value = new_r_Shr(current_ir_graph, get_nodes_block(load),
+                       store_value = new_r_Shr(get_nodes_block(load),
                                                                        store_value, cnst, store_mode);
                }
 
                /* add an convert if needed */
                if (store_mode != load_mode) {
-                       store_value = new_r_Conv(current_ir_graph, get_nodes_block(load),
-                                                                        store_value, load_mode);
+                       store_value = new_r_Conv(get_nodes_block(load), store_value, load_mode);
                }
        }
 
@@ -895,7 +894,7 @@ static int try_load_after_store(ir_node *load,
                res |= CF_CHANGED;
        }
        if (info->projs[pn_Load_X_regular]) {
-               exchange( info->projs[pn_Load_X_regular], new_r_Jmp(current_ir_graph, get_nodes_block(load)));
+               exchange( info->projs[pn_Load_X_regular], new_r_Jmp(get_nodes_block(load)));
                res |= CF_CHANGED;
        }
 
@@ -972,13 +971,13 @@ static unsigned follow_Mem_chain(ir_node *load, ir_node *curr) {
                                if (info->projs[pn_Load_res]) {
                                        if (pred_info->projs[pn_Load_res] == NULL) {
                                                /* create a new Proj again */
-                                               pred_info->projs[pn_Load_res] = new_r_Proj(current_ir_graph, get_nodes_block(pred), pred, get_Load_mode(pred), pn_Load_res);
+                                               pred_info->projs[pn_Load_res] = new_r_Proj(get_nodes_block(pred), pred, get_Load_mode(pred), pn_Load_res);
                                        }
                                        value = pred_info->projs[pn_Load_res];
 
                                        /* add an convert if needed */
                                        if (get_Load_mode(pred) != load_mode) {
-                                               value = new_r_Conv(current_ir_graph, get_nodes_block(load), value, load_mode);
+                                               value = new_r_Conv(get_nodes_block(load), value, load_mode);
                                        }
 
                                        exchange(info->projs[pn_Load_res], value);
@@ -993,7 +992,7 @@ static unsigned follow_Mem_chain(ir_node *load, ir_node *curr) {
                                        res |= CF_CHANGED;
                                }
                                if (info->projs[pn_Load_X_regular]) {
-                                       exchange( info->projs[pn_Load_X_regular], new_r_Jmp(current_ir_graph, get_nodes_block(load)));
+                                       exchange( info->projs[pn_Load_X_regular], new_r_Jmp(get_nodes_block(load)));
                                        res |= CF_CHANGED;
                                }
 
@@ -1068,7 +1067,7 @@ ir_node *can_replace_load_by_const(const ir_node *load, ir_node *c) {
 
                        /* copy the value from the const code irg and cast it */
                        res = copy_const_value(dbg, c);
-                       res = new_rd_Conv(dbg, current_ir_graph, block, res, l_mode);
+                       res = new_rd_Conv(dbg, block, res, l_mode);
                }
        } else {
                /* copy the value from the const code irg */
@@ -1119,7 +1118,7 @@ static unsigned optimize_load(ir_node *load)
                         */
                        exchange(info->projs[pn_Load_X_except], new_Bad());
                        info->projs[pn_Load_X_except] = NULL;
-                       exchange(info->projs[pn_Load_X_regular], new_r_Jmp(current_ir_graph, get_nodes_block(load)));
+                       exchange(info->projs[pn_Load_X_regular], new_r_Jmp(get_nodes_block(load)));
                        info->projs[pn_Load_X_regular] = NULL;
                        res |= CF_CHANGED;
                }
@@ -1134,7 +1133,7 @@ static unsigned optimize_load(ir_node *load)
 
                if (info->projs[pn_Load_X_regular]) {
                        /* should not happen, but if it does, remove it */
-                       exchange(info->projs[pn_Load_X_regular], new_r_Jmp(current_ir_graph, get_nodes_block(load)));
+                       exchange(info->projs[pn_Load_X_regular], new_r_Jmp(get_nodes_block(load)));
                        res |= CF_CHANGED;
                }
                kill_node(load);
@@ -1162,7 +1161,7 @@ static unsigned optimize_load(ir_node *load)
                                res |= CF_CHANGED;
                        }
                        if (info->projs[pn_Load_X_regular]) {
-                               exchange(info->projs[pn_Load_X_regular], new_r_Jmp(current_ir_graph, get_nodes_block(load)));
+                               exchange(info->projs[pn_Load_X_regular], new_r_Jmp(get_nodes_block(load)));
                                info->projs[pn_Load_X_regular] = NULL;
                                res |= CF_CHANGED;
                        }
@@ -1202,7 +1201,7 @@ static unsigned optimize_load(ir_node *load)
                        res |= CF_CHANGED;
                }
                if (info->projs[pn_Load_X_regular]) {
-                       exchange(info->projs[pn_Load_X_regular], new_r_Jmp(current_ir_graph, get_nodes_block(load)));
+                       exchange(info->projs[pn_Load_X_regular], new_r_Jmp(get_nodes_block(load)));
                        info->projs[pn_Load_X_regular] = NULL;
                        res |= CF_CHANGED;
                }
@@ -1612,10 +1611,10 @@ static unsigned optimize_phi(ir_node *phi, walk_env_t *wenv)
        block = get_nodes_block(phi);
 
        /* second step: create a new memory Phi */
-       phiM = new_rd_Phi(get_irn_dbg_info(phi), current_ir_graph, block, n, inM, mode_M);
+       phiM = new_rd_Phi(get_irn_dbg_info(phi), block, n, inM, mode_M);
 
        /* third step: create a new data Phi */
-       phiD = new_rd_Phi(get_irn_dbg_info(phi), current_ir_graph, block, n, inD, mode);
+       phiD = new_rd_Phi(get_irn_dbg_info(phi), block, n, inD, mode);
 
        /* rewire memory and kill the node */
        for (i = n - 1; i >= 0; --i) {
@@ -1629,19 +1628,19 @@ static unsigned optimize_phi(ir_node *phi, walk_env_t *wenv)
        }
 
        /* fourth step: create the Store */
-       store = new_rd_Store(db, current_ir_graph, block, phiM, ptr, phiD, 0);
+       store = new_rd_Store(db, block, phiM, ptr, phiD, 0);
 #ifdef DO_CACHEOPT
        co_set_irn_name(store, co_get_irn_ident(old_store));
 #endif
 
-       projM = new_rd_Proj(NULL, current_ir_graph, block, store, mode_M, pn_Store_M);
+       projM = new_rd_Proj(NULL, block, store, mode_M, pn_Store_M);
 
        info = get_ldst_info(store, &wenv->obst);
        info->projs[pn_Store_M] = projM;
 
        /* fifths step: repair exception flow */
        if (exc) {
-               ir_node *projX = new_rd_Proj(NULL, current_ir_graph, block, store, mode_X, pn_Store_X_except);
+               ir_node *projX = new_rd_Proj(NULL, block, store, mode_X, pn_Store_X_except);
 
                info->projs[pn_Store_X_except] = projX;
                info->exc_block                = exc;
@@ -1916,7 +1915,7 @@ static void move_loads_out_of_loops(scc *pscc, loop_env *env) {
                                        if (res != NULL) {
                                                irn = res->load;
                                        } else {
-                                               irn = new_rd_Load(db, current_ir_graph, pred, get_Phi_pred(phi, pos), ptr, load_mode, 0);
+                                               irn = new_rd_Load(db, pred, get_Phi_pred(phi, pos), ptr, load_mode, 0);
                                                entry.load = irn;
                                                set_insert(avail, &entry, sizeof(entry), hash_cache_entry(&entry));
                                                DB((dbg, LEVEL_1, "  Created %+F in %+F\n", irn, pred));
@@ -1924,10 +1923,10 @@ static void move_loads_out_of_loops(scc *pscc, loop_env *env) {
                                        pe->load = irn;
                                        ninfo = get_ldst_info(irn, phase_obst(&env->ph));
 
-                                       ninfo->projs[pn_Load_M] = mem = new_r_Proj(current_ir_graph, pred, irn, mode_M, pn_Load_M);
+                                       ninfo->projs[pn_Load_M] = mem = new_r_Proj(pred, irn, mode_M, pn_Load_M);
                                        set_Phi_pred(phi, pos, mem);
 
-                                       ninfo->projs[pn_Load_res] = new_r_Proj(current_ir_graph, pred, irn, load_mode, pn_Load_res);
+                                       ninfo->projs[pn_Load_res] = new_r_Proj(pred, irn, load_mode, pn_Load_res);
                                }
 
                                /* now kill the old Load */
index 93fee8b..4edb245 100644 (file)
@@ -826,7 +826,7 @@ static void apply(ir_graph *irg, partition_t *part) {
                if (is_op_forking(cfop)) {
                        /* a critical edge */
                        ir_node *block = new_r_Block(irg, 1, &ins[i]);
-                       ir_node *jmp   = new_r_Jmp(irg, block);
+                       ir_node *jmp   = new_r_Jmp(block);
                        ins[i] = jmp;
                }
        }
@@ -845,7 +845,7 @@ static void apply(ir_graph *irg, partition_t *part) {
        for (repr_pair = repr->input_pairs; repr_pair != NULL; repr_pair = repr_pair->next) {
                ir_node *input = get_irn_n(repr_pair->irn, repr_pair->index);
                ir_mode *mode  = get_irn_mode(input);
-               ir_node *phi   = new_r_Phi(current_ir_graph, block, n, repr_pair->ins, mode);
+               ir_node *phi   = new_r_Phi(block, n, repr_pair->ins, mode);
 
                set_irn_n(repr_pair->irn, repr_pair->index, phi);
                DEL_ARR_F(repr_pair->ins);
@@ -1088,8 +1088,8 @@ static void check_for_cf_meet(ir_node *block, void *ctx) {
  * Compare two nodes for root ordering.
  */
 static int cmp_nodes(const void *a, const void *b) {
-       ir_node *const *pa     = a;
-       ir_node *const *pb     = b;
+       const ir_node *const *pa = a;
+       const ir_node *const *pb = b;
        const ir_node  *irn_a  = *pa;
        const ir_node  *irn_b  = *pb;
        ir_opcode      code_a  = get_irn_opcode(irn_a);
index 419163e..59e10ed 100644 (file)
@@ -983,7 +983,7 @@ int inline_method(ir_node *call, ir_graph *called_graph) {
                ir_mode *mode     = get_type_mode(param_tp);
 
                if (mode != get_irn_mode(arg)) {
-                       arg = new_r_Conv(irg, block, arg, mode);
+                       arg = new_r_Conv(block, arg, mode);
                }
                args_in[i] = arg;
        }
@@ -1108,7 +1108,7 @@ int inline_method(ir_node *call, ir_graph *called_graph) {
                ir_node *ret;
                ret = get_Block_cfgpred(end_bl, i);
                if (is_Return(ret)) {
-                       cf_pred[n_ret] = new_r_Jmp(irg, get_nodes_block(ret));
+                       cf_pred[n_ret] = new_r_Jmp(get_nodes_block(ret));
                        n_ret++;
                }
        }
@@ -1145,7 +1145,7 @@ int inline_method(ir_node *call, ir_graph *called_graph) {
                                        ir_node *res = get_Return_res(ret, j);
                                        if (get_irn_mode(res) != res_mode) {
                                                ir_node *block = get_nodes_block(res);
-                                               res = new_r_Conv(irg, block, res, res_mode);
+                                               res = new_r_Conv(block, res, res_mode);
                                        }
                                        cf_pred[n_ret] = res;
                                        n_ret++;
@@ -1204,14 +1204,14 @@ int inline_method(ir_node *call, ir_graph *called_graph) {
                                ir_node *ret;
                                ret = skip_Proj(get_Block_cfgpred(end_bl, i));
                                if (is_Call(ret)) {
-                                       cf_pred[n_exc] = new_r_Proj(irg, get_nodes_block(ret), ret, mode_M, 3);
+                                       cf_pred[n_exc] = new_r_Proj(get_nodes_block(ret), ret, mode_M, 3);
                                        n_exc++;
                                } else if (is_fragile_op(ret)) {
                                        /* We rely that all cfops have the memory output at the same position. */
-                                       cf_pred[n_exc] = new_r_Proj(irg, get_nodes_block(ret), ret, mode_M, 0);
+                                       cf_pred[n_exc] = new_r_Proj(get_nodes_block(ret), ret, mode_M, 0);
                                        n_exc++;
                                } else if (is_Raise(ret)) {
-                                       cf_pred[n_exc] = new_r_Proj(irg, get_nodes_block(ret), ret, mode_M, 1);
+                                       cf_pred[n_exc] = new_r_Proj(get_nodes_block(ret), ret, mode_M, 1);
                                        n_exc++;
                                }
                        }
@@ -1245,8 +1245,8 @@ int inline_method(ir_node *call, ir_graph *called_graph) {
                for (i = 0; i < n_exc; ++i)
                        end_preds[main_end_bl_arity + i] = cf_pred[i];
                set_irn_in(main_end_bl, n_exc + main_end_bl_arity, end_preds);
-               set_Tuple_pred(call, pn_Call_X_except,  new_Bad());
-               set_Tuple_pred(call, pn_Call_M_except,  new_Bad());
+               set_Tuple_pred(call, pn_Call_X_except, new_Bad());
+               set_Tuple_pred(call, pn_Call_M_except, new_Bad());
                free(end_preds);
        }
        free(res_pred);
index cf901f9..e88a4d5 100644 (file)
@@ -1035,7 +1035,7 @@ static void update_Load_memop(memop_t *m) {
                        env.changed = 1;
                }
                if (m->projs[pn_Load_X_regular]) {
-                       exchange(m->projs[pn_Load_X_regular], new_r_Jmp(current_ir_graph, get_nodes_block(load)));
+                       exchange(m->projs[pn_Load_X_regular], new_r_Jmp(get_nodes_block(load)));
                        m->projs[pn_Load_X_regular] = NULL;
                        env.changed = 1;
                }
@@ -1405,7 +1405,7 @@ static ir_node *conv_to(ir_node *irn, ir_mode *mode) {
                /* different modes: check if conversion is possible without changing the bits */
                if (can_convert_to(other, mode)) {
                        ir_node *block = get_nodes_block(irn);
-                       return new_r_Conv(current_ir_graph, block, irn, mode);
+                       return new_r_Conv(block, irn, mode);
                }
                /* otherwise not possible ... yet */
                return NULL;
@@ -1694,7 +1694,7 @@ static void replace_load(memop_t *op) {
                        /* a hidden cast */
                        dbg_info *db    = get_irn_dbg_info(load);
                        ir_node  *block = get_nodes_block(proj);
-                       def = new_rd_Conv(db, current_ir_graph, block, def, mode);
+                       def = new_rd_Conv(db, block, def, mode);
                }
                exchange(proj, def);
        }
@@ -1704,7 +1704,7 @@ static void replace_load(memop_t *op) {
        }
        proj = op->projs[pn_Load_X_regular];
        if (proj != NULL) {
-               exchange(proj, new_r_Jmp(current_ir_graph, get_nodes_block(load)));
+               exchange(proj, new_r_Jmp(get_nodes_block(load)));
        }
 }  /* replace_load */
 
@@ -1729,7 +1729,7 @@ static void remove_store(memop_t *op) {
        }
        proj = op->projs[pn_Store_X_regular];
        if (proj != NULL) {
-               exchange(proj, new_r_Jmp(current_ir_graph, get_nodes_block(store)));
+               exchange(proj, new_r_Jmp(get_nodes_block(store)));
        }
 }  /* remove_store */
 
@@ -1963,7 +1963,7 @@ static int insert_Load(block_t *bl) {
                                }
                                if (need_phi) {
                                        /* build a Phi  */
-                                       ir_node *phi = new_r_Phi(current_ir_graph, bl->block, n, ins, mode);
+                                       ir_node *phi = new_r_Phi(bl->block, n, ins, mode);
                                        memop_t *phiop = alloc_memop(phi);
 
                                        phiop->value = first->value;
@@ -2064,12 +2064,12 @@ static int insert_Load(block_t *bl) {
 
                                                assert(last_mem != NULL);
                                                adr  = phi_translate(op->value.address, block, i);
-                                               load = new_rd_Load(db, current_ir_graph, pred, last_mem, adr, mode, cons_none);
-                                               def  = new_r_Proj(current_ir_graph, pred, load, mode, pn_Load_res);
+                                               load = new_rd_Load(db, pred, last_mem, adr, mode, cons_none);
+                                               def  = new_r_Proj(pred, load, mode, pn_Load_res);
                                                DB((dbg, LEVEL_1, "Created new %+F in %+F for party redundant %+F\n", load, pred, op->node));
 
                                                new_op                = alloc_memop(load);
-                                               new_op->mem           = new_r_Proj(current_ir_graph, pred, load, mode_M, pn_Load_M);
+                                               new_op->mem           = new_r_Proj(pred, load, mode_M, pn_Load_M);
                                                new_op->value.address = adr;
                                                new_op->value.id      = op->value.id;
                                                new_op->value.mode    = mode;
@@ -2103,7 +2103,7 @@ static int insert_Load(block_t *bl) {
                                        }
                                        in[i] = conv_to(pred_bl->avail->value.value, mode);
                                }
-                               phi = new_r_Phi(current_ir_graph, block, n, in, mode);
+                               phi = new_r_Phi(block, n, in, mode);
                                DB((dbg, LEVEL_1, "Created new %+F in %+F for now redundant %+F\n", phi, block, op->node));
 
                                phi_op = clone_memop_phi(op, phi);
index a7701cd..6bcf4bc 100644 (file)
@@ -303,19 +303,18 @@ static ir_node *find_location(ir_node *block1, ir_node *block2) {
  * @return the newly created node
  */
 static ir_node *do_apply(ir_opcode code, dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode) {
-       ir_graph *irg = current_ir_graph;
        ir_node *result;
        ir_node *block = find_location(get_nodes_block(op1), get_nodes_block(op2));
 
        switch (code) {
        case iro_Mul:
-               result = new_rd_Mul(db, irg, block, op1, op2, mode);
+               result = new_rd_Mul(db, block, op1, op2, mode);
                break;
        case iro_Add:
-               result = new_rd_Add(db, irg, block, op1, op2, mode);
+               result = new_rd_Add(db, block, op1, op2, mode);
                break;
        case iro_Sub:
-               result = new_rd_Sub(db, irg, block, op1, op2, mode);
+               result = new_rd_Sub(db, block, op1, op2, mode);
                break;
        default:
                panic("Unsupported opcode");
@@ -1337,14 +1336,14 @@ static void fix_adds_and_subs(ir_node *irn, void *ctx) {
                        if (get_irn_mode(pred) != mode) {
                                ir_node *block = get_nodes_block(pred);
 
-                               pred = new_r_Conv(current_ir_graph, block, pred, mode);
+                               pred = new_r_Conv(block, pred, mode);
                                set_Add_left(irn, pred);
                        }
                        pred = get_Add_right(irn);
                        if (get_irn_mode(pred) != mode) {
                                ir_node *block = get_nodes_block(pred);
 
-                               pred = new_r_Conv(current_ir_graph, block, pred, mode);
+                               pred = new_r_Conv(block, pred, mode);
                                set_Add_right(irn, pred);
                        }
                }
@@ -1361,13 +1360,13 @@ static void fix_adds_and_subs(ir_node *irn, void *ctx) {
                                if (l_mode != mode) {
                                        ir_node *block = get_nodes_block(left);
 
-                                       left = new_r_Conv(current_ir_graph, block, left, mode);
+                                       left = new_r_Conv(block, left, mode);
                                        set_Sub_left(irn, left);
                                }
                                if (r_mode != mode) {
                                        ir_node *block = get_nodes_block(right);
 
-                                       right = new_r_Conv(current_ir_graph, block, right, mode);
+                                       right = new_r_Conv(block, right, mode);
                                        set_Sub_right(irn, right);
                                }
                        }
index 1c3cf88..55cc629 100644 (file)
@@ -460,7 +460,7 @@ static ir_node *new_cl_Call(ir_node *call, ir_entity *new_entity, int pos) {
        ir_node *bl = get_nodes_block(call);
 
        sym.entity_p = new_entity;
-       callee = new_r_SymConst(irg, bl, mode_P_code, sym, symconst_addr_ent);
+       callee = new_r_SymConst(irg, mode_P_code, sym, symconst_addr_ent);
 
        mtp      = get_entity_type(new_entity);
        n_params = get_Call_n_params(call);
@@ -473,7 +473,7 @@ static ir_node *new_cl_Call(ir_node *call, ir_entity *new_entity, int pos) {
                        in[new_params++] = get_Call_param(call, i);
        }
        /* Create and return the new Call. */
-       return new_r_Call(irg, bl, get_Call_mem(call),
+       return new_r_Call(bl, get_Call_mem(call),
                callee, n_params - 1, in, get_entity_type(new_entity));
 }
 
index 8bba618..9651628 100644 (file)
@@ -171,8 +171,8 @@ static int reassoc_Sub(ir_node **in)
                dbi  = get_irn_dbg_info(n);
 
                /* Beware of SubP(P, Is) */
-               irn = new_rd_Minus(dbi, current_ir_graph, block, right, rmode);
-               irn = new_rd_Add(dbi, current_ir_graph, block, left, irn, mode);
+               irn = new_rd_Minus(dbi, block, right, rmode);
+               irn = new_rd_Add(dbi, block, left, irn, mode);
 
                DBG((dbg, LEVEL_5, "Applied: %n - %n => %n + (-%n)\n",
                        get_Sub_left(n), right, get_Sub_left(n), right));
@@ -266,15 +266,15 @@ static int reassoc_commutative(ir_node **node)
                                if (mode_is_int(mode_c1) && mode_is_int(mode_c2)) {
                                        /* get the bigger one */
                                        if (get_mode_size_bits(mode_c1) > get_mode_size_bits(mode_c2))
-                                               c2 = new_r_Conv(current_ir_graph, block, c2, mode_c1);
+                                               c2 = new_r_Conv(block, c2, mode_c1);
                                        else if (get_mode_size_bits(mode_c1) < get_mode_size_bits(mode_c2))
-                                               c1 = new_r_Conv(current_ir_graph, block, c1, mode_c2);
+                                               c1 = new_r_Conv(block, c1, mode_c2);
                                        else {
                                                /* Try to cast the real const */
                                                if (c_c1 == REAL_CONSTANT)
-                                                       c1 = new_r_Conv(current_ir_graph, block, c1, mode_c2);
+                                                       c1 = new_r_Conv(block, c1, mode_c2);
                                                else
-                                                       c2 = new_r_Conv(current_ir_graph, block, c2, mode_c1);
+                                                       c2 = new_r_Conv(block, c2, mode_c1);
                                        }
                                }
                        }
@@ -467,8 +467,8 @@ static int reassoc_Mul(ir_node **node)
 
                /* we can only multiplication rules on integer arithmetic */
                if (mode_is_int(get_irn_mode(t1)) && mode_is_int(get_irn_mode(t2))) {
-                       in[0] = new_rd_Mul(NULL, current_ir_graph, block, c, t1, mode);
-                       in[1] = new_rd_Mul(NULL, current_ir_graph, block, c, t2, mode);
+                       in[0] = new_rd_Mul(NULL, block, c, t1, mode);
+                       in[1] = new_rd_Mul(NULL, block, c, t2, mode);
 
                        irn   = optimize_node(new_ir_node(NULL, current_ir_graph, block, op, mode, 2, in));
 
@@ -518,7 +518,7 @@ static int reassoc_Shl(ir_node **node) {
 
        blk = get_nodes_block(n);
        c   = new_Const(tv);
-       irn = new_rd_Mul(get_irn_dbg_info(n), current_ir_graph, blk, x, c, mode);
+       irn = new_rd_Mul(get_irn_dbg_info(n), blk, x, c, mode);
 
        if (irn != n) {
                exchange(n, irn);
@@ -725,16 +725,16 @@ transform:
        mode = get_irn_mode(n);
 
        if (is_Add(n))
-               irn = new_rd_Add(dbg, current_ir_graph, blk, a, b, mode);
+               irn = new_rd_Add(dbg, blk, a, b, mode);
        else
-               irn = new_rd_Sub(dbg, current_ir_graph, blk, a, b, mode);
+               irn = new_rd_Sub(dbg, blk, a, b, mode);
 
        blk  = earliest_block(irn, x, curr_blk);
 
        if (op == op_Mul)
-               irn = new_rd_Mul(dbg, current_ir_graph, blk, irn, x, mode);
+               irn = new_rd_Mul(dbg, blk, irn, x, mode);
        else
-               irn = new_rd_Shl(dbg, current_ir_graph, blk, irn, x, mode);
+               irn = new_rd_Shl(dbg, blk, irn, x, mode);
 
        exchange(n, irn);
        *node = irn;
index 6117c7d..796baeb 100644 (file)
@@ -116,7 +116,7 @@ void normalize_one_return(ir_graph *irg) {
                        ir_node *block = get_nodes_block(ret);
 
                        /* create a new Jmp for every Ret and place the in in */
-                       in[j] = new_r_Jmp(irg, block);
+                       in[j] = new_r_Jmp(block);
 
                        /* save the return values and shuffle them */
                        for (k = 0; k < n_ret_vals; ++k)
@@ -149,10 +149,10 @@ void normalize_one_return(ir_graph *irg) {
                if (first)
                        in[i] = first;
                else
-                       in[i] = new_r_Phi(irg, block, n_rets, &retvals[j], get_irn_mode(retvals[j]));
+                       in[i] = new_r_Phi(block, n_rets, &retvals[j], get_irn_mode(retvals[j]));
        }
 
-       endbl_in[last_idx++] = new_rd_Return(combined_dbgi, irg, block, in[0], n_ret_vals-1, &in[1]);
+       endbl_in[last_idx++] = new_rd_Return(combined_dbgi, block, in[0], n_ret_vals-1, &in[1]);
 
        set_irn_in(endbl, last_idx, endbl_in);
 
@@ -209,7 +209,7 @@ static int can_move_ret(ir_node *ret) {
                        /* simply place a new block here */
                        ir_graph *irg  = get_irn_irg(retbl);
                        ir_node *block = new_r_Block(irg, 1, &pred);
-                       ir_node *jmp   = new_r_Jmp(irg, block);
+                       ir_node *jmp   = new_r_Jmp(block);
                        set_Block_cfgpred(retbl, i, jmp);
                }
        }
@@ -308,7 +308,7 @@ void normalize_n_returns(ir_graph *irg) {
                                in[j] = (is_Phi(pred) && get_nodes_block(pred) == block) ? get_Phi_pred(pred, i) : pred;
                        }
 
-                       new_ret = new_rd_Return(dbgi, irg, new_bl, in[0], n_ret_vals - 1, &in[1]);
+                       new_ret = new_rd_Return(dbgi, new_bl, in[0], n_ret_vals - 1, &in[1]);
 
                        if (! is_Bad(new_ret)) {
                                /*
index 28ab28f..9971c56 100644 (file)
@@ -195,7 +195,7 @@ static void do_opt_tail_rec(ir_graph *irg, tr_env *env) {
                ir_node *block = get_nodes_block(p);
 
                n = get_irn_link(p);
-               in[i++] = new_r_Jmp(irg, block);
+               in[i++] = new_r_Jmp(block);
 
                // exchange(p, new_r_Bad(irg));
 
@@ -206,7 +206,7 @@ static void do_opt_tail_rec(ir_graph *irg, tr_env *env) {
 
        /* create a new block at start */
        block = new_r_Block(irg, env->n_tail_calls + 1, in);
-       jmp   = new_r_Jmp(irg, block);
+       jmp   = new_r_Jmp(block);
 
        /* the old first block is now the second one */
        set_Block_cfgpred(data.block, data.blk_idx, jmp);
@@ -216,7 +216,7 @@ static void do_opt_tail_rec(ir_graph *irg, tr_env *env) {
 
        /* build the memory phi */
        i = 0;
-       in[i] = new_r_Proj(irg, get_irg_start_block(irg), get_irg_start(irg), mode_M, pn_Start_M);
+       in[i] = new_r_Proj(get_irg_start_block(irg), get_irg_start(irg), mode_M, pn_Start_M);
        set_irg_initial_mem(irg, in[i]);
        ++i;
 
@@ -226,7 +226,7 @@ static void do_opt_tail_rec(ir_graph *irg, tr_env *env) {
        }
        assert(i == env->n_tail_calls + 1);
 
-       phis[0] = new_r_Phi(irg, block, env->n_tail_calls + 1, in, mode_M);
+       phis[0] = new_r_Phi(block, env->n_tail_calls + 1, in, mode_M);
 
        /* build the data Phi's */
        if (n_params > 0) {
@@ -248,11 +248,11 @@ static void do_opt_tail_rec(ir_graph *irg, tr_env *env) {
                for (i = 0; i < n_params; ++i) {
                        ir_mode *mode = get_type_mode(get_method_param_type(method_tp, i));
 
-                       in[0] = new_r_Proj(irg, args_bl, args, mode, i);
+                       in[0] = new_r_Proj(args_bl, args, mode, i);
                        for (j = 0; j < env->n_tail_calls; ++j)
                                in[j + 1] = call_params[j][i];
 
-                       phis[i + 1] = new_r_Phi(irg, block, env->n_tail_calls + 1, in, mode);
+                       phis[i + 1] = new_r_Phi(block, env->n_tail_calls + 1, in, mode);
                }
        }
 
index 969d3c9..435efb0 100644 (file)
@@ -392,9 +392,9 @@ static int concretize_Phi_type(ir_node *phi)
 
        /* Transform Phi */
        blk = get_nodes_block(phi);
-       nn  = new_r_Phi(current_ir_graph, blk, n_preds, pred, get_irn_mode(phi));
+       nn  = new_r_Phi(blk, n_preds, pred, get_irn_mode(phi));
        set_irn_typeinfo_type(nn, fromtype);
-       nn  = new_r_Cast(current_ir_graph, blk, nn, totype);
+       nn  = new_r_Cast(blk, nn, totype);
        set_irn_typeinfo_type(nn, totype);
        exchange(phi, nn);
        return 1;
index eab03c5..498e2eb 100755 (executable)
@@ -30,22 +30,28 @@ def format_args(node, first = False):
        return res
 
 def format_blockdecl(node):
+       if hasattr(node, "knownBlock"):
+               return "ir_graph *irg"
+       else:
+               return "ir_node *block"
+
+def format_irgassign(node):
        if hasattr(node, "knownBlock"):
                return ""
        else:
-               return ", ir_node *block"
+               return "ir_graph *irg = get_Block_irg(block);\n"
 
 def format_block(node):
        if hasattr(node, "knownBlock"):
-               return ""
+               return "irg"
        else:
-               return "block"
+               return "block"
 
 def format_curblock(node):
        if hasattr(node, "knownBlock"):
-               return ""
+               return "current_ir_graph"
        else:
-               return "current_ir_graph->current_block"
+               return "current_ir_graph->current_block"
 
 def format_insdecl(node):
        arity = node.arity
@@ -142,6 +148,7 @@ env = Environment()
 env.filters['argdecls']      = format_argdecls
 env.filters['args']          = format_args
 env.filters['blockdecl']     = format_blockdecl
+env.filters['irgassign']     = format_irgassign
 env.filters['block']         = format_block
 env.filters['curblock']      = format_curblock
 env.filters['insdecl']       = format_insdecl
@@ -250,10 +257,11 @@ def preprocess_node(node):
 
 constructor_template = env.from_string('''
 
-ir_node *new_rd_{{node.constrname}}(dbg_info *dbgi, ir_graph *irg{{node|blockdecl}}{{node|argdecls}})
+ir_node *new_rd_{{node.constrname}}(dbg_info *dbgi, {{node|blockdecl}}{{node|argdecls}})
 {
        ir_node *res;
        ir_graph *rem = current_ir_graph;
+       {{node|irgassign}}
        {{node|insdecl}}
        current_ir_graph = irg;
        res = new_ir_node(dbgi, irg, {{node.block}}, op_{{node.name}}, {{node.mode}}, {{node|arity_and_ins}});
@@ -275,16 +283,16 @@ ir_node *new_rd_{{node.constrname}}(dbg_info *dbgi, ir_graph *irg{{node|blockdec
        return res;
 }
 
-ir_node *new_r_{{node.constrname}}(ir_graph *irg{{node|blockdecl}}{{node|argdecls}})
+ir_node *new_r_{{node.constrname}}({{node|blockdecl}}{{node|argdecls}})
 {
-       return new_rd_{{node.constrname}}(NULL, irg{{node|block}}{{node|args}});
+       return new_rd_{{node.constrname}}(NULL, {{node|block}}{{node|args}});
 }
 
 ir_node *new_d_{{node.constrname}}(dbg_info *dbgi{{node|argdecls}})
 {
        ir_node *res;
        {{ node.d_pre }}
-       res = new_rd_{{node.constrname}}(dbgi, current_ir_graph{{node|curblock}}{{node|args}});
+       res = new_rd_{{node.constrname}}(dbgi, {{node|curblock}}{{node|args}});
        {{ node.d_post }}
        return res;
 }
index 2cc4d3e..d685b96 100755 (executable)
@@ -26,9 +26,9 @@ def format_ifnset(string, node, key):
 
 def format_block(node):
        if hasattr(node, "knownBlock"):
-               return ""
+               return "current_ir_graph"
        else:
-               return "get_node(env, preds[0])"
+               return "get_node(env, preds[0])"
 
 env = Environment()
 env.filters['args']   = format_args
@@ -187,9 +187,9 @@ import_attrs_template = env.from_string('''
                {% for attr in node.constructor_args %}{{attr.importcmd}}
                {% endfor %}
                {% for special in node.special_constructors %}if({{special.attrname}} == {{special.value}})
-                       newnode = new_r_{{special.constrname}}(current_ir_graph{{node|block}}{{node.arguments|args}});
+                       newnode = new_r_{{special.constrname}}({{node|block}}{{node.arguments|args}});
                else{% endfor %}
-               newnode = new_r_{{node.name}}(current_ir_graph{{node|block}}{{node.arguments|args}});
+               newnode = new_r_{{node.name}}({{node|block}}{{node.arguments|args}});
                {% for (initarg, initfunc) in node.initargs %}{{initfunc}}(newnode, {{initarg}});
                {% endfor %}
                break;