diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-25 06:44:41 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-01-25 06:44:41 +0000 |
commit | f093228ed2c5c3c79f0bcbc59e261ad8023f3c47 (patch) | |
tree | 51f0ffcab94891fe4d511642f39709dd4efcb4a2 | |
parent | 120721515b4b7393db8c90fdb9b4151bb5394e17 (diff) | |
download | gcc-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
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ChangeLog.graphite | 5 | ||||
-rw-r--r-- | gcc/graphite-ppl.c | 13 | ||||
-rw-r--r-- | gcc/graphite-ppl.h | 1 |
4 files changed, 24 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 92064dc39c2..e588ec20ab7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-01-25 Sebastian Pop <sebastian.pop@amd.com> + + * graphite-ppl.c (debug_gmp_value): New. + * graphite-ppl.h (debug_gmp_value): Declared. + 2011-01-25 Tobias Grosser <grosser@fim.uni-passau.de> * doc/install.texi: Document availability of cloog-0.16. diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite index 5839242af30..72f4fa194d7 100644 --- a/gcc/ChangeLog.graphite +++ b/gcc/ChangeLog.graphite @@ -1,3 +1,8 @@ +2011-01-15 Sebastian Pop <sebastian.pop@amd.com> + + * graphite-ppl.c (debug_gmp_value): New. + * graphite-ppl.h (debug_gmp_value): Declared. + 2011-01-13 Tobias Grosser <grosser@fim.uni-passau.de> * doc/install.texi: Document availability of cloog-0.16 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 diff --git a/gcc/graphite-ppl.h b/gcc/graphite-ppl.h index ec5d3c5682f..f6c279b9d6d 100644 --- a/gcc/graphite-ppl.h +++ b/gcc/graphite-ppl.h @@ -46,6 +46,7 @@ void ppl_min_for_le_pointset (ppl_Pointset_Powerset_C_Polyhedron_t, ppl_Linear_Expression_t, mpz_t); ppl_Constraint_t ppl_build_relation (int, int, int, int, enum ppl_enum_Constraint_Type); +void debug_gmp_value (mpz_t); /* Assigns to RES the value of the INTEGER_CST T. */ |