From 71b90bc33172c06d19cd7bfbdc6426e98e1aaf0a Mon Sep 17 00:00:00 2001 From: spop Date: Wed, 25 Nov 2009 05:03:58 +0000 Subject: [PATCH] 2009-10-14 Sebastian Pop * graphite-poly.c (loop_to_lst): Fix LST creation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154581 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog.graphite | 4 ++++ gcc/graphite-poly.c | 23 ++++++++++------------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite index 5d53275b157..e58bf045504 100644 --- a/gcc/ChangeLog.graphite +++ b/gcc/ChangeLog.graphite @@ -1,3 +1,7 @@ +2009-10-14 Sebastian Pop + + * graphite-poly.c (loop_to_lst): Fix LST creation. + 2009-10-14 Tobias Grosser * testsuite/gcc.dg/graphite/id-15.c: (8 * 8) replaced with diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c index 659839d28ed..63733371034 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); -- 2.11.0