[PATCH] D53824: [HotColdSplitting] Allow outlining single-block cold regions

Jun Bum Lim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 29 13:02:42 PDT 2018


junbuml added inline comments.


================
Comment at: llvm/trunk/lib/Transforms/IPO/HotColdSplitting.cpp:145
+      continue;
+    if (++Count >= Min)
+      return true;
----------------
Don't you think using TTI.getInstructionCost(&I, TargetTransformInfo::TCK_CodeSize) is the right thing to do instead of counting the number of instruction? 


================
Comment at: llvm/trunk/lib/Transforms/IPO/HotColdSplitting.cpp:245
+  if (ColdRegion.size() == 1 &&
+      !hasMinimumInstCount(*ColdRegion[0], MinOutliningInstCount))
     return {};
----------------
Why don't you use MinOutliningInstCount directly in hasMinimumInstCount() instead of passing as a parameter? 


Repository:
  rL LLVM

https://reviews.llvm.org/D53824





More information about the llvm-commits mailing list