[PATCH] D59715: [HotColdSplit] Reflect full cost of parameters in split penalty
Ruijie Fang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 10 15:55:44 PDT 2020
rjf added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/HotColdSplitting.cpp:88
+static cl::opt<int> MaxParametersForSplit(
+ "hotcoldsplit-max-params", cl::init(8), cl::Hidden,
----------------
xbolva00 wrote:
> vsk wrote:
> > hiraditya wrote:
> > > vsk wrote:
> > > > hiraditya wrote:
> > > > > Should we initialize this to be same as # of argument registers. Any arguments more than supported by argument registers are generally stored on stack and may add to code-size overhead both in caller and callee.
> > > > Ah, do you mean the number of arguments that can be passed by register? If so, yes, that seems like a straightforward improvement.
> > > yes
> > I had a look at TargetLowering, TargetCallingConv and a few related interfaces, but couldn't find a way to determine the number of gprs available for pointer-sized call arguments. The necessary information is available in .td files, e.g. for AArch64 there's an entry for:
> >
> > ```
> > CCIfType<[i32], CCAssignToRegWithShadow<[W0, W1, W2, W3, W4, W5, W6, W7],
> > [X0, X1, X2, X3, X4, X5, X6, X7]>>,
> > ```
> >
> > Do you know whether there's a straightforward way to surface that?
> Maybe @ctopper knows?
Is there a way to get access to a `TargetMachine` instance here? If so, then maybe then you can use `MCRegisterInfo::getNumRegs()` which can be accessed via `TargetMachine` to get the number of registers (Apologies in advance if this isn't helping).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59715/new/
https://reviews.llvm.org/D59715
More information about the llvm-commits
mailing list