From patchwork Thu Jul 21 18:31:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Pop X-Patchwork-Id: 106132 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 0F185B6F71 for ; Fri, 22 Jul 2011 04:32:06 +1000 (EST) Received: (qmail 20593 invoked by alias); 21 Jul 2011 18:31:50 -0000 Received: (qmail 20526 invoked by uid 22791); 21 Jul 2011 18:31:48 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, TW_TM, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-yx0-f175.google.com (HELO mail-yx0-f175.google.com) (209.85.213.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 21 Jul 2011 18:31:33 +0000 Received: by yxi19 with SMTP id 19so891744yxi.20 for ; Thu, 21 Jul 2011 11:31:32 -0700 (PDT) Received: by 10.150.131.18 with SMTP id e18mr1079689ybd.150.1311273092474; Thu, 21 Jul 2011 11:31:32 -0700 (PDT) Received: from napoca (adsl-99-184-92-236.dsl.austtx.sbcglobal.net [99.184.92.236]) by mx.google.com with ESMTPS id b47sm1367781yhe.39.2011.07.21.11.31.30 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Jul 2011 11:31:31 -0700 (PDT) Received: by napoca (sSMTP sendmail emulation); Thu, 21 Jul 2011 13:31:29 -0500 From: Sebastian Pop To: gcc-patches@gcc.gnu.org Cc: rguenther@suse.de, tobias@grosser.es, Sebastian Pop Subject: [PATCH 05/10] Add fixme comment. Date: Thu, 21 Jul 2011 13:31:05 -0500 Message-Id: <1311273070-12128-6-git-send-email-sebpop@gmail.com> In-Reply-To: <1311273070-12128-1-git-send-email-sebpop@gmail.com> References: <1311273070-12128-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-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 2011-07-21 Sebastian Pop * graphite-clast-to-gimple.c (clast_get_body_of_loop): Add fixme comment. --- gcc/ChangeLog | 5 +++++ gcc/graphite-clast-to-gimple.c | 19 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e6abcec..eec05b8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2011-07-21 Sebastian Pop + * graphite-clast-to-gimple.c (clast_get_body_of_loop): Add fixme + comment. + +2011-07-21 Sebastian Pop + * graphite-clast-to-gimple.c (struct ivs_params): New. (clast_name_to_gcc): Use ivs_params to pass around parameters. (clast_to_gcc_expression): Same. diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c index 099109a..b7bfaa8 100644 --- a/gcc/graphite-clast-to-gimple.c +++ b/gcc/graphite-clast-to-gimple.c @@ -640,7 +640,24 @@ compute_type_for_level (poly_bb_p pbb, int level) } /* Walks a CLAST and returns the first statement in the body of a - loop. */ + loop. + + FIXME: This function should not be used to get a PBB in the STMT + loop in order to find out the iteration domain of the loop: the + counter example from Tobias is: + + | for (i = 0; i < 100; i++) + | { + | if (i == 0) + | S1; + | S2; + | } + + This function would return S1 whose iteration domain contains only + one point "i = 0", whereas the iteration domain of S2 has 100 points. + + This should be implemented using some functionality existing in + CLooG-ISL. */ static struct clast_user_stmt * clast_get_body_of_loop (struct clast_stmt *stmt)