}
}
-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);
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.
}
/**
- * 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;
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);
}
}
/**
* 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);
}
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);
}