diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2004-11-22 22:04:21 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2004-11-22 22:04:21 +0000 |
commit | d9d4706fa5e5e9db60e0d6a4ad742928f07042dc (patch) | |
tree | 712b6c41059aafe8583821534fb80e3194ae272d /gcc/cfg.c | |
parent | b31997c0dca31350faba5f7859acbd6109f9039e (diff) | |
download | gcc-d9d4706fa5e5e9db60e0d6a4ad742928f07042dc.zip gcc-d9d4706fa5e5e9db60e0d6a4ad742928f07042dc.tar.gz gcc-d9d4706fa5e5e9db60e0d6a4ad742928f07042dc.tar.bz2 |
cfg.c (unchecked_make_edge): Call execute_on_growing_pred after making an edge.
* cfg.c (unchecked_make_edge): Call execute_on_growing_pred
after making an edge.
(remove_edge): Call execute_on_shrinking_pred before removing
an edge.
(redirect_edge_succ): Call execute_on_growing_pred and
execute_on_shrinking_pred.
* cfghooks.c (execute_on_growing_pred): New.
(execute_on_shrinking_pred): Likewise.
* cfghooks.h (cfg_hooks): Add execute_on_growing_pred and
execute_on_shrinking_pred.
Add prototypes for execute_on_growing_pred and
execute_on_shrinking_pred.
* cfgrtl.c (rtl_cfg_hooks): Add NULL hooks to
execute_on_growing_pred and execute_on_shrinking_pred.
(cfg_layout_rtl_cfg_hook): Likewise.
* tree-cfg.c (tree_cfg_hooks): Likewise.
From-SVN: r91035
Diffstat (limited to 'gcc/cfg.c')
-rw-r--r-- | gcc/cfg.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -277,6 +277,8 @@ unchecked_make_edge (basic_block src, basic_block dst, int flags) e->flags = flags; e->dest_idx = EDGE_COUNT (dst->preds) - 1; + execute_on_growing_pred (e); + return e; } @@ -358,6 +360,8 @@ remove_edge (edge e) bool found = false; edge_iterator ei; + execute_on_shrinking_pred (e); + src = e->src; dest = e->dest; dest_idx = e->dest_idx; @@ -394,6 +398,8 @@ redirect_edge_succ (edge e, basic_block new_succ) basic_block dest = e->dest; unsigned int dest_idx = e->dest_idx; + execute_on_shrinking_pred (e); + VEC_unordered_remove (edge, dest->preds, dest_idx); /* If we removed an edge in the middle of the edge vector, we need @@ -405,6 +411,7 @@ redirect_edge_succ (edge e, basic_block new_succ) VEC_safe_push (edge, new_succ->preds, e); e->dest = new_succ; e->dest_idx = EDGE_COUNT (new_succ->preds) - 1; + execute_on_growing_pred (e); } /* Like previous but avoid possible duplicate edge. */ |