aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadupdate.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-threadupdate.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-threadupdate.c')
-rw-r--r--gcc/tree-ssa-threadupdate.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index 0e4cbc9..e84542c 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -1264,8 +1264,19 @@ thread_through_all_blocks (bool may_peel_loop_headers)
after fixing the SSA graph. */
void
-register_jump_thread (edge e, edge e2, edge e3)
+register_jump_thread (vec<edge> path)
{
+ /* Convert PATH into 3 edge representation we've been using. This
+ is temporary until we convert this file to use a path representation
+ throughout. */
+ edge e = path[0];
+ edge e2 = path[1];
+
+ if (path.length () <= 2)
+ e3 = NULL;
+ else
+ e3 = path[path.length () - 1];
+
/* This can occur if we're jumping to a constant address or
or something similar. Just get out now. */
if (e2 == NULL)