[PATCH] D29835: Correct PressureDiff calculation in presence of subregs

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 10 11:55:19 PST 2017


rampitec added a comment.

In https://reviews.llvm.org/D29835#673827, @MatzeB wrote:

> In https://reviews.llvm.org/D29835#673808, @rampitec wrote:
>
> > In https://reviews.llvm.org/D29835#673763, @MatzeB wrote:
> >
> > > I did not implement it this way yet because in general a bit in the lane mask doesn't necessarily represent 1 register pressure unit.
> >
> >
> > You are right, yet this estimation seems more correct to me. I think if/when we have targets for which this is not true we could extend TRI interface to return the estimation.
>
>
> The current code is correct, just not particularily exact.
>  We cannot apply this without a plan to deal with those cases, even if it is just aborting/falling back to a pessimistic behavior.


I guess if we really see a problem like that then TRI interface can be extended to return a weight given RegUnit and Lanemask. In fact I'm trying to patch other places like increase/decreaseRegPressure and I had to separate this logic into a function. The very same function can be exposed by targets. Do you want to create it right now?

>>> Without a similar patch to `{increase|decrease}RegPressure()` pressure book keeping will go out of sync as well.
>> 
>> You are probably right, I was going to look into these places...
> 
> We cannot apply a patch that just changes one part of the system.

I'm adding this changes at the moment.


Repository:
  rL LLVM

https://reviews.llvm.org/D29835





More information about the llvm-commits mailing list