diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2017-02-05 18:16:52 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2017-02-05 17:16:52 +0000 |
commit | 5d3ebb71cbf9c6ed0ce04230a387485fa57e71ed (patch) | |
tree | 6a1953407e98b13d0d2602cd0d7e48943219acd8 /gcc/tree-if-conv.c | |
parent | e6b07173d2cb671f6726bf1d00e08b107391fb5c (diff) | |
download | gcc-5d3ebb71cbf9c6ed0ce04230a387485fa57e71ed.zip gcc-5d3ebb71cbf9c6ed0ce04230a387485fa57e71ed.tar.gz gcc-5d3ebb71cbf9c6ed0ce04230a387485fa57e71ed.tar.bz2 |
re PR tree-optimization/79347 (vect_do_peeling is messing up profile)
PR tree-ssa/79347
* cfgloopmanip.c (lv_adjust_loop_entry_edge, loop_version): Add
ELSE_PROB.
* cfgloopmanip.h (loop_version): Update prototype.
* modulo-sched.c (sms_schedule): Update call of loop_version.
* tree-if-conv.c(version_loop_for_if_conversion): Likewise.
* tree-parloops.c (gen_parallel_loop): Likewise.
* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Likewise.
* tree-ssa-loop-split.c (split_loop): Likewise.
* tree-ssa-loop-unswitch.c (tree_unswitch_loop): Likewise.
* tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
* gcc.dg/tree-ssa/ifc-10.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-11.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-12.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-20040816-1.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-20040816-2.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-5.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-8.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-9.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-cd.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-pr56541.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-pr68583.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-pr69489-1.c: Match for profile mismatches.
* gcc.dg/tree-ssa/ifc-pr69489-2.c: Match for profile mismatches.
From-SVN: r245196
Diffstat (limited to 'gcc/tree-if-conv.c')
-rw-r--r-- | gcc/tree-if-conv.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index c12987e..eb63795 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -2533,7 +2533,11 @@ combine_blocks (struct loop *loop) will be if-converted, the new copy of the loop will not, and the LOOP_VECTORIZED internal call will be guarding which loop to execute. The vectorizer pass will fold this - internal call into either true or false. */ + internal call into either true or false. + + Note that this function intentionally invalidates profile. Both edges + out of LOOP_VECTORIZED must have 100% probability so the profile remains + consistent after the condition is folded in the vectorizer. */ static struct loop * version_loop_for_if_conversion (struct loop *loop) @@ -2557,9 +2561,11 @@ version_loop_for_if_conversion (struct loop *loop) saved_preds[i] = ifc_bbs[i]->aux; initialize_original_copy_tables (); + /* At this point we invalidate porfile confistency until IFN_LOOP_VECTORIZED + is re-merged in the vectorizer. */ new_loop = loop_version (loop, cond, &cond_bb, REG_BR_PROB_BASE, REG_BR_PROB_BASE, - REG_BR_PROB_BASE, true); + REG_BR_PROB_BASE, REG_BR_PROB_BASE, true); free_original_copy_tables (); for (unsigned i = 0; i < save_length; i++) |