From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 70543 invoked by alias); 30 May 2019 14:59:25 -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 70401 invoked by uid 89); 30 May 2019 14:59:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= 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 ESMTP; Thu, 30 May 2019 14:59:23 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C83A23006372; Thu, 30 May 2019 14:59:15 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-56.rdu2.redhat.com [10.10.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id E762E7C0B4; Thu, 30 May 2019 14:59:12 +0000 (UTC) Subject: Re: [PATCH] A jump threading opportunity for condition branch To: Richard Biener , Jiufu Guo Cc: gcc-patches@gcc.gnu.org, Jakub Jelinek , Daniel Berlin , segher@kernel.crashing.org, wschmidt@linux.ibm.com References: <1558446288-52444-1-git-send-email-guojiufu@linux.ibm.com> <2B6D408A-3173-4575-8896-0604672976B3@suse.de> From: Jeff Law Openpgp: preference=signencrypt Message-ID: Date: Thu, 30 May 2019 15:03:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <2B6D408A-3173-4575-8896-0604672976B3@suse.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-05/txt/msg02015.txt.bz2 On 5/30/19 12:44 AM, Richard Biener wrote: > On May 29, 2019 10:21:46 PM GMT+02:00, Jeff Law wrote: >> On 5/24/19 6:45 AM, Richard Biener wrote: >> [ Aggressive snipping ] >> >>> As said in my first review I'd just check whether for the >>> edge we want to thread through the definition comes from a CMP. >>> Suppose you have >>> >>> # val_1 = PHI >>> if (val_1 != 0) >>> >>> and only one edge has a b_3 = d_5 != 0 condition it's still >>> worth tail-duplicating the if block. >> Agreed. The cost of tail duplicating here is so small we should be >> doing it highly aggressively. About the only case where we might not >> want to would be if we're optimizing for size rather than speed. That >> case isn't clearly a win either way. > > Even there the PHI likely causes edge copies to be inserted. So I wouldn't care for the moment. The proper check would be ! Optimize_edge_for_size_p (e). Agreed, with capitalization fixed :-) jeff