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

Jun Bum Lim via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 15 11:15:02 PST 2015


junbuml added inline comments.

================
Comment at: lib/Analysis/InlineCost.cpp:1444
@@ +1443,3 @@
+  // Listen to the cold attribute when it would decrease the threshold.
+  bool ColdCallee = Callee->hasFnAttribute(Attribute::Cold);
+  // Command line argument for DefaultInlineThreshold will override the default
----------------
It appears that here we check only fn attributes for Callee, but I think it's also possible for a CS can have its own attributes. Shouldn't we check CS.hasFnAttr(Attribute::Cold) or CS.hasFnAttr(Attribute::InlineHint) as well?  E.g., a Callee itself is not Cold, but a CS to the Callee is Cold. If yes, may be a separate patch.


Repository:
  rL LLVM

http://reviews.llvm.org/D15401





More information about the llvm-commits mailing list