summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadupdate.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-07 22:05:37 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2007-11-07 22:05:37 +0000
commit8c09e55ed3b53099afaff01c5d1f336ddb32cc80 (patch)
tree3b09819b82398b3577c387dc732255b7f014c8d4 /gcc/tree-ssa-threadupdate.c
parenteeb0ae2330c278624a09d903512153cef5cab34d (diff)
downloadgcc-8c09e55ed3b53099afaff01c5d1f336ddb32cc80.tar.gz
PR rtl-optimization/33737
* cfgcleanup.c (try_crossjump_to_edge): Add count and frequency of target block after computing the probabilities of outgoing edges. Cap the frequency to BB_FREQ_MAX. * tree-ssa-threadupdate.c (redirect_edges): Also adjust count and frequency of the basic block if it has been reused. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129973 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r--gcc/tree-ssa-threadupdate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index 1d5500fe018..fe3876ec332 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -442,10 +442,14 @@ redirect_edges (void **slot, void *data)
remove_ctrl_stmt_and_useless_edges (local_info->bb,
rd->outgoing_edge->dest);
- /* And fixup the flags on the single remaining edge. */
+ /* Fixup the flags on the single remaining edge. */
single_succ_edge (local_info->bb)->flags
&= ~(EDGE_TRUE_VALUE | EDGE_FALSE_VALUE | EDGE_ABNORMAL);
single_succ_edge (local_info->bb)->flags |= EDGE_FALLTHRU;
+
+ /* And adjust count and frequency on BB. */
+ local_info->bb->count = e->count;
+ local_info->bb->frequency = EDGE_FREQUENCY (e);
}
}