[PATCH] D32201: [RALLOC] Increase CSR cost in RegAllocGreedy to favour splitting over CSR first use

Zixuan Wu (Zeson) via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 12 20:03:14 PDT 2019


wuzish added a comment.

In D32201#1625379 <https://reviews.llvm.org/D32201#1625379>, @wmi wrote:

> In D32201#1620644 <https://reviews.llvm.org/D32201#1620644>, @wuzish wrote:
>
> > Should this good patch be rebased and continued to move on? @wmi 
> >  it'd be better to move on this work because D27366 <https://reviews.llvm.org/D27366> is abandoned and D34608 <https://reviews.llvm.org/D34608> is not updated for a long time, and those 3 patches are all trying to fix same issue and not landed successfully.
> >  It would be great If it can land.
>
>
> Thanks for bringing it to attention again.
>
> I still think the patch will be very helpful for some cases especially when dynamic profile information is available (when FDO/SampleFDO is used). It is tricky if there is only static profile available. I will reevaluate the patch and see how it works if I change the patch to be functioning only when we have dynamic profile. If you are more interesting on the case when dynamic profile is not available -- i.e., try to make the patch more general, feel free to take over it and I will be happy to join discussion and review.


How about using block frequency instead of dynamic profile information as reference if dynamic profile information is not available? And CSR cost may need to be adjusted to this comment said https://reviews.llvm.org/D27366#617886. For example, separate 2 cost, one for split and one for spill. And make the digital value sensible that if it's related to the target-dependent cost such as the equivalent number of copy which is related to the cycles between copy instruction and load/store instruction.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D32201/new/

https://reviews.llvm.org/D32201





More information about the llvm-commits mailing list