[PATCH] D36404: Disable jump threading into loop headers

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 15:05:39 PDT 2017


hfinkel added a comment.

In https://reviews.llvm.org/D36404#870132, @bmakam wrote:

> In https://reviews.llvm.org/D36404#870092, @hfinkel wrote:
>
> > In https://reviews.llvm.org/D36404#869695, @bmakam wrote:
> >
> > > In https://reviews.llvm.org/D36404#869657, @kparzysz wrote:
> > >
> > > > Have you tried it?  Changing jump threading to have early/late versions is trivial, the question is when should the late one run, and if that would help in the first place.
> > >
> > >
> > > I reverted this change and it recovered the regression. I was going to try to re-run the whole jumpthreading pass after latesimplifycfg to see if it would help, but I don't know if it is a good place because LSR that runs after, will not have the loop in canonical form and loopsimplify will again turn it into irreducible loop. Another place I was thinking was to try before CGP.
> >
> >
> > If it'll work right before CGP, that's probably best. That way targets can run IR-level passes that want to look at loops before that.
>
>
> I tried right after latesimplifycfg and it almost recovers the regression. However, running it right before CGP made it even worse for performance of spec2017/perlbench. It seems to be due to some kind of bad interaction with LSR, I haven't digged deeper. Would running right before LSR be reasonable?


We need to figure out if LSR is doing something reasonable. It's possible that LSR is actually causing the regression, and old jumpthreading is just serving to obscure the loop structure (thus preventing LSR from doing whatever bad thing it's doing).


Repository:
  rL LLVM

https://reviews.llvm.org/D36404





More information about the llvm-commits mailing list