added new abi callback (fix stack phis)
authorChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Fri, 19 Jan 2007 16:04:49 +0000 (16:04 +0000)
committerChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Fri, 19 Jan 2007 16:04:49 +0000 (16:04 +0000)
ir/be/beabi.c
ir/be/beabi.h

index 86184d0..f41a7ae 100644 (file)
@@ -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);
 }
 
index 8aa69d6..5baed2d 100644 (file)
@@ -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);
 };
 
 /**