Commit bd4175dd authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Add arch_reg_out_is_allocatable().

parent 3fde72ce
......@@ -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.
......@@ -299,7 +299,7 @@ static ir_node *qnode_color_irn(const qnode_t *qn, ir_node *irn, int col, const
/* 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));
......@@ -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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment