aboutsummaryrefslogtreecommitdiff
path: root/gcc/graphite-clast-to-gimple.h
diff options
context:
space:
mode:
authorLi Feng <nemokingdom@gmail.com>2009-11-25 05:24:43 +0000
committerSebastian Pop <spop@gcc.gnu.org>2009-11-25 05:24:43 +0000
commita7ed27aca8d66e927c33e0338818210ffa866828 (patch)
treee63e0093ba560368a701634c0bcca4eef54db483 /gcc/graphite-clast-to-gimple.h
parent8e6ef139122f2f2209b7cde869b36de3f68dc82f (diff)
downloadgcc-a7ed27aca8d66e927c33e0338818210ffa866828.zip
gcc-a7ed27aca8d66e927c33e0338818210ffa866828.tar.gz
gcc-a7ed27aca8d66e927c33e0338818210ffa866828.tar.bz2
graphite-clast-to-gimple.c (get_stmtfor_depth): Removed.
2009-10-20 Li Feng <nemokingdom@gmail.com> * graphite-clast-to-gimple.c (get_stmtfor_depth): Removed. (translate_clast): Pass an extra parameter LEVEL. Call get_scattering_level. * graphite-clast-to-gimple.h (get_scattering_level): New. From-SVN: r154625
Diffstat (limited to 'gcc/graphite-clast-to-gimple.h')
-rw-r--r--gcc/graphite-clast-to-gimple.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/graphite-clast-to-gimple.h b/gcc/graphite-clast-to-gimple.h
index 3f25872..cbbf875 100644
--- a/gcc/graphite-clast-to-gimple.h
+++ b/gcc/graphite-clast-to-gimple.h
@@ -61,5 +61,16 @@ eq_bb_pbb_map (const void *bb_pbb1, const void *bb_pbb2)
return (bp1->bb->index == bp2->bb->index);
}
+/* Returns the scattering dimension for STMTFOR.
+
+ The relationship between dimension in scattering matrix
+ and the DEPTH of the loop is:
+ DIMENSION = 2*DEPTH - 1
+*/
+
+static inline int get_scattering_level (int depth)
+{
+ return 2 * depth - 1;
+}
#endif