[PATCH] D30651: [InlineCost, -Oz] Don't take into account the penalty of a fast call of frequently used functions

Evgeny Astigeevich via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 8 10:45:34 PST 2017


eastig added inline comments.


================
Comment at: lib/Analysis/InlineCost.cpp:1216
+
+  return (Callee->getNumUses() >= static_cast<unsigned>(FrqFuncThreshold));
+}
----------------
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?


https://reviews.llvm.org/D30651





More information about the llvm-commits mailing list