[PATCH] D15401: Refactor threshold computation for inline cost analysis
David Li via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 15 12:42:54 PST 2015
davidxl 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
----------------
junbuml wrote:
> 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.
This is a refactoring patch, so what you suggested can be done in a separate patch.
Repository:
rL LLVM
http://reviews.llvm.org/D15401
More information about the llvm-commits
mailing list