This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Avoid re-allocating PHIs in split_edge
- From: Jeff Law <law at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 22 Aug 2017 08:10:55 -0600
- Subject: Re: [PATCH] Avoid re-allocating PHIs in split_edge
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A74A18B135
- References: <alpine.LSU.2.20.1708221101460.14191@zhemvz.fhfr.qr>
On 08/22/2017 03:03 AM, Richard Biener wrote:
>
> The following patch makes sure to not grow the number of incoming
> edges in the destination when doing split_edge on GIMPLE. That's
> easy by first redirecting the existing edge to the destination
> to the new block rather than creating the new fallthru from the
> new block to the destination.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.
>
> Richard.
>
> 2017-08-22 Richard Biener <rguenther@suse.de>
>
> * tree-cfg.c (gimple_split_edge): Avoid reallocating target
> PHI nodes.
Definitely a good thing. Having PHIs get reallocated has led to some
subtle bugs. I realize this isn't a complete solution to that problem,
but every bit helps.
jeff