diff options
author | Martin Liska <mliska@suse.cz> | 2017-06-21 14:52:14 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2017-06-21 12:52:14 +0000 |
commit | 93c18375823fdd0e384f673f75e39136719135dd (patch) | |
tree | d25acabcbf72c143c997ccd8e7b212c5930584ad /gcc/predict.c | |
parent | e59a1c22fb249388e82b4fd004f33615abe36d2e (diff) | |
download | gcc-93c18375823fdd0e384f673f75e39136719135dd.zip gcc-93c18375823fdd0e384f673f75e39136719135dd.tar.gz gcc-93c18375823fdd0e384f673f75e39136719135dd.tar.bz2 |
Rework cold and hot label attributes in predict.c.
2017-06-21 Martin Liska <mliska@suse.cz>
* gimplify.c (gimplify_label_expr): Insert GIMPLE_PREDICT
statements on cold and hot labels.
* predict.c (tree_estimate_probability_bb): Remove the
prediction from this place.
2017-06-21 Martin Liska <mliska@suse.cz>
* gcc.dg/tree-ssa/attr-hotcold-2.c: Update scanned patterns.
From-SVN: r249451
Diffstat (limited to 'gcc/predict.c')
-rw-r--r-- | gcc/predict.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/gcc/predict.c b/gcc/predict.c index 790be9f..44151bc 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -2742,29 +2742,6 @@ tree_estimate_probability_bb (basic_block bb, bool local_only) FOR_EACH_EDGE (e, ei, bb->succs) { - /* Predict edges to user labels with attributes. */ - if (e->dest != EXIT_BLOCK_PTR_FOR_FN (cfun)) - { - gimple_stmt_iterator gi; - for (gi = gsi_start_bb (e->dest); !gsi_end_p (gi); gsi_next (&gi)) - { - glabel *label_stmt = dyn_cast <glabel *> (gsi_stmt (gi)); - tree decl; - - if (!label_stmt) - break; - decl = gimple_label_label (label_stmt); - if (DECL_ARTIFICIAL (decl)) - continue; - - /* Finally, we have a user-defined label. */ - if (lookup_attribute ("cold", DECL_ATTRIBUTES (decl))) - predict_edge_def (e, PRED_COLD_LABEL, NOT_TAKEN); - else if (lookup_attribute ("hot", DECL_ATTRIBUTES (decl))) - predict_edge_def (e, PRED_HOT_LABEL, TAKEN); - } - } - /* Look for block we are guarding (ie we dominate it, but it doesn't postdominate us). */ if (e->dest != EXIT_BLOCK_PTR_FOR_FN (cfun) && e->dest != bb |