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

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Fri May 5 20:25:13 PDT 2017


On Fri, May 5, 2017 at 10:35 AM Wei Mi via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> 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.
>
>
Right. The numbers are fairly hard to rationalize about unless you happen
to know those magic numbers. Perhaps would could add some easier way to
know what these constants are?

Or at least document them.

-eric


> >
> > 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
> >
> >
> >
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170506/5709cd7b/attachment.html>


More information about the llvm-commits mailing list