[PATCH] D59715: [HotColdSplit] Reflect full cost of parameters in split penalty

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 13:01:21 PDT 2020


vsk marked an inline comment as not done.
vsk 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,
----------------
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?


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

https://reviews.llvm.org/D59715



More information about the llvm-commits mailing list