This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Improve RTL ifcvt for empty else_bb (PR rtl-optimization/80491)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>, Jeff Law <law at redhat dot com>, Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 26 Apr 2017 13:25:37 +0200
- Subject: Re: [PATCH] Improve RTL ifcvt for empty else_bb (PR rtl-optimization/80491)
- Authentication-results: sourceware.org; auth=none
- 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 at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com BA5A47E9C1
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BA5A47E9C1
- References: <20170425193100.GK1809@tucnak>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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:
--- 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;
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