Commit 6d64da24 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

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

[r22683]
parent 1875c10b
......@@ -136,9 +136,9 @@ int arch_possible_memory_operand(const ir_node *irn, unsigned int i)
}
}
void arch_perform_memory_operand(const arch_env_t *env, ir_node *irn, ir_node *spill, unsigned int i) {
void arch_perform_memory_operand(ir_node *irn, ir_node *spill, unsigned int i)
{
const arch_irn_ops_t *ops = get_irn_ops(irn);
(void)env; // TODO remove parameter
if(ops->perform_memory_operand) {
ops->perform_memory_operand(irn, spill, i);
......
......@@ -142,7 +142,7 @@ int arch_get_sp_bias(ir_node *irn);
extern int arch_get_op_estimated_cost(const arch_env_t *env, const ir_node *irn);
arch_inverse_t *arch_get_inverse(const ir_node *irn, int i, arch_inverse_t *inverse, struct obstack *obstack);
int arch_possible_memory_operand(const ir_node *irn, unsigned int i);
extern void arch_perform_memory_operand(const arch_env_t *env, ir_node *irn, ir_node *spill, unsigned int i);
void arch_perform_memory_operand(ir_node *irn, ir_node *spill, unsigned int i);
/**
* Get the register requirements for a node.
......
......@@ -176,15 +176,16 @@ static void dump(unsigned mask, ir_graph *irg,
}
/**
* Checks for every reload if it's user can perform the load on itself.
* Checks for every reload if its user can perform the load on itself.
*/
static void memory_operand_walker(ir_node *irn, void *env) {
be_chordal_env_t *cenv = env;
const arch_env_t *aenv = cenv->birg->main_env->arch_env;
static void memory_operand_walker(ir_node *irn, void *env)
{
const ir_edge_t *edge, *ne;
ir_node *block;
ir_node *spill;
(void)env;
if (! be_is_Reload(irn))
return;
......@@ -202,7 +203,7 @@ static void memory_operand_walker(ir_node *irn, void *env) {
assert(src && "outedges broken!");
if (get_nodes_block(src) == block && arch_possible_memory_operand(src, pos)) {
arch_perform_memory_operand(aenv, src, spill, pos);
arch_perform_memory_operand(src, spill, pos);
}
}
......@@ -217,8 +218,9 @@ static void memory_operand_walker(ir_node *irn, void *env) {
/**
* Starts a walk for memory operands if supported by the backend.
*/
static INLINE void check_for_memory_operands(be_chordal_env_t *chordal_env) {
irg_walk_graph(chordal_env->irg, NULL, memory_operand_walker, chordal_env);
static INLINE void check_for_memory_operands(ir_graph *irg)
{
irg_walk_graph(irg, NULL, memory_operand_walker, NULL);
}
......@@ -275,7 +277,7 @@ static void post_spill(post_spill_env_t *pse, int iteration) {
But we only need to fix stack nodes once in this case.
*/
BE_TIMER_PUSH(t_ra_spill_apply);
check_for_memory_operands(chordal_env);
check_for_memory_operands(irg);
if (iteration == 0) {
be_abi_fix_stack_nodes(birg->abi);
}
......
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