[PATCH] Avoid re-allocating PHIs in split_edge
Jeff Law
law@redhat.com
Tue Aug 22 15:28:00 GMT 2017
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
More information about the Gcc-patches
mailing list