Add arch_reg_out_is_allocatable().
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 15 Oct 2008 18:14:52 +0000 (18:14 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Wed, 15 Oct 2008 18:14:52 +0000 (18:14 +0000)
[r22919]

ir/be/bearch.h
ir/be/becopyheur.c
ir/be/beverify.c

index 49ee847..2c1283e 100644 (file)
@@ -162,6 +162,8 @@ extern void arch_put_non_ignore_regs(const arch_register_class_t *cls, bitset_t
  */
 int arch_reg_is_allocatable(const ir_node *irn, int pos, const arch_register_t *reg);
 
+#define arch_reg_out_is_allocatable(irn, reg) arch_reg_is_allocatable(irn, -1, reg)
+
 /**
  * Get the register class of an operand of a node.
  * @param irn The node.
index 460363d..fc26067 100644 (file)
@@ -299,7 +299,7 @@ static ir_node *qnode_color_irn(const qnode_t *qn, ir_node *irn, int col, const
 #endif /* SEARCH_FREE_COLORS */
 
        /* If target color is not allocatable changing color is impossible */
-       if (!arch_reg_is_allocatable(irn, -1, arch_register_for_index(cls, col))) {
+       if (!arch_reg_out_is_allocatable(irn, arch_register_for_index(cls, col))) {
                DBG((dbg, LEVEL_3, "\t      %+F impossible\n", irn));
                return CHANGE_IMPOSSIBLE;
        }
index c5425e0..de4cf4a 100644 (file)
@@ -703,7 +703,7 @@ static void check_register_constraints(ir_node *node)
                        ir_fprintf(stderr, "Verify warning: Node %+F in block %+F(%s) should have a register assigned\n",
                                        node, get_nodes_block(node), get_irg_dump_name(irg));
                        problem_found = 1;
-               } else if (!arch_register_type_is(reg, joker) && !arch_reg_is_allocatable(node, -1, reg)) {
+               } else if (!arch_register_type_is(reg, joker) && !arch_reg_out_is_allocatable(node, reg)) {
                        ir_fprintf(stderr, "Verify warning: Register %s assigned as output of %+F not allowed (register constraint) in block %+F(%s)\n",
                                        reg->name, node, get_nodes_block(node), get_irg_dump_name(irg));
                        problem_found = 1;