On Mon, Mar 25, 2019 at 11:39:27AM -0600, Jeff Law wrote:
> On 3/24/19 11:42 AM, Segher Boessenkool wrote:
> > On Fri, Mar 22, 2019 at 12:16:30PM -0600, Jeff Law wrote:
> >> So I finally started looking at the fpr-moves regression in this BZ.  No
> >> surprise this is further fallout from the combiner changes.
> > 
> > It *exposed* the problem, yes :-)
> Well, it was one of regressions that were a result of that patch.  I'm a
> bit disappointed in how many were just punted rather than really
> analyzed and either mitigated or explicitly moved out to gcc-10 because
> mitigation was too painful with marginal benefits to do at this stage.
> 
> >> One might reasonably ask if combine's avoidance of
> >> hard regs should be loosened for consecutive insns -- combining
> >> consecutive insns isn't going to increase the live range of these hard
> >> regs.
> > 
> > But that is not the only reason we don't want to forward hard registers.
> > One of the important reasons is correctness: we could create situations
> > that reload/LRA cannot handle (cannot *possibly* handle).  Another reason
> > is that combine should not try to do register allocation's job: we on
> > average get better code after the combine hard reg change.
> No doubt.  My point was that we can and should have been looking for
> ways to mitigate the fallout.  Which in my mind includes further
> investigation of whether or not we've hit the right balance for what
> should and should not be combined.

Do you have some example of something that happened after the change, that
did not happen before the change (when using a var instead of a function
argument, say)?

> > For splitters after reload you have to do a lot of work manually, to get
> > reasonable code.  This is a problem everywhere :-(
> Yup.  In fact, we've seen multiple BZs this cycle where a DCE pass right
> before/after splitting would help.  In both cases we ended up hacking up
> the splitters a bit.  It's one of the items I think we'll want to
> revisit during gcc-10 stage1 development.

I would like to even see something CSE-like, cprop-like, and combine-like.

But most of all, people should stop doing splitters after reload if there
is any way to avoid it!


Segher

Reply via email to