Commit 01ccc98e by Jeff Law Committed by Jeff Law

tree-ssa-threadupdate.c (thread_through_loop_header): Do not thread through a…

tree-ssa-threadupdate.c (thread_through_loop_header): Do not thread through a joiner which has the latch edge.

	* tree-ssa-threadupdate.c (thread_through_loop_header):  Do not
	thread through a joiner which has the latch edge.

From-SVN: r205003
parent 41674b9f
2013-11-19 Jeff Law <law@redhat.com>
* tree-ssa-threadupdate.c (thread_through_loop_header): Do not
thread through a joiner which has the latch edge.
2013-11-19 Jan Hubicka <jh@suse.cz> 2013-11-19 Jan Hubicka <jh@suse.cz>
* md.texi (setmem): Document new parameter. * md.texi (setmem): Document new parameter.
...@@ -1060,11 +1060,22 @@ thread_through_loop_header (struct loop *loop, bool may_peel_loop_headers) ...@@ -1060,11 +1060,22 @@ thread_through_loop_header (struct loop *loop, bool may_peel_loop_headers)
if (single_succ_p (header)) if (single_succ_p (header))
goto fail; goto fail;
/* If we threaded the latch using a joiner block, we cancel the
threading opportunity out of an abundance of caution. However,
still allow threading from outside to inside the loop. */
if (latch->aux) if (latch->aux)
{ {
vec<jump_thread_edge *> *path = THREAD_PATH (latch); vec<jump_thread_edge *> *path = THREAD_PATH (latch);
if ((*path)[1]->type == EDGE_COPY_SRC_JOINER_BLOCK) if ((*path)[1]->type == EDGE_COPY_SRC_JOINER_BLOCK)
goto fail; {
delete_jump_thread_path (path);
latch->aux = NULL;
}
}
if (latch->aux)
{
vec<jump_thread_edge *> *path = THREAD_PATH (latch);
tgt_edge = (*path)[1]->e; tgt_edge = (*path)[1]->e;
tgt_bb = tgt_edge->dest; tgt_bb = tgt_edge->dest;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment