-/**
- * This walker function searches for reloads and collects all the spills
- * and memphis attached to them.
- */
-static void collect_spills_walker(ir_node *node, void *data)
-{
- be_fec_env_t *env = data;
- const arch_env_t *arch_env = env->arch_env;
- const ir_mode *mode;
- const arch_register_class_t *cls;
- int align;
-
- /* classify returns classification of the irn the proj is attached to */
- if (is_Proj(node))
- return;
-
- if (!arch_irn_class_is(arch_env, node, reload))
- return;
-
- mode = get_irn_mode(node);
- cls = arch_get_irn_reg_class(arch_env, node, -1);
- align = arch_env_get_reg_class_alignment(arch_env, cls);
-
- be_node_needs_frame_entity(env, node, mode, align);
-}
-
-void be_coalesce_spillslots(be_irg_t *birg)
-{
- be_fec_env_t *env = be_new_frame_entity_coalescer(birg);
-
- /* collect reloads */
- irg_walk_graph(birg->irg, NULL, collect_spills_walker, env);
-
- be_assign_entities(env);
-
- be_free_frame_entity_coalescer(env);
-}
-