On Wed, Oct 31, 2018 at 4:56 AM Richard Biener <rguent...@suse.de> wrote: > > On Tue, 30 Oct 2018, Richard Biener wrote: > > > > > This picks up work from earlier this year where Aldy worked on > > undoing forwprop during out-of-SSA to improve coalescing across > > backedges. > > > > The following patch first rectifies the existing code which > > is meant to insert necessary copies in places where it then > > allows coalescing and thus avoids splitting of the backedge. > > > > The current code has issues with handling conflicts with uses > > in the exit condition badly which is why the patch instead > > of on the backedge inserts the copy before the definition > > of the backedge value. It also expands the constraint of > > handling only single-BB loops (because of trivially_conflicts_p > > restrictions). Also we can coalesce vars with different > > SSA_NAME_VAR just fine now. > > > > This makes the cases in the PRs keep their natural loop > > form where originally they had their backedge split because > > the inserted copies didn't do the job. > > > > The testcases may be a bit awkward (and hopefully survive > > solaris assembler woes...) > > > > Bootstrap and regtest running on x86_64-unknown-linux-gnu. > > The following is what I have applied. > > Richard. > > From 5b774992b3863931ccbba13effc9efcea304610e Mon Sep 17 00:00:00 2001 > From: Richard Guenther <rguent...@suse.de> > Date: Tue, 30 Oct 2018 14:46:05 +0100 > Subject: [PATCH] fix-pr70359 > > PR middle-end/70359 > PR middle-end/86270 > * tree-outof-ssa.c (insert_backedge_copies): Restrict > copy generation to useful cases. Place the copy before > the definition of the backedge value when possible. >
This caused: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87852 -- H.J.