diff options
author | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-22 17:43:43 -0300 |
---|---|---|
committer | Giuliano Belinassi <giuliano.belinassi@usp.br> | 2020-08-22 17:43:43 -0300 |
commit | a926878ddbd5a98b272c22171ce58663fc04c3e0 (patch) | |
tree | 86af256e5d9a9c06263c00adc90e5fe348008c43 /gcc/tree-ssa-loop-split.c | |
parent | 542730f087133690b47e036dfd43eb0db8a650ce (diff) | |
parent | 07cbaed8ba7d1b6e4ab3a9f44175502a4e1ecdb1 (diff) | |
download | gcc-a926878ddbd5a98b272c22171ce58663fc04c3e0.zip gcc-a926878ddbd5a98b272c22171ce58663fc04c3e0.tar.gz gcc-a926878ddbd5a98b272c22171ce58663fc04c3e0.tar.bz2 |
Merge branch 'autopar_rebase2' into autopar_develdevel/autopar_devel
Quickly commit changes in the rebase branch.
Diffstat (limited to 'gcc/tree-ssa-loop-split.c')
-rw-r--r-- | gcc/tree-ssa-loop-split.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop-split.c b/gcc/tree-ssa-loop-split.c index 7de95b5..1eb6be5 100644 --- a/gcc/tree-ssa-loop-split.c +++ b/gcc/tree-ssa-loop-split.c @@ -1145,6 +1145,16 @@ stmt_semi_invariant_p_1 (struct loop *loop, gimple *stmt, if (gimple_bb (stmt) == loop->header) { + /* If the entry value is subject to abnormal coalescing + avoid the transform since we're going to duplicate the + loop header and thus likely introduce overlapping life-ranges + between the PHI def and the entry on the path when the + first loop is skipped. */ + tree entry_def + = PHI_ARG_DEF_FROM_EDGE (phi, loop_preheader_edge (loop)); + if (TREE_CODE (entry_def) == SSA_NAME + && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (entry_def)) + return false; invar = loop_iter_phi_semi_invariant_p (loop, phi, skip_head); return invar; } |