aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadedge.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2013-08-21 13:27:54 -0600
committerJeff Law <law@gcc.gnu.org>2013-08-21 13:27:54 -0600
commitb9ebee5df98aca4621079f59b5d5c02d77dcd35c (patch)
tree4225e20823f7e82dcca3f6afa1fa3a57b48db792 /gcc/tree-ssa-threadedge.c
parent98cf9ac919f9901c024e6a8e14096610beb7f7ea (diff)
downloadgcc-b9ebee5df98aca4621079f59b5d5c02d77dcd35c.zip
gcc-b9ebee5df98aca4621079f59b5d5c02d77dcd35c.tar.gz
gcc-b9ebee5df98aca4621079f59b5d5c02d77dcd35c.tar.bz2
tree-flow.h (register_jump_thread): Pass vector of edges instead of each important edge.
* tree-flow.h (register_jump_thread): Pass vector of edges instead of each important edge. * tree-ssa-threadedge.c (thread_across_edge): Build the jump thread path into a vector and pass that to register_jump_thread. * tree-ssa-threadupdate.c (register_jump_thread): Conver the passed in edge vector to the current 3-edge form. From-SVN: r201907
Diffstat (limited to 'gcc/tree-ssa-threadedge.c')
-rw-r--r--gcc/tree-ssa-threadedge.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c
index 357b671..320dec5 100644
--- a/gcc/tree-ssa-threadedge.c
+++ b/gcc/tree-ssa-threadedge.c
@@ -937,10 +937,15 @@ thread_across_edge (gimple dummy_cond,
}
remove_temporary_equivalences (stack);
- if (!taken_edge)
- return;
- propagate_threaded_block_debug_into (taken_edge->dest, e->dest);
- register_jump_thread (e, taken_edge, NULL);
+ if (taken_edge)
+ {
+ vec<edge> path = vNULL;
+ propagate_threaded_block_debug_into (taken_edge->dest, e->dest);
+ path.safe_push (e);
+ path.safe_push (taken_edge);
+ register_jump_thread (path);
+ path.release ();
+ }
return;
}
}
@@ -969,9 +974,12 @@ thread_across_edge (gimple dummy_cond,
bitmap_clear (visited);
bitmap_set_bit (visited, taken_edge->dest->index);
bitmap_set_bit (visited, e->dest->index);
+ vec<edge> path = vNULL;
/* Record whether or not we were able to thread through a successor
of E->dest. */
+ path.safe_push (e);
+ path.safe_push (taken_edge);
found = false;
e3 = taken_edge;
do
@@ -988,6 +996,7 @@ thread_across_edge (gimple dummy_cond,
if (e2)
{
+ path.safe_push (e2);
e3 = e2;
found = true;
}
@@ -1008,10 +1017,11 @@ thread_across_edge (gimple dummy_cond,
{
propagate_threaded_block_debug_into (e3->dest,
taken_edge->dest);
- register_jump_thread (e, taken_edge, e3);
+ register_jump_thread (path);
}
}
+ path.release();
}
BITMAP_FREE (visited);
}