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

Aditya Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 2 17:38:48 PDT 2020


hiraditya 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,
----------------
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.


================
Comment at: llvm/lib/Transforms/IPO/HotColdSplitting.cpp:309
+  unsigned NumSplitExitPhis = 0;
+  for (BasicBlock *ExitBB : SuccsOutsideRegion) {
+    for (PHINode &PN : ExitBB->phis()) {
----------------
Do we have a limit on max # successors outside of the region? In pathological cases this piece of code may have super linear time complexity. If we dont encounter this often then this seems fine though.


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

https://reviews.llvm.org/D59715



More information about the llvm-commits mailing list