Commit 757dc2b9 authored by Christian Würdig's avatar Christian Würdig
Browse files

added new abi callback (fix stack phis)

parent bfbb4c3a
......@@ -1926,15 +1926,20 @@ void be_abi_fix_stack_nodes(be_abi_irg_t *env, be_lv_t *lv)
{
pset *stack_nodes = pset_new_ptr(16);
struct fix_stack_walker_info info;
int collect_phis;
info.nodes = stack_nodes;
info.aenv = env->birg->main_env->arch_env;
be_assure_dom_front(env->birg);
irg_walk_graph(env->birg->irg, collect_stack_nodes_walker, NULL, &info);
pset_insert_ptr(stack_nodes, env->init_sp);
be_ssa_constr_set_phis(env->birg->dom_front, lv, stack_nodes, env->stack_phis);
collect_phis = 1;
if (env->call->cb->collect_stack_phis)
collect_phis = env->call->cb->collect_stack_phis(env->cb);
be_ssa_constr_set_phis(env->birg->dom_front, lv, stack_nodes, collect_phis ? env->stack_phis : NULL);
del_pset(stack_nodes);
}
......
......@@ -82,6 +82,8 @@ struct _be_abi_callbacks_t {
* Also, the @p mem variable must be updated, if memory producing nodes are inserted.
*/
void (*epilogue)(void *self, ir_node *bl, ir_node **mem, pmap *reg_map);
int (*collect_stack_phis)(void *self);
};
/**
......
Markdown is supported
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