diff options
author | Sebastian Pop <sebastian.pop@amd.com> | 2009-11-25 05:03:58 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2009-11-25 05:03:58 +0000 |
commit | c0fe753b7d0ea84ffb3bc0f45612cfa965037faa (patch) | |
tree | 6a600321a4aff7f2d919d4443fc40bcfc79c34e1 /gcc/graphite-poly.c | |
parent | 8d75ec872b04053bc814dccbf5b985406a33a9a5 (diff) | |
download | gcc-c0fe753b7d0ea84ffb3bc0f45612cfa965037faa.zip gcc-c0fe753b7d0ea84ffb3bc0f45612cfa965037faa.tar.gz gcc-c0fe753b7d0ea84ffb3bc0f45612cfa965037faa.tar.bz2 |
graphite-poly.c (loop_to_lst): Fix LST creation.
2009-10-14 Sebastian Pop <sebastian.pop@amd.com>
* graphite-poly.c (loop_to_lst): Fix LST creation.
From-SVN: r154581
Diffstat (limited to 'gcc/graphite-poly.c')
-rw-r--r-- | gcc/graphite-poly.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c index 659839d..6373337 100644 --- a/gcc/graphite-poly.c +++ b/gcc/graphite-poly.c @@ -834,22 +834,19 @@ loop_to_lst (loop_p loop, VEC (poly_bb_p, heap) *bbs, int *i) if (bb->loop_father == loop) stmt = new_lst_stmt (pbb); - else + else if (flow_bb_inside_loop_p (loop, bb)) { - if (flow_bb_inside_loop_p (loop, bb)) - stmt = loop_to_lst (loop->inner, bbs, i); - else - { - loop_p next = loop; + loop_p next = loop->inner; - while ((next = next->next) - && !flow_bb_inside_loop_p (next, bb)); + while (next && !flow_bb_inside_loop_p (next, bb)) + next = next->next; - if (!next) - return new_lst_loop (seq); - - stmt = loop_to_lst (next, bbs, i); - } + stmt = loop_to_lst (next, bbs, i); + } + else + { + (*i)--; + return new_lst_loop (seq); } VEC_safe_push (lst_p, heap, seq, stmt); |