ia32: we cannot fold ia32_mode_E reloads
[libfirm] / ir / be / benode.c
index e151145..3916616 100644 (file)
@@ -1,20 +1,6 @@
 /*
- * Copyright (C) 1995-2011 University of Karlsruhe.  All right reserved.
- *
  * This file is part of libFirm.
- *
- * This file may be distributed and/or modified under the terms of the
- * GNU General Public License version 2 as published by the Free Software
- * Foundation and appearing in the file LICENSE.GPL included in the
- * packaging of this file.
- *
- * Licensees holding valid libFirm Professional Edition licenses may use
- * this file in accordance with the libFirm Commercial License.
- * Agreement provided with the Software.
- *
- * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
- * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE.
+ * Copyright (C) 2012 University of Karlsruhe.
  */
 
 /**
@@ -470,14 +456,13 @@ void be_Keep_add_node(ir_node *keep, const arch_register_class_t *cls, ir_node *
        add_register_req_in(keep, cls->class_req);
 }
 
-ir_node *be_new_Call(dbg_info *dbg, ir_graph *irg, ir_node *bl, ir_node *mem,
+ir_node *be_new_Call(dbg_info *dbg, ir_node *bl, ir_node *mem,
                const arch_register_req_t *sp_req, ir_node *sp,
                const arch_register_req_t *ptr_req, ir_node *ptr,
                int n_outs, int n, ir_node *in[], ir_type *call_tp)
 {
        be_call_attr_t *a;
        int real_n = n_be_Call_first_arg + n;
-       ir_node *irn;
        ir_node **real_in;
 
        NEW_ARR_A(ir_node *, real_in, real_n);
@@ -486,7 +471,8 @@ ir_node *be_new_Call(dbg_info *dbg, ir_graph *irg, ir_node *bl, ir_node *mem,
        real_in[n_be_Call_ptr] = ptr;
        memcpy(&real_in[n_be_Call_first_arg], in, n * sizeof(in[0]));
 
-       irn = new_ir_node(dbg, irg, bl, op_be_Call, mode_T, real_n, real_in);
+       ir_graph *const irg = get_Block_irg(bl);
+       ir_node  *const irn = new_ir_node(dbg, irg, bl, op_be_Call, mode_T, real_n, real_in);
        init_node_attr(irn, real_n, n_outs);
        a                     = (be_call_attr_t*)get_irn_generic_attr(irn);
        a->ent                = NULL;
@@ -538,17 +524,14 @@ unsigned be_Call_get_pop(const ir_node *call)
        return a->pop;
 }
 
-ir_node *be_new_Return(dbg_info *dbg, ir_graph *irg, ir_node *block, int n_res,
-                       unsigned pop, int n, ir_node *in[])
+ir_node *be_new_Return(dbg_info *const dbg, ir_node *const block, int const n_res, unsigned const pop, int const n, ir_node **const in)
 {
-       be_return_attr_t *a;
-       ir_node *res;
-
-       res = new_ir_node(dbg, irg, block, op_be_Return, mode_X, n, in);
+       ir_graph *const irg = get_Block_irg(block);
+       ir_node  *const res = new_ir_node(dbg, irg, block, op_be_Return, mode_X, n, in);
        init_node_attr(res, n, 1);
        be_set_constr_out(res, 0, arch_no_register_req);
 
-       a = (be_return_attr_t*)get_irn_generic_attr(res);
+       be_return_attr_t *const a = (be_return_attr_t*)get_irn_generic_attr(res);
        a->num_ret_vals       = n_res;
        a->pop                = pop;
        a->emit_pop           = 0;