[PATCH] D15401: Refactor threshold computation for inline cost analysis

hfinkel@anl.gov via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 9 20:29:11 PST 2015


hfinkel added a subscriber: hfinkel.

================
Comment at: include/llvm/Analysis/InlineCost.h:145
@@ +144,3 @@
+/// \brief Compute threshold for a given optimization level.
+int computeThresholdFromOptLevels(unsigned OptLevel, unsigned SizeOptLevel);
+
----------------
Given that we don't really have a SizeOptLevel in LLVM, but -Os, -Oz settings, we should document here what SizeOptLevel means.

================
Comment at: lib/Analysis/InlineCost.cpp:1421
@@ +1420,3 @@
+  bool OptSize = Caller && !Caller->isDeclaration() &&
+                 // FIXME: Use Function::optForSize().
+                 Caller->hasFnAttribute(Attribute::OptimizeForSize);
----------------
Seems like we could fix this FIXME while we're here.



Repository:
  rL LLVM

http://reviews.llvm.org/D15401





More information about the llvm-commits mailing list