aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadedge.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2013-11-19 18:55:17 -0700
committerJeff Law <law@gcc.gnu.org>2013-11-19 18:55:17 -0700
commit5f51d006610d5d74bda8f3f35eaba7ce8c0e90f1 (patch)
tree0201b6c20a42aa103d18e98486e543f4c3d753fa /gcc/tree-ssa-threadedge.c
parent2ed4d7ee3cc50b3ff1fd80eee9152450c0a37711 (diff)
downloadgcc-5f51d006610d5d74bda8f3f35eaba7ce8c0e90f1.zip
gcc-5f51d006610d5d74bda8f3f35eaba7ce8c0e90f1.tar.gz
gcc-5f51d006610d5d74bda8f3f35eaba7ce8c0e90f1.tar.bz2
tree-ssa-threadedge.c (thread_across_edge): After threading through a joiner...
* tree-ssa-threadedge.c (thread_across_edge): After threading through a joiner, allow threading a normal block requiring duplication. * tree-ssa-threadupdate.c (thread_block_1): Improve code to detect jump threading requests that would muck up the loop structures. From-SVN: r205074
Diffstat (limited to 'gcc/tree-ssa-threadedge.c')
-rw-r--r--gcc/tree-ssa-threadedge.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c
index b90ff23..7bb8829 100644
--- a/gcc/tree-ssa-threadedge.c
+++ b/gcc/tree-ssa-threadedge.c
@@ -1098,6 +1098,14 @@ thread_across_edge (gimple dummy_cond,
path,
&backedge_seen);
+ if (!found
+ && (!backedge_seen
+ || ! cond_arg_set_in_bb (path->last ()->e, e->dest)))
+ found = thread_through_normal_block (path->last ()->e, dummy_cond,
+ handle_dominating_asserts,
+ stack, simplify, path, visited,
+ &backedge_seen);
+
/* If we were able to thread through a successor of E->dest, then
record the jump threading opportunity. */
if (found)