summaryrefslogtreecommitdiff
path: root/gcc/graphite-scop-detection.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-25 19:29:43 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2011-08-25 19:29:43 +0000
commit46dfcc3ee85a4a02abce4d45ee619f240c116af6 (patch)
tree6c3dc3d53cd17d62447673b81abbcfc69bacd2f3 /gcc/graphite-scop-detection.c
parent2a8624373adc103f943e22e781c2d6fadb828eae (diff)
downloadgcc-46dfcc3ee85a4a02abce4d45ee619f240c116af6.tar.gz
2011-08-25 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 178073 using svnmerge. 2011-08-25 Basile Starynkevitch <basile@starynkevitch.net> * gcc/melt-runtime.c (melt_linemap_compute_current_location): Use the linemap_position_for_column function for GCC 4.7 when merging with GCC trunk rev 178073. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@178087 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-scop-detection.c')
-rw-r--r--gcc/graphite-scop-detection.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c
index 45c6c75ccea..346056899d3 100644
--- a/gcc/graphite-scop-detection.c
+++ b/gcc/graphite-scop-detection.c
@@ -378,17 +378,17 @@ harmful_stmt_in_bb (basic_block scop_entry, loop_p outer_loop, basic_block bb)
static bool
graphite_can_represent_loop (basic_block scop_entry, loop_p loop)
{
- tree niter = number_of_latch_executions (loop);
+ tree niter;
+ struct tree_niter_desc niter_desc;
- /* Number of iterations unknown. */
- if (chrec_contains_undetermined (niter))
- return false;
-
- /* Number of iterations not affine. */
- if (!graphite_can_represent_expr (scop_entry, loop, niter))
- return false;
+ /* FIXME: For the moment, graphite cannot be used on loops that
+ iterate using induction variables that wrap. */
- return true;
+ return number_of_iterations_exit (loop, single_exit (loop), &niter_desc, false)
+ && niter_desc.control.no_overflow
+ && (niter = number_of_latch_executions (loop))
+ && !chrec_contains_undetermined (niter)
+ && graphite_can_represent_expr (scop_entry, loop, niter);
}
/* Store information needed by scopdet_* functions. */