summaryrefslogtreecommitdiff
path: root/gcc/graphite-ppl.c
diff options
context:
space:
mode:
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-25 06:44:41 +0000
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>2011-01-25 06:44:41 +0000
commitf093228ed2c5c3c79f0bcbc59e261ad8023f3c47 (patch)
tree51f0ffcab94891fe4d511642f39709dd4efcb4a2 /gcc/graphite-ppl.c
parent120721515b4b7393db8c90fdb9b4151bb5394e17 (diff)
downloadgcc-f093228ed2c5c3c79f0bcbc59e261ad8023f3c47.tar.gz
Add debug_gmp_value.
2011-01-25 Sebastian Pop <sebastian.pop@amd.com> * graphite-ppl.c (debug_gmp_value): New. * graphite-ppl.h (debug_gmp_value): Declared. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169199 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-ppl.c')
-rw-r--r--gcc/graphite-ppl.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/graphite-ppl.c b/gcc/graphite-ppl.c
index fffa3ee051f..3013b33cde2 100644
--- a/gcc/graphite-ppl.c
+++ b/gcc/graphite-ppl.c
@@ -502,4 +502,17 @@ ppl_build_relation (int dim, int pos1, int pos2, int c,
return cstr;
}
+/* Print to STDERR the GMP value VAL. */
+
+DEBUG_FUNCTION void
+debug_gmp_value (mpz_t val)
+{
+ char *str = mpz_get_str (0, 10, val);
+ void (*gmp_free) (void *, size_t);
+
+ fprintf (stderr, "%s", str);
+ mp_get_memory_functions (NULL, NULL, &gmp_free);
+ (*gmp_free) (str, strlen (str) + 1);
+}
+
#endif