aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadupdate.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2012-10-12 22:38:19 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2012-10-12 20:38:19 +0000
commit535269f4f984e10f912283b2817ec86f0004e442 (patch)
tree538b2f557aad7f31543b71fd37f642ef0b2cdef1 /gcc/tree-ssa-threadupdate.c
parent46042c015e2827a82487956b0f50995e4fb80dc4 (diff)
downloadgcc-535269f4f984e10f912283b2817ec86f0004e442.zip
gcc-535269f4f984e10f912283b2817ec86f0004e442.tar.gz
gcc-535269f4f984e10f912283b2817ec86f0004e442.tar.bz2
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
Diffstat (limited to 'gcc/tree-ssa-threadupdate.c')
-rw-r--r--gcc/tree-ssa-threadupdate.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/tree-ssa-threadupdate.c b/gcc/tree-ssa-threadupdate.c
index 2eee50e..ad64876 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.