From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31204 invoked by alias); 15 Jan 2011 09:08:47 -0000 Received: (qmail 31072 invoked by uid 22791); 15 Jan 2011 09:08:45 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-gx0-f175.google.com (HELO mail-gx0-f175.google.com) (209.85.161.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 15 Jan 2011 09:08:41 +0000 Received: by mail-gx0-f175.google.com with SMTP id 20so1501628gxk.20 for ; Sat, 15 Jan 2011 01:08:40 -0800 (PST) Received: by 10.151.154.10 with SMTP id g10mr2145379ybo.385.1295082520644; Sat, 15 Jan 2011 01:08:40 -0800 (PST) Received: from napoca (adsl-76-250-118-52.dsl.austtx.sbcglobal.net [76.250.118.52]) by mx.google.com with ESMTPS id v4sm1355858ybe.17.2011.01.15.01.08.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 15 Jan 2011 01:08:40 -0800 (PST) Received: by napoca (sSMTP sendmail emulation); Sat, 15 Jan 2011 03:08:37 -0600 From: Sebastian Pop To: gcc-patches@gcc.gnu.org Cc: rguenther@suse.de, gcc-graphite@googlegroups.com, Sebastian Pop Subject: [PATCH 06/10] Correct the precedence relation. Date: Sat, 15 Jan 2011 09:09:00 -0000 Message-Id: <1295082315-32242-7-git-send-email-sebpop@gmail.com> In-Reply-To: <1295082315-32242-1-git-send-email-sebpop@gmail.com> References: <1295082315-32242-1-git-send-email-sebpop@gmail.com> X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-01/txt/msg01041.txt.bz2 2011-01-15 Sebastian Pop * graphite-dependences.c (build_pairwise_scheduling): Correctly compute the "a followed by b" relation and document it. --- gcc/ChangeLog.graphite | 5 +++++ gcc/graphite-dependences.c | 15 ++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite index 470428a..86ba9c9 100644 --- a/gcc/ChangeLog.graphite +++ b/gcc/ChangeLog.graphite @@ -1,5 +1,10 @@ 2011-01-15 Sebastian Pop + * graphite-dependences.c (build_pairwise_scheduling): Correctly compute + the "a followed by b" relation and document it. + +2011-01-15 Sebastian Pop + * graphite-dependences.c (build_lexicographical_constraint): Stop the iteration when the bag of constraints is empty. diff --git a/gcc/graphite-dependences.c b/gcc/graphite-dependences.c index cb2241b..5e4e087 100644 --- a/gcc/graphite-dependences.c +++ b/gcc/graphite-dependences.c @@ -348,23 +348,28 @@ build_pairwise_scheduling (graphite_dim_t dim, ppl_Pointset_Powerset_C_Polyhedron_t res; ppl_Polyhedron_t equalities; ppl_Constraint_t cstr; + graphite_dim_t a = pos; + graphite_dim_t b = pos + offset; ppl_new_C_Polyhedron_from_space_dimension (&equalities, dim, 0); switch (direction) { - case -1: - cstr = ppl_build_relation (dim, pos, pos + offset, 1, + case 1: + /* Builds "a + 1 <= b. */ + cstr = ppl_build_relation (dim, a, b, 1, PPL_CONSTRAINT_TYPE_LESS_OR_EQUAL); break; case 0: - cstr = ppl_build_relation (dim, pos, pos + offset, 0, + /* Builds "a = b. */ + cstr = ppl_build_relation (dim, a, b, 0, PPL_CONSTRAINT_TYPE_EQUAL); break; - case 1: - cstr = ppl_build_relation (dim, pos, pos + offset, -1, + case -1: + /* Builds "a >= b + 1. */ + cstr = ppl_build_relation (dim, a, b, -1, PPL_CONSTRAINT_TYPE_GREATER_OR_EQUAL); break; -- 1.7.1