From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28505 invoked by alias); 7 Apr 2011 20:16:40 -0000 Received: (qmail 28494 invoked by uid 22791); 7 Apr 2011 20:16:39 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 07 Apr 2011 20:16:34 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p37KGXuO005029 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 7 Apr 2011 16:16:33 -0400 Received: from toll.yyz.redhat.com (toll.yyz.redhat.com [10.15.16.165]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p37KGW7J023713; Thu, 7 Apr 2011 16:16:33 -0400 Message-ID: <4D9E1BA0.7020602@redhat.com> Date: Thu, 07 Apr 2011 20:16:00 -0000 From: Vladimir Makarov User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9 MIME-Version: 1.0 To: Alexander Monakov CC: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] sel-sched: Fix adding of preheader blocks from inner loops (PR48302) References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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-04/txt/msg00580.txt.bz2 On 04/07/2011 01:34 PM, Alexander Monakov wrote: > Hello, > > (quoting myself from the PR audit trail) > We call sched_scan for preheader blocks from inner regions twice: first during > sel_add_loop_preheaders, and then during the subsequent call to sel_init_bbs > in setup_current_loop_nest. As a result, we also call remove_notes for those > blocks twice, and after the second call incorrectly record that the block has > no notes. > > The solution is to call sel_add_loop_preheaders after sel_init_bbs. We need > to add new preheader blocks into 'bbs' vector in setup_current_loop_nest, so > we pass the pointer to the vector to sel_add_loop_preheaders. > > > PR rtl-optimization/48302 > * sel-sched-ir.h (sel_add_loop_preheaders): Update prototype. > * sel-sched-ir.c (sel_add_loop_preheaders): Add 'bbs' argument. Use > it to record added preheader blocks. > (setup_current_loop_nest): Add 'bbs' argument. Pass it on to > sel_add_loop_preheaders. > (sel_region_init): Move call to setup_current_loop_nest after > sel_init_bbs. > > testsuite: > g++.dg/opt/pr48302.C: New. Ok, thanks.