Patchwork [05/10] speedup compilation

login
register
mail settings
Submitter Sebastian Pop
Date Jan. 15, 2011, 9:05 a.m.
Message ID <1295082315-32242-6-git-send-email-sebpop@gmail.com>
Download mbox | patch
Permalink /patch/79037/
State New
Headers show

Comments

Sebastian Pop - Jan. 15, 2011, 9:05 a.m.
2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>

	* graphite-dependences.c (build_lexicographical_constraint): Stop the
	iteration when the bag of constraints is empty.
---
 gcc/ChangeLog.graphite     |    5 +++++
 gcc/graphite-dependences.c |    7 ++++++-
 2 files changed, 11 insertions(+), 1 deletions(-)

Patch

diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index 4368926..470428a 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,5 +1,10 @@ 
 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
 
+	* graphite-dependences.c (build_lexicographical_constraint): Stop the
+	iteration when the bag of constraints is empty.
+
+2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
+
 	* graphite-poly.c (pbb_remove_duplicate_pdrs): Make it work.
 
 2011-01-15  Sebastian Pop  <sebastian.pop@amd.com>
diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c
index 474bd9a..cb2241b 100644
--- a/gcc/graphite-dependences.c
+++ b/gcc/graphite-dependences.c
@@ -335,7 +335,9 @@  dr_equality_constraints (graphite_dim_t dim,
 /* Builds scheduling inequality constraints: when DIRECTION is
    1 builds a GE constraint,
    0 builds an EQ constraint,
-   -1 builds a LE constraint.  */
+   -1 builds a LE constraint.
+   DIM is the dimension of the scheduling space.
+   POS and POS + OFFSET are the dimensions that are related.  */
 
 static ppl_Pointset_Powerset_C_Polyhedron_t
 build_pairwise_scheduling (graphite_dim_t dim,
@@ -418,6 +420,9 @@  build_lexicographical_constraint (ppl_Pointset_Powerset_C_Polyhedron_t bag,
       ppl_Pointset_Powerset_C_Polyhedron_intersection_assign (bag, sceq);
       ppl_delete_Pointset_Powerset_C_Polyhedron (sceq);
 
+      if (ppl_Pointset_Powerset_C_Polyhedron_is_empty (bag))
+	break;
+
       lex = build_pairwise_scheduling (dim, i + 1, offset, direction);
       ppl_Pointset_Powerset_C_Polyhedron_intersection_assign (lex, bag);