[PATCH] D30651: [InlineCost, -Oz] Don't take into account the penalty of a fast call of frequently used functions
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 8 10:52:23 PST 2017
efriedma added inline comments.
================
Comment at: lib/Analysis/InlineCost.cpp:1216
+
+ return (Callee->getNumUses() >= static_cast<unsigned>(FrqFuncThreshold));
+}
----------------
eastig wrote:
> efriedma wrote:
> > This comparison seems backwards... generally, we assume non-local functions have many callers, and therefore treat them the same way as local functions with many callers.
> If I understand you correctly you mean this:
>
> ```
> if (!Callee || !Callee->hasLocalStorage())
> return true;
> ```
> Do I?
Yes.
https://reviews.llvm.org/D30651
More information about the llvm-commits
mailing list