tree-ssa-threadedge.c (thread_across_edge): Record entire path when not threading through a joiner block.
* 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. From-SVN: r202232
This commit is contained in:
parent
ae84e151dd
commit
3b18bc426a
|
@ -1,3 +1,13 @@
|
||||||
|
2013-09-03 Jeff Law <law@redhat.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2013-08-29 Xinliang David Li <davidxl@google.com>
|
2013-08-29 Xinliang David Li <davidxl@google.com>
|
||||||
|
|
||||||
* tree-vect-data-refs.c (vect_compute_data_ref_alignment):
|
* tree-vect-data-refs.c (vect_compute_data_ref_alignment):
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2013-09-03 Jeff Law <law@redhat.com>
|
||||||
|
|
||||||
|
* tree-ssa/ssa-dom-thread-3.c: Update due to changes in debug
|
||||||
|
dump output.
|
||||||
|
|
||||||
2013-09-03 Meador Inge <meadori@codesourcery.com>
|
2013-09-03 Meador Inge <meadori@codesourcery.com>
|
||||||
|
|
||||||
Revert:
|
Revert:
|
||||||
|
|
|
@ -43,6 +43,5 @@ expand_one_var (tree var, unsigned char toplevel, unsigned char really_expand)
|
||||||
}
|
}
|
||||||
/* We should thread the jump, through an intermediate block. */
|
/* We should thread the jump, through an intermediate block. */
|
||||||
/* { dg-final { scan-tree-dump-times "Threaded" 1 "dom1"} } */
|
/* { dg-final { scan-tree-dump-times "Threaded" 1 "dom1"} } */
|
||||||
/* { dg-final { scan-tree-dump-times "one or more intermediate" 1 "dom1"} } */
|
/* { dg-final { scan-tree-dump-times "Registering jump thread .through joiner block.: \\(.*\\); \\(.*\\); \\(.*\\);" 1 "dom1"} } */
|
||||||
/* { dg-final { cleanup-tree-dump "dom1" } } */
|
|
||||||
|
|
||||||
|
|
|
@ -749,7 +749,7 @@ bool may_be_nonaddressable_p (tree expr);
|
||||||
|
|
||||||
/* In tree-ssa-threadupdate.c. */
|
/* In tree-ssa-threadupdate.c. */
|
||||||
extern bool thread_through_all_blocks (bool);
|
extern bool thread_through_all_blocks (bool);
|
||||||
extern void register_jump_thread (vec<edge>);
|
extern void register_jump_thread (vec<edge>, bool);
|
||||||
|
|
||||||
/* In gimplify.c */
|
/* In gimplify.c */
|
||||||
tree force_gimple_operand_1 (tree, gimple_seq *, gimple_predicate, tree);
|
tree force_gimple_operand_1 (tree, gimple_seq *, gimple_predicate, tree);
|
||||||
|
|
|
@ -901,6 +901,10 @@ thread_across_edge (gimple dummy_cond,
|
||||||
if (dest == e->dest)
|
if (dest == e->dest)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
vec<edge> path = vNULL;
|
||||||
|
path.safe_push (e);
|
||||||
|
path.safe_push (taken_edge);
|
||||||
|
|
||||||
/* DEST could be null for a computed jump to an absolute
|
/* DEST could be null for a computed jump to an absolute
|
||||||
address. If DEST is not null, then see if we can thread
|
address. If DEST is not null, then see if we can thread
|
||||||
through it as well, this helps capture secondary effects
|
through it as well, this helps capture secondary effects
|
||||||
|
@ -922,7 +926,10 @@ thread_across_edge (gimple dummy_cond,
|
||||||
simplify,
|
simplify,
|
||||||
visited);
|
visited);
|
||||||
if (e2)
|
if (e2)
|
||||||
taken_edge = e2;
|
{
|
||||||
|
taken_edge = e2;
|
||||||
|
path.safe_push (e2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
while (e2);
|
while (e2);
|
||||||
BITMAP_FREE (visited);
|
BITMAP_FREE (visited);
|
||||||
|
@ -931,13 +938,10 @@ thread_across_edge (gimple dummy_cond,
|
||||||
remove_temporary_equivalences (stack);
|
remove_temporary_equivalences (stack);
|
||||||
if (taken_edge)
|
if (taken_edge)
|
||||||
{
|
{
|
||||||
vec<edge> path = vNULL;
|
|
||||||
propagate_threaded_block_debug_into (taken_edge->dest, e->dest);
|
propagate_threaded_block_debug_into (taken_edge->dest, e->dest);
|
||||||
path.safe_push (e);
|
register_jump_thread (path, false);
|
||||||
path.safe_push (taken_edge);
|
|
||||||
register_jump_thread (path);
|
|
||||||
path.release ();
|
|
||||||
}
|
}
|
||||||
|
path.release ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1009,7 +1013,7 @@ thread_across_edge (gimple dummy_cond,
|
||||||
{
|
{
|
||||||
propagate_threaded_block_debug_into (e3->dest,
|
propagate_threaded_block_debug_into (e3->dest,
|
||||||
taken_edge->dest);
|
taken_edge->dest);
|
||||||
register_jump_thread (path);
|
register_jump_thread (path, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1303,7 +1303,7 @@ thread_through_all_blocks (bool may_peel_loop_headers)
|
||||||
after fixing the SSA graph. */
|
after fixing the SSA graph. */
|
||||||
|
|
||||||
void
|
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
|
/* Convert PATH into 3 edge representation we've been using. This
|
||||||
is temporary until we convert this file to use a path representation
|
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 e2 = path[1];
|
||||||
edge e3;
|
edge e3;
|
||||||
|
|
||||||
if (path.length () <= 2)
|
if (!through_joiner)
|
||||||
e3 = NULL;
|
e3 = NULL;
|
||||||
else
|
else
|
||||||
e3 = path[path.length () - 1];
|
e3 = path[path.length () - 1];
|
||||||
|
@ -1322,14 +1322,23 @@ register_jump_thread (vec<edge> path)
|
||||||
if (e2 == NULL)
|
if (e2 == NULL)
|
||||||
return;
|
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 ())
|
if (!threaded_edges.exists ())
|
||||||
threaded_edges.create (15);
|
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 (e);
|
||||||
threaded_edges.safe_push (e2);
|
threaded_edges.safe_push (e2);
|
||||||
threaded_edges.safe_push (e3);
|
threaded_edges.safe_push (e3);
|
||||||
|
|
Loading…
Reference in New Issue