From: Jan Hubicka Date: Fri, 12 Oct 2012 20:38:19 +0000 (+0200) Subject: tree-ssa-threadupdate.c (def_split_header_continue_p): Do not escape the loop. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=535269f4f984e10f912283b2817ec86f0004e442;p=gcc.git tree-ssa-threadupdate.c (def_split_header_continue_p): Do not escape the loop. * tree-ssa-threadupdate.c (def_split_header_continue_p): Do not escape the loop. From-SVN: r192414 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f628e709a85..8ece083d1cd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-10-12 Jan Hubicka + + * tree-ssa-threadupdate.c (def_split_header_continue_p): Do not + escape the loop. + 2012-10-12 Jan Hubicka * web.c (web_main): Do not set DF_RD_PRUNE_DEAD_DEFS flag. diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c index 2eee50ee1d6..ad64876c339 100644 --- a/gcc/tree-ssa-threadupdate.c +++ b/gcc/tree-ssa-threadupdate.c @@ -846,9 +846,15 @@ static bool def_split_header_continue_p (const_basic_block bb, const void *data) { const_basic_block new_header = (const_basic_block) data; - return (bb != new_header - && (loop_depth (bb->loop_father) - >= loop_depth (new_header->loop_father))); + const struct loop *l; + + if (bb == new_header + || loop_depth (bb->loop_father) < loop_depth (new_header->loop_father)) + return false; + for (l = bb->loop_father; l; l = loop_outer (l)) + if (l == new_header->loop_father) + return true; + return false; } /* Thread jumps through the header of LOOP. Returns true if cfg changes.