[PATCH] D29835: Correct PressureDiff calculation in presence of subregs
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 10 11:49:39 PST 2017
MatzeB added a comment.
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.
>
>
>> 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'd recomment running with `-verify-misched` when touching the regpressure code.
>
> Thanks, added.
That was meant as a recommendation for running experiments (not necessarily for the test here) like `llvm-lit -Dllc='llc -verify-misched'`. I would expect the scheduler to fail in a number of cases when the pressure diffs and the decrease/increaseRegisterPressure() functions are out of sync.
Repository:
rL LLVM
https://reviews.llvm.org/D29835
More information about the llvm-commits
mailing list