summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadedge.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-20 01:55:17 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-20 01:55:17 +0000
commit559685be4a8347f674bded686bb06270e948083c (patch)
tree0201b6c20a42aa103d18e98486e543f4c3d753fa /gcc/tree-ssa-threadedge.c
parent1b83778e6779c3acc3ef62cc5d5e2ab61dc5a68c (diff)
downloadgcc-559685be4a8347f674bded686bb06270e948083c.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@205074 138bc75d-0d04-0410-961f-82ee72b054a4
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 b90ff23af5d..7bb8829e5cc 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)