becopyheur4: Clean up co_mst_irn_init().
[libfirm] / ir / be / bespilldaemel.c
index 88cf06a..08a395f 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.
  */
 
 /**
@@ -140,10 +126,10 @@ static unsigned get_value_width(const ir_node *node)
 static void do_spilling(ir_nodeset_t *live_nodes, ir_node *node)
 {
        size_t values_defined = 0;
-       be_foreach_definition(node, cls, value,
+       be_foreach_definition(node, cls, value, req,
                (void)value;
-               assert(req_->width >= 1);
-               values_defined += req_->width;
+               assert(req->width >= 1);
+               values_defined += req->width;
        );
 
        /* we need registers for the non-live argument values */
@@ -225,7 +211,7 @@ static void remove_defs(ir_node *node, ir_nodeset_t *nodeset)
        /* You must break out of your loop when hitting the first phi function. */
        assert(!is_Phi(node));
 
-       be_foreach_definition(node, cls, value,
+       be_foreach_definition(node, cls, value, req,
                ir_nodeset_remove(nodeset, value);
        );
 }
@@ -335,8 +321,6 @@ static void spill_block(ir_node *block, void *data)
 static void be_spill_daemel(ir_graph *irg, const arch_register_class_t *new_cls)
 {
        n_regs = be_get_n_allocatable_regs(irg, new_cls);
-       if (n_regs == 0)
-               return;
 
        be_assure_live_sets(irg);