From bd4175dd9c290a499676ef53aa5c6c2106472c1d Mon Sep 17 00:00:00 2001 From: Christoph Mallon Date: Wed, 15 Oct 2008 18:14:52 +0000 Subject: [PATCH] Add arch_reg_out_is_allocatable(). [r22919] --- ir/be/bearch.h | 2 ++ ir/be/becopyheur.c | 2 +- ir/be/beverify.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ir/be/bearch.h b/ir/be/bearch.h index 49ee84749..2c1283e66 100644 --- a/ir/be/bearch.h +++ b/ir/be/bearch.h @@ -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. diff --git a/ir/be/becopyheur.c b/ir/be/becopyheur.c index 460363dba..fc26067bb 100644 --- a/ir/be/becopyheur.c +++ b/ir/be/becopyheur.c @@ -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; } diff --git a/ir/be/beverify.c b/ir/be/beverify.c index c5425e0e0..de4cf4a48 100644 --- a/ir/be/beverify.c +++ b/ir/be/beverify.c @@ -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; -- 2.20.1