aboutsummaryrefslogtreecommitdiff
path: root/gcc/graphite-ppl.c
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2009-11-25 05:12:35 +0000
committerSebastian Pop <spop@gcc.gnu.org>2009-11-25 05:12:35 +0000
commit04863400c4648cb3b7e646c39197f1680a39d26b (patch)
tree41113a8d71efae3c3f21167b52635a3d7ec0d2a0 /gcc/graphite-ppl.c
parent009150e1fc7c05d1f17c2fc4752683436ccd4f5f (diff)
downloadgcc-04863400c4648cb3b7e646c39197f1680a39d26b.zip
gcc-04863400c4648cb3b7e646c39197f1680a39d26b.tar.gz
gcc-04863400c4648cb3b7e646c39197f1680a39d26b.tar.bz2
graphite-ppl.c (ppl_print_linear_expr): New.
2009-10-17 Sebastian Pop <sebastian.pop@amd.com> * graphite-ppl.c (ppl_print_linear_expr): New. (debug_ppl_linear_expr): New. * graphite-ppl.h (ppl_print_linear_expr): Declared. (debug_ppl_linear_expr): Declared. From-SVN: r154599
Diffstat (limited to 'gcc/graphite-ppl.c')
-rw-r--r--gcc/graphite-ppl.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/graphite-ppl.c b/gcc/graphite-ppl.c
index 3e84dcf..241171c 100644
--- a/gcc/graphite-ppl.c
+++ b/gcc/graphite-ppl.c
@@ -561,6 +561,30 @@ ppl_print_polyhedron_matrix (FILE *file, ppl_const_Polyhedron_t ph)
cloog_matrix_free (mat);
}
+/* Print to FILE the linear expression LE. */
+
+void
+ppl_print_linear_expr (FILE *file, ppl_Linear_Expression_t le)
+{
+ ppl_Constraint_t c;
+ ppl_Polyhedron_t pol;
+ ppl_dimension_type dim;
+
+ ppl_Linear_Expression_space_dimension (le, &dim);
+ ppl_new_C_Polyhedron_from_space_dimension (&pol, dim, 0);
+ ppl_new_Constraint (&c, le, PPL_CONSTRAINT_TYPE_EQUAL);
+ ppl_Polyhedron_add_constraint (pol, c);
+ ppl_print_polyhedron_matrix (file, pol);
+}
+
+/* Print to STDERR the linear expression LE. */
+
+void
+debug_ppl_linear_expr (ppl_Linear_Expression_t le)
+{
+ ppl_print_linear_expr (stderr, le);
+}
+
/* Print to FILE the powerset PS in its PolyLib matrix form. */
void