From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4309 invoked by alias); 21 Oct 2015 14:44:51 -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 3697 invoked by uid 89); 21 Oct 2015 14:44:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 21 Oct 2015 14:44:19 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 4D4988E673; Wed, 21 Oct 2015 14:44:06 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-75.phx2.redhat.com [10.3.113.75]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9LEi5Fa028771; Wed, 21 Oct 2015 10:44:06 -0400 Subject: Re: [PATCH] Don't allow FSM threader to create irreducible loops unless it eliminates a multi-way branch To: Richard Biener References: <56251919.5050104@redhat.com> Cc: GCC Patches From: Jeff Law Message-ID: <5627A4B5.6090409@redhat.com> Date: Wed, 21 Oct 2015 14:53:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg02087.txt.bz2 On 10/21/2015 02:56 AM, Richard Biener wrote: > On Mon, Oct 19, 2015 at 6:23 PM, Jeff Law wrote: >> If I hack up GCC's old jump threader to avoid threading across backedges and >> instead let the FSM threader handle that case, then we end up with cases >> where the FSM threader creates irreducible loops with marginal benefit. >> >> This can be seen in ssa-dom-thread-2{d,e,f}.c. >> >> We've long avoided such threads in the old jump threader. We generally want >> to avoid them in the FSM threader as well. The only case where we're going >> to allow them is when we're able to eliminate a multi-way branch from the >> loop. >> >> Bootstrapped and regression tested on x86_64-linux-gnu. Also tested the >> above mentioned testcases with my hacked up compiler. >> >> Installed on the trunk. > > Note that this fixed some of the size regressions I see on SPEC CPU 2000 > but not all, esp. 176.gcc seems to be as bad as before (seen with plain -O2 > on x86_64). I haven't started looking at them explicitly yet. Good to know it helped some though. jeff