From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45975 invoked by alias); 2 Jul 2015 19:03:11 -0000 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 Received: (qmail 45950 invoked by uid 89); 2 Jul 2015 19:03:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-la0-f48.google.com Received: from mail-la0-f48.google.com (HELO mail-la0-f48.google.com) (209.85.215.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 02 Jul 2015 19:03:08 +0000 Received: by lagx9 with SMTP id x9so67238120lag.1 for ; Thu, 02 Jul 2015 12:03:05 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.112.97.145 with SMTP id ea17mr31459685lbb.49.1435863785363; Thu, 02 Jul 2015 12:03:05 -0700 (PDT) Received: by 10.112.77.68 with HTTP; Thu, 2 Jul 2015 12:03:05 -0700 (PDT) Reply-To: ramrad01@arm.com In-Reply-To: References: <1435855936-28694-1-git-send-email-hiraditya@msn.com> <55958031.7010001@grosser.es> Date: Thu, 02 Jul 2015 19:03:00 -0000 Message-ID: Subject: Re: [PATCH] Restore previous change for gimple_phi_iterator From: Ramana Radhakrishnan To: Sebastian Pop Cc: Tobias Grosser , Aditya Kumar , GCC Patches , tobias@sarc.sas, at@sarc.sas, gr@grosser.es Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg00154.txt.bz2 On Thu, Jul 2, 2015 at 7:34 PM, Sebastian Pop wrote: > On Thu, Jul 2, 2015 at 1:17 PM, Tobias Grosser wrote: >> On 07/02/2015 06:52 PM, Aditya Kumar wrote: >>> >>> gcc/ChangeLog: >>> >>> 2015-07-02 Aditya Kumar >>> Sebastian Pop >>> >>> * graphite-sese-to-poly.c (rewrite_cross_bb_scalar_deps): >>> Point iterator to use_stmt. >>> >> >> Hi Aditya, >> >> this patch does not explain what was wrong and why this change is correct. >> Could you possibly add such an explanation. > > One of the code refactorings introducing phi node iterators modified > the semantics of this code as described below ... > >> >> Best, >> Tobias >> >> >>> >>> Bug introduced by patch: >>> git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217787 > > ... here. > If you git log grep for this commit, you would see that this patch > reverts this "typo" introduced in a very large patch. > How about a testcase or 2 or mentioning if it is covered by existing testcases ? And Aditya you may find it instructive to read this https://gcc.gnu.org/contribute.html#patches regards Ramana > Thanks, > Sebastian > >>> --- >>> gcc/graphite-sese-to-poly.c | 7 +++---- >>> 1 file changed, 3 insertions(+), 4 deletions(-) >>> >>> diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c >>> index 271c499..78f10e4 100644 >>> --- a/gcc/graphite-sese-to-poly.c >>> +++ b/gcc/graphite-sese-to-poly.c >>> @@ -2458,11 +2458,10 @@ rewrite_cross_bb_scalar_deps (scop_p scop, >>> gimple_stmt_iterator *gsi) >>> handle_scalar_deps_crossing_scop_limits (scop, def, stmt); >>> >>> FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, def) >>> - if (gimple_code (use_stmt) == GIMPLE_PHI >>> - && (res = true)) >>> + if (gphi *phi = dyn_cast (use_stmt)) >>> { >>> - gphi_iterator psi = gsi_start_phis (gimple_bb (use_stmt)); >>> - >>> + res = true; >>> + gphi_iterator psi = gsi_for_phi (phi); >>> if (scalar_close_phi_node_p (gsi_stmt (psi))) >>> rewrite_close_phi_out_of_ssa (scop, &psi); >>> else >>> >>