(tree_cfg_hooks): Use it.
* tree-ssa.c (ssa_remove_edge): Don't call remove_phi_args.
(ssa_redirect_edge): Don't call remove_phi_arg_num.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91036
138bc75d-0d04-0410-961f-
82ee72b054a4
(cfg_layout_rtl_cfg_hook): Likewise.
* tree-cfg.c (tree_cfg_hooks): Likewise.
+ * tree-cfg.c (tree_execute_on_shrinking_pred): New.
+ (tree_cfg_hooks): Use it.
+ * tree-ssa.c (ssa_remove_edge): Don't call remove_phi_args.
+ (ssa_redirect_edge): Don't call remove_phi_arg_num.
+
2004-11-23 Ben Elliston <bje@au.ibm.com>
* doc/cfg.texi (Maintaining the CFG): Use @ftable instead of
return changed;
}
+/* This function is called immediately before edge E is removed from
+ the edge vector E->dest->preds. */
+
+static void
+tree_execute_on_shrinking_pred (edge e)
+{
+ if (phi_nodes (e->dest))
+ remove_phi_args (e);
+}
+
struct cfg_hooks tree_cfg_hooks = {
"tree",
tree_verify_flow_info,
tree_block_ends_with_condjump_p, /* block_ends_with_condjump_p */
tree_flow_call_edges_add, /* flow_call_edges_add */
NULL, /* execute_on_growing_pred */
- NULL, /* execute_on_shrinking_pred */
+ tree_execute_on_shrinking_pred, /* execute_on_shrinking_pred */
};
void
ssa_remove_edge (edge e)
{
- /* Remove all PHI arguments for E. */
- remove_phi_args (e);
-
remove_edge (e);
}
node = build_tree_list (dst, src);
*last = node;
last = &TREE_CHAIN (node);
-
- remove_phi_arg_num (phi, i);
}
e = redirect_edge_succ_nodup (e, dest);