[PATCH] D44450: [InlineCost] Don't return early when allowSizeGrowth(CS) is false

Easwaran Raman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 14 10:17:50 PDT 2018


eraman added inline comments.


================
Comment at: lib/Analysis/InlineCost.cpp:845
+  // to 0. We only want to inline if it has 0 cost or better in this case.
+  bool AllowSizeGrowth = allowSizeGrowth(CS);
+  if (!AllowSizeGrowth)
----------------
Move the code applying last-call-to-static bonus to the top. Then,  you could early exit after setting the threshold to 0 under the !allowSizeGrowth condition. 


https://reviews.llvm.org/D44450





More information about the llvm-commits mailing list