From patchwork Wed Apr 26 11:25:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 755424 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wCd7C047hz9s2G for ; Wed, 26 Apr 2017 21:25:57 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="YNhD2J23"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=pfIonD67Vm1p4ZOnW oQv/8IQtctnQtYvZb3oqGoNcaLIY8ynDgp/+l2PgJQK4W0zPGqf3Z1F/CKFBnZGr rt+Wt1KVUZjWrqQkXbmBuIWEhn0ZTXxaglKKETgXt94Ugyy+jZZd+L/NTR03JCbU WtPx1z3sXwohuAtcFYDLEruWJo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; s=default; bh=Zo02PiktAXn4yv/qAc0gEul WeAs=; b=YNhD2J23utxfm4SmcCtXbAa5Oo6BKKGVE3BqdhyVtJDmovnlgyRcIC8 0si5CiS0955Dmwy7e0h3QSdw6GfNybG3N4pKkpy5HvOqZqdgdDmkqD+eTqd+nnEN AtFzoFNFmnRDLyaQ4Scn5FfXdLJ8f4FCAZogxj6nEJv/VUmorT3E= Received: (qmail 13737 invoked by alias); 26 Apr 2017 11:25:46 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 13034 invoked by uid 89); 26 Apr 2017 11:25:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 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; Wed, 26 Apr 2017 11:25:43 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BA5A47E9C1; Wed, 26 Apr 2017 11:25:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BA5A47E9C1 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com BA5A47E9C1 Received: from tucnak.zalov.cz (ovpn-116-29.ams2.redhat.com [10.36.116.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 433207F8AC; Wed, 26 Apr 2017 11:25:42 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id v3QBPdZb029271; Wed, 26 Apr 2017 13:25:40 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id v3QBPbcH029270; Wed, 26 Apr 2017 13:25:37 +0200 Date: Wed, 26 Apr 2017 13:25:37 +0200 From: Jakub Jelinek To: Richard Biener , Jeff Law , Eric Botcazou Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Improve RTL ifcvt for empty else_bb (PR rtl-optimization/80491) Message-ID: <20170426112537.GO1809@tucnak> Reply-To: Jakub Jelinek References: <20170425193100.GK1809@tucnak> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20170425193100.GK1809@tucnak> User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes On Tue, Apr 25, 2017 at 09:31:00PM +0200, Jakub Jelinek wrote: > This patch let us search for x's setter earlier in the bb. > During testing I found that modified_in_p/modified_in_between_p don't > actually take into account calls that could change MEMs, so the patch > handles that too. Or shall we just: instead of the call_crossed hacks? Then modified_between_p and modified_in_p would return true for !MEM_READONLY_P MEMs crossing a call. Jakub --- gcc/alias.c 2017-04-25 15:51:31.072923325 +0200 +++ gcc/alias.c 2017-04-26 13:23:55.595048464 +0200 @@ -3221,6 +3221,8 @@ memory_modified_in_insn_p (const_rtx mem { if (!INSN_P (insn)) return false; + if (CALL_P (insn)) + return true; memory_modified = false; note_stores (PATTERN (insn), memory_modified_1, CONST_CAST_RTX(mem)); return memory_modified;