Commit 584bf872 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Remove the unused parameter const arch_env_t *env from arch_reg_is_allocatable().

[r22689]
parent e927f294
......@@ -195,11 +195,9 @@ int arch_is_register_operand(const ir_node *irn, int pos)
return req != NULL;
}
int arch_reg_is_allocatable(const arch_env_t *env, const ir_node *irn,
int pos, const arch_register_t *reg)
int arch_reg_is_allocatable(const ir_node *irn, int pos, const arch_register_t *reg)
{
const arch_register_req_t *req = arch_get_register_req(irn, pos);
(void)env; // TODO remove parameter
if(req->type == arch_register_req_type_none)
return 0;
......
......@@ -185,14 +185,12 @@ extern void arch_put_non_ignore_regs(const arch_register_class_t *cls, bitset_t
/**
* Check, if a register is assignable to an operand of a node.
* @param env The architecture environment.
* @param irn The node.
* @param pos The position of the operand.
* @param reg The register.
* @return 1, if the register might be allocated to the operand 0 if not.
*/
extern int arch_reg_is_allocatable(const arch_env_t *env,
const ir_node *irn, int pos, const arch_register_t *reg);
int arch_reg_is_allocatable(const ir_node *irn, int pos, const arch_register_t *reg);
/**
* Get the register class of an operand of a node.
......
......@@ -301,7 +301,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(co->aenv, irn, -1, arch_register_for_index(cls, col))) {
if (!arch_reg_is_allocatable(irn, -1, arch_register_for_index(cls, col))) {
DBG((dbg, LEVEL_3, "\t %+F impossible\n", irn));
return CHANGE_IMPOSSIBLE;
}
......
......@@ -711,7 +711,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(arch_env, node, -1, reg)) {
} else if (!arch_register_type_is(reg, joker) && !arch_reg_is_allocatable(node, -1, 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;
......@@ -742,8 +742,7 @@ static void check_register_constraints(ir_node *node)
pred, get_nodes_block(pred), get_irg_dump_name(irg), node);
problem_found = 1;
continue;
}
else if (! arch_register_type_is(reg, joker) && ! arch_reg_is_allocatable(arch_env, node, i, reg)) {
} else if (!arch_register_type_is(reg, joker) && ! arch_reg_is_allocatable(node, i, reg)) {
ir_fprintf(stderr, "Verify warning: Register %s as input %d of %+F not allowed (register constraint) in block %+F(%s)\n",
reg->name, i, 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