diff options
author | Jeff Law <law@redhat.com> | 2017-12-15 09:19:22 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2017-12-15 09:19:22 -0700 |
commit | 8f80d7345ab357fee866ab4e7891d38bf6da20cf (patch) | |
tree | 4959effaaa4a79ac3ab79c858e14d7a73f45177a /gcc | |
parent | 4849deb1a30681b31d51da7501c6432b12324593 (diff) | |
download | gcc-8f80d7345ab357fee866ab4e7891d38bf6da20cf.zip gcc-8f80d7345ab357fee866ab4e7891d38bf6da20cf.tar.gz gcc-8f80d7345ab357fee866ab4e7891d38bf6da20cf.tar.bz2 |
re PR tree-optimization/83410 (libgomp.graphite/force-parallel-4.c etc. FAIL)
PR tree-optimization/83410
* tree-ssa-threadupdate.c (thread_block_1): Avoid certain jump
threads when parallelizing loops.
From-SVN: r255700
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-ssa-threadupdate.c | 25 |
2 files changed, 31 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8830638..2d53e24 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-12-12 Jeff Law <law@redhat.com> + + PR tree-optimization/83410 + * tree-ssa-threadupdate.c (thread_block_1): Avoid certain jump + threads when parallelizing loops. + 2017-12-15 Jakub Jelinek <jakub@redhat.com> * tree-core.h (struct attribute_spec): Swap affects_type_identity and diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c index 045905e..63ad8f9 100644 --- a/gcc/tree-ssa-threadupdate.c +++ b/gcc/tree-ssa-threadupdate.c @@ -1333,6 +1333,31 @@ thread_block_1 (basic_block bb, bool noloop_only, bool joiners) if (i != path->length ()) continue; + + /* Loop parallelization can be confused by the result of + threading through the loop exit test back into the loop. + However, theading those jumps seems to help other codes. + + I have been unable to find anything related to the shape of + the CFG, the contents of the affected blocks, etc which would + allow a more sensible test than what we're using below which + merely avoids the optimization when parallelizing loops. */ + if (flag_tree_parallelize_loops > 1) + { + for (i = 1; i < path->length (); i++) + if (bb->loop_father == e2->src->loop_father + && loop_exits_from_bb_p (bb->loop_father, + (*path)[i]->e->src) + && !loop_exit_edge_p (bb->loop_father, e2)) + break; + + if (i != path->length ()) + { + delete_jump_thread_path (path); + e->aux = NULL; + continue; + } + } } /* Insert the outgoing edge into the hash table if it is not |