return spill;
}
-ir_node *be_reload(const arch_env_t *arch_env, const arch_register_class_t *cls, ir_node *insert, ir_mode *mode, ir_node *spill)
+ir_node *be_reload(const arch_register_class_t *cls, ir_node *insert, ir_mode *mode, ir_node *spill)
{
ir_node *reload;
ir_node *bl = is_Block(insert) ? insert : get_nodes_block(insert);
ir_graph *irg = get_irn_irg(bl);
ir_node *frame = get_irg_frame(irg);
const arch_register_class_t *cls_frame = arch_get_irn_reg_class(frame, -1);
- (void)arch_env; // TODO remove parameter
assert(be_is_Spill(spill) || (is_Phi(spill) && get_irn_mode(spill) == mode_M));
/**
* Make a reload and insert it into the schedule.
*
- * @param arch_env The architecture environment.
* @param cls The register class of the reloaded value.
* @param insert The node in the schedule in front of which the reload is inserted.
* @param mode The mode of the original (spilled) value.
* @param spill The spill node corresponding to this reload.
* @return A freshly made reload.
*/
-ir_node *be_reload(const arch_env_t *arch_env, const arch_register_class_t *cls, ir_node *insert, ir_mode *mode, ir_node *spill);
+ir_node *be_reload(const arch_register_class_t *cls, ir_node *insert, ir_mode *mode, ir_node *spill);
enum {
be_pos_CopyKeep_op = 0
void be_insert_spills_reloads(spill_env_t *env)
{
- const arch_env_t *arch_env = env->arch_env;
const ir_exec_freq *exec_freq = env->exec_freq;
spill_info_t *si;
ir_nodeset_iterator_t iter;
/* create a reload, use the first spill for now SSA
* reconstruction for memory comes below */
assert(si->spills != NULL);
- copy = be_reload(arch_env, si->reload_cls, rld->reloader, mode,
+ copy = be_reload(si->reload_cls, rld->reloader, mode,
si->spills->spill);
#ifdef FIRM_STATISTICS
env->reload_count++;
defs_t *defs;
ir_node *reload,
*spill;
- const arch_env_t *arch_env = si->birg->main_env->arch_env;
DBG((si->dbg, LEVEL_3, "\t inserting reload for value %+F before %+F\n", value, after));
spill = defs->spills;
assert(spill && "no spill placed before reload");
- reload = be_reload(arch_env, si->cls, after, get_irn_mode(value), spill);
+ reload = be_reload(si->cls, after, get_irn_mode(value), spill);
/* enter into the linked list */
set_irn_link(reload, defs->remats);