summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadupdate.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-03 20:43:46 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2013-09-03 20:43:46 +0000
commit631d940c80b318d435d498744950dc1eeacafeaa (patch)
treea84c9f73b9de44d8f8421f514d4b08f7eefa96d7 /gcc/tree-ssa-threadupdate.c
parent807a87f926c2c2128e5e854c9fb46b18361f5c77 (diff)
downloadgcc-631d940c80b318d435d498744950dc1eeacafeaa.tar.gz
* tree-ssa-threadedge.c (thread_across_edge): Record entire path
when not threading through a joiner block. Pass joiner/no joiner state to register_jump_thread. * tree-ssa-threadupdate.c (register_jump_thread): Get joiner/no joiner state from argument rather than implying on path length. Dump the entire jump thread path into debugging dump. * tree-flow.h (register_jump_thread): Update prototype. * tree-ssa/ssa-dom-thread-3.c: Update due to changes in debug dump output. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202232 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r--gcc/tree-ssa-threadupdate.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index 8a872a3f9f7..8e40f6668cf 100644
--- a/gcc/tree-ssa-threadupdate.c
+++ b/gcc/tree-ssa-threadupdate.c
@@ -1303,7 +1303,7 @@ thread_through_all_blocks (bool may_peel_loop_headers)
after fixing the SSA graph. */
void
-register_jump_thread (vec<edge> path)
+register_jump_thread (vec<edge> path, bool through_joiner)
{
/* Convert PATH into 3 edge representation we've been using. This
is temporary until we convert this file to use a path representation
@@ -1312,7 +1312,7 @@ register_jump_thread (vec<edge> path)
edge e2 = path[1];
edge e3;
- if (path.length () <= 2)
+ if (!through_joiner)
e3 = NULL;
else
e3 = path[path.length () - 1];
@@ -1322,14 +1322,23 @@ register_jump_thread (vec<edge> path)
if (e2 == NULL)
return;
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ unsigned int i;
+
+ fprintf (dump_file,
+ " Registering jump thread %s:",
+ through_joiner ? "(through joiner block)" : "");
+
+ for (i = 0; i < path.length (); i++)
+ fprintf (dump_file, " (%d, %d); ",
+ path[i]->src->index, path[i]->dest->index);
+ fputc ('\n', dump_file);
+ }
+
if (!threaded_edges.exists ())
threaded_edges.create (15);
- if (dump_file && (dump_flags & TDF_DETAILS)
- && e->dest != e2->src)
- fprintf (dump_file,
- " Registering jump thread around one or more intermediate blocks\n");
-
threaded_edges.safe_push (e);
threaded_edges.safe_push (e2);
threaded_edges.safe_push (e3);