[PATCH] D92780: [InlineCost] Implement cost-benefit-based inliner

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 10:02:13 PST 2020


davidxl added a comment.

I suggest also dumping some opt remarks under --pass-remarks-analysis. This also allows you to write test cases to cover various types of savings.



================
Comment at: llvm/lib/Analysis/InlineCost.cpp:701
+
+    if (!CalleeBFI->getBlockProfileCount(&(F.getEntryBlock())))
+      return false;
----------------
Use interface  Function::getEntryCount  or Function::hasProfileData instead.


================
Comment at: llvm/lib/Analysis/InlineCost.cpp:753
+        }
+        // TODO: Consider other forms of savings like switch statements,
+        // indirect calls becoming direct, SROACostSavings, LoadEliminationCost,
----------------
how about load & store instructions that can be SROAed?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92780/new/

https://reviews.llvm.org/D92780



More information about the llvm-commits mailing list