diff options
author | Sebastian Pop <sebastian.pop@amd.com> | 2010-09-30 21:20:37 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2010-09-30 21:20:37 +0000 |
commit | c498b9b99772f4f810ff2d6cf61c6b8bf194b095 (patch) | |
tree | 7bd945e2072160e36ef38015e623d9a36aaf3273 /gcc | |
parent | 26ccb556d8e83720ab49d1f5f3136fb0bdf1a70d (diff) | |
download | gcc-c498b9b99772f4f810ff2d6cf61c6b8bf194b095.zip gcc-c498b9b99772f4f810ff2d6cf61c6b8bf194b095.tar.gz gcc-c498b9b99772f4f810ff2d6cf61c6b8bf194b095.tar.bz2 |
Add cloog_checksum.
2010-09-09 Sebastian Pop <sebastian.pop@amd.com>
* graphite-poly.c (cloog_checksum): New.
* graphite-poly.h (cloog_checksum): Declared.
From-SVN: r164803
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ChangeLog.graphite | 5 | ||||
-rw-r--r-- | gcc/graphite-poly.c | 18 | ||||
-rw-r--r-- | gcc/graphite-poly.h | 1 |
4 files changed, 29 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8479ecd..7c23b6a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2010-09-30 Sebastian Pop <sebastian.pop@amd.com> + * graphite-poly.c (cloog_checksum): New. + * graphite-poly.h (cloog_checksum): Declared. + +2010-09-30 Sebastian Pop <sebastian.pop@amd.com> + * graphite-poly.c (pbb_number_of_iterations): Removed. (pbb_number_of_iterations_at_time): Correctly compute the number of iterations in the transformed loop. diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite index 5cbf9fc..368d77d 100644 --- a/gcc/ChangeLog.graphite +++ b/gcc/ChangeLog.graphite @@ -1,5 +1,10 @@ 2010-09-09 Sebastian Pop <sebastian.pop@amd.com> + * graphite-poly.c (cloog_checksum): New. + * graphite-poly.h (cloog_checksum): Declared. + +2010-09-09 Sebastian Pop <sebastian.pop@amd.com> + * graphite-poly.c (pbb_number_of_iterations): Removed. (pbb_number_of_iterations_at_time): Correctly compute the number of iterations in the transformed loop. diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c index 419a00b..4214f9e 100644 --- a/gcc/graphite-poly.c +++ b/gcc/graphite-poly.c @@ -1913,5 +1913,23 @@ dot_lst (lst_p lst) #endif } +/* Computes a checksum for the code generated by CLooG for SCOP. */ + +DEBUG_FUNCTION void +cloog_checksum (scop_p scop ATTRIBUTE_UNUSED) +{ + /* When debugging, enable the following code. This cannot be used + in production compilers because it calls "system". */ +#if 0 + FILE *stream = fopen ("/tmp/scop.cloog", "w"); + gcc_assert (stream); + print_cloog (stream, scop, 0); + fclose (stream); + + fputs ("\n", stdout); + system ("cloog -compilable 1 /tmp/scop.cloog > /tmp/scop.c ; gcc -O0 -g /tmp/scop.c -lm -o /tmp/scop; /tmp/scop | md5sum "); +#endif +} + #endif diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h index 98ce124..b9bf1ed 100644 --- a/gcc/graphite-poly.h +++ b/gcc/graphite-poly.h @@ -1398,6 +1398,7 @@ extern int scop_max_loop_depth (scop_p); extern int unify_scattering_dimensions (scop_p); extern bool apply_poly_transforms (scop_p); extern bool graphite_legal_transform (scop_p); +extern void cloog_checksum (scop_p); /* Set the region of SCOP to REGION. */ |