diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-28 21:37:35 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-07-28 21:37:35 +0000 |
commit | eb42964415d14caa18dcc2eca05f04af547fd58f (patch) | |
tree | 9dcbd6f10eb7084accad68aa621c0f3eb6a081d1 /gcc/bb-reorder.c | |
parent | 0dbe40e076463c44e7d824f2eb3a2c63c9e32ab8 (diff) | |
download | gcc-eb42964415d14caa18dcc2eca05f04af547fd58f.tar.gz |
* basic-block.h (EDGE_FREQUENCY): New macro.
* bb-reorder (fixup_reorder_chain): Set counts and frequencies
for new BB/edges.
* flow.c (find_sub_basic_blocks): Likewise.
(try_crossjump_to_edge): Likewise; use EDGE_FREQUENCY
(redirect_edge_and_branch): Use EDGE_FREQUENCY.
* predict.c (DEF_PREDICTOR): New argument FLAGS.
(HITRATE): New macro.
(PRED_FLAG_FIRST_MATCH): New constant.
(predictor_info): New field flgags.
(combine_predictions_for_insn): Use DS theory to combine
probabilities; set the edge probabilities when finished.
(estimate_probability): Avoid duplicated matches
of LOOP_BRANCH heuristics for nested loops; update comment.
* predict.def: Add flags for each prediction, set probabilities
according to B&L paper.
* predict.h (DEF_PREDICTOR): New argument FLAGS.
* profile.c (compute_branch_probabilities): Cleanup way the edge
probabilities are computed and REG_BR_PROB notes are dropped; if
values does not match, emit error.
(init_branch_prob): Do error instead of warning when profile driven
feedback is missing or corrupt.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44439 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/bb-reorder.c')
-rw-r--r-- | gcc/bb-reorder.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index e1b341755b1..ffbc4506764 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -719,6 +719,8 @@ fixup_reorder_chain () nb->global_live_at_start = OBSTACK_ALLOC_REG_SET (&flow_obstack); nb->global_live_at_end = OBSTACK_ALLOC_REG_SET (&flow_obstack); nb->local_set = 0; + nb->count = e_fall->count; + nb->frequency = EDGE_FREQUENCY (e_fall); COPY_REG_SET (nb->global_live_at_start, bb->global_live_at_start); COPY_REG_SET (nb->global_live_at_end, bb->global_live_at_start); @@ -735,6 +737,8 @@ fixup_reorder_chain () /* Link to new block. */ make_edge (NULL, nb, e_fall->dest, 0); redirect_edge_succ (e_fall, nb); + nb->succ->count = e_fall->count; + nb->succ->probability = REG_BR_PROB_BASE; /* Don't process this new block. */ bb = nb; |