summaryrefslogtreecommitdiff
path: root/gcc/graphite-poly.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-30 21:20:37 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2010-09-30 21:20:37 +0000
commit079f4f8cd67b42448aeb0d9155aafb5c2b662745 (patch)
tree7bd945e2072160e36ef38015e623d9a36aaf3273 /gcc/graphite-poly.c
parentbd43216490264bfef6d8406c7fa8013fbf17456f (diff)
downloadgcc-079f4f8cd67b42448aeb0d9155aafb5c2b662745.tar.gz
Add cloog_checksum.
2010-09-09 Sebastian Pop <sebastian.pop@amd.com> * graphite-poly.c (cloog_checksum): New. * graphite-poly.h (cloog_checksum): Declared. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164803 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-poly.c')
-rw-r--r--gcc/graphite-poly.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/graphite-poly.c b/gcc/graphite-poly.c
index 419a00b7961..4214f9e9e5f 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