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

Wei Mi via llvm-commits llvm-commits at lists.llvm.org
Fri May 5 10:35:51 PDT 2017


On Thu, May 4, 2017 at 9:46 PM, Eric Christopher via Phabricator
<reviews at reviews.llvm.org> wrote:
> echristo added a comment.
>
> In general I'm a fan of the change, however, it feels like the heuristic value is somewhat unintelligable on scan. I.e. what's the difference between 1 << 13 and 5 (or any other value)? :)

It assumes the entry frequency is 1 << 14, so 1 << 13 means 1/2 func
entry frequency. 5 just means very cold compared to func entry.

>
> Is there something we could do to make this easier or more friendly to tune?

I already added an option for that: regalloc-csr-first-time-cost. If
it is set, it will override the target specific value. Like if we
specify -mllvm -regalloc-csr-first-time-cost=1<<12, the CSRCost will
be 1/4 func entry frequency.

>
> Thanks!
>
> -eric
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D32201
>
>
>


More information about the llvm-commits mailing list