[PATCH] D31908: [AntiDepBreaker] Don't rename callee saved register restore instruction

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 4 14:46:28 PDT 2017


MatzeB added a comment.

In https://reviews.llvm.org/D31908#746553, @Carrot wrote:

> In https://reviews.llvm.org/D31908#745251, @MatzeB wrote:
>
> > In https://reviews.llvm.org/D31908#745037, @kparzysz wrote:
> >
> > > In https://reviews.llvm.org/D31908#743873, @Carrot wrote:
> > >
> > > > In https://reviews.llvm.org/D31908#741341, @kparzysz wrote:
> > > >
> > > > > We add all callee saved registers as live-in on all paths from the restores to the exit, so this problem shouldn't affect us.  Actually the anti-dep breaker was the reason why we did it in the first place.
> > > >
> > > >
> > > > The second loop in function AggressiveAntiDepBreaker::StartBlock tries to do the work you described. Unfortunately it doesn't work with shrink wrapping. It says:
> > >
> > >
> > > This should be done in PEI, not in the anti-dependency breaker.  This is where the CSR registers get the concrete saving/restoring code.  Passes running afterwards should not need to know about what register is CSR or not (except pristine registers, but that's general enough).
> >
> >
> > Note that this is true for live-ins, however we don't explicitely safe live-out lists in the basic blocks. So for return blocks you have to take all CSR registers (depending on what you do with/without pristines). (See also https://reviews.llvm.org/D32464 where I partially rediscovered that fact).
>
>
> Can your patch in https://reviews.llvm.org/D32464 also fix this problem?


Possibly, try it out.


https://reviews.llvm.org/D31908





More information about the llvm-commits mailing list