[PATCH] D37087: [InlineCost] Small changes to early exit condition. NFC.

Evgeny Astigeevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 24 03:35:01 PDT 2017


eastig added inline comments.


================
Comment at: lib/Analysis/InlineCost.cpp:1209
 
-  if (CostLowerBound > Threshold && !ComputeFullInlineCost) {
+  if (CostLowerBound >= Threshold && !ComputeFullInlineCost) {
     Cost = CostLowerBound;
----------------
I don't think this is NFC. In visitSwitchInst I see the cost is calculating based on a result of TTI.getEstimatedNumberOfCaseClusters. If threshold is big (-O1 and above) this might not be a problem but if it is low (-Os, -Oz) this might be a problem.



Repository:
  rL LLVM

https://reviews.llvm.org/D37087





More information about the llvm-commits mailing list