This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Avoid re-allocating PHIs in split_edge


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]