aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2008-06-05 00:00:42 +0000
committerSebastian Pop <sebastian.pop@amd.com>2008-06-05 00:00:42 +0000
commitd246705a0382aa6e8186cb2f7217ed85d0e09b57 (patch)
treecbca2ced9b8b804d9f67a08fe46ee25a1ef92e7d
parentccb7d1a46f40ee10d73f2579e705ddab9915d3a1 (diff)
2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
* graphite.h (scop_contains_loop): Update comments to match the actual behavior. (scop_contains_loop): New. * graphite.c (schedule_to_scattering): Use scop_contains_loop. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/graphite@136379 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog.graphite7
-rw-r--r--gcc/graphite.c4
-rw-r--r--gcc/graphite.h13
3 files changed, 19 insertions, 5 deletions
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index 052e8872bf4b..d7ea5091868f 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,3 +1,10 @@
+2008-06-04 Tobias Grosser <grosser@fim.uni-passau.de>
+
+ * graphite.h (scop_contains_loop): Update comments to match
+ the actual behavior.
+ (scop_contains_loop): New.
+ * graphite.c (schedule_to_scattering): Use scop_contains_loop.
+
2008-06-04 Sebastian Pop <sebastian.pop@amd.com>
* graphite.c (get_bb_type): On function body, i.e. loop_0,
diff --git a/gcc/graphite.c b/gcc/graphite.c
index 7866e943c602..2ca15e346706 100644
--- a/gcc/graphite.c
+++ b/gcc/graphite.c
@@ -1789,7 +1789,7 @@ schedule_to_scattering (graphite_bb_p gb)
loop = gbb_loop (gb);
if (!loop
- || !bitmap_bit_p (SCOP_LOOPS (scop), loop->num)
+ || scop_contains_loop (scop, loop)
|| loop->num == 0)
return scat;
@@ -1807,7 +1807,7 @@ schedule_to_scattering (graphite_bb_p gb)
loop = loop_outer (loop);
if (!loop
- || !bitmap_bit_p (SCOP_LOOPS (scop), loop->num)
+ || scop_contains_loop (scop, loop)
|| loop->num == 0)
break;
}
diff --git a/gcc/graphite.h b/gcc/graphite.h
index 3bf3326302d4..7f6ed573888c 100644
--- a/gcc/graphite.h
+++ b/gcc/graphite.h
@@ -199,8 +199,7 @@ loop_iteration_vector_dim (unsigned int loop_num, scop_p scop)
return loop_domain_dim (loop_num, scop) - 2 - nb_params_in_scop (scop);
}
-/* Returns the index of LOOP in the domain matrix for the SCOP.
- Returns -1 when the loop does not belong to the SCOP. */
+/* Returns the index of LOOP in the domain matrix for the SCOP. */
static inline int
scop_loop_index (scop_p scop, struct loop *loop)
@@ -214,7 +213,15 @@ scop_loop_index (scop_p scop, struct loop *loop)
if (l == loop)
return i;
- return -1;
+ gcc_unreachable();
+}
+
+/* Checks, if SCOP contains LOOP. */
+
+static inline bool
+scop_contains_loop (scop_p scop, struct loop *loop)
+{
+ return bitmap_bit_p (SCOP_LOOPS (scop), loop->num);
}
/* Associate a POLYHEDRON dependence description to two data