From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27166 invoked by alias); 7 Apr 2011 20:13:06 -0000 Received: (qmail 27158 invoked by uid 22791); 7 Apr 2011 20:13:06 -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:12:59 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p37KCxqB019722 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 7 Apr 2011 16:12:59 -0400 Received: from toll.yyz.redhat.com (toll.yyz.redhat.com [10.15.16.165]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p37KCwpL008946; Thu, 7 Apr 2011 16:12:58 -0400 Message-ID: <4D9E1ACA.8050206@redhat.com> Date: Thu, 07 Apr 2011 20:13: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: Don't clone CALLs (PR48273) 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/msg00579.txt.bz2 On 04/07/2011 01:30 PM, Alexander Monakov wrote: > Hi, > > Selective scheduler does not explicitly forbid creating bookkeeping copies of > CALLs, but an assert in create_copy_of_insn_rtx does not expect a CALL. Since > there's little benefit from aggressive scheduling of CALLs, it makes sense to > restrict it so that CALLs cannot be duplicated. > > This patch makes CALLs non-clonable by adding an explicit check in additional > to other non-clonable insns (ASMs, instructions that are a part of > SCHED_GROUPs, etc.). We also need to forbid pipelining of loops that have no > exit edges, since our check for whether a motion would create bookkeeping does > not work in that case (it's one of the solutions; the other is to fixup > remove_insns_that_need_bookkeeping function, but this one is simpler and > faster). > > > PR target/48273 > * cfgloop.h (loop_has_exit_edges): New helper. > * sel-sched-ir.c (init_global_and_expr_for_insn): Make CALLs > non-clonable. > (sel_setup_region_sched_flags): Don't pipeline loops that have no > exit edges. > > testsuite: > * g++.dg/opt/pr48273.C: New. > Ok, thanks.