[PATCH] D71733: [NFC][InlineCost] Factor cost modeling out of CallAnalyzer traversal.

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 19 18:43:51 PST 2019


davidxl added inline comments.


================
Comment at: llvm/lib/Analysis/InlineCost.cpp:131
+  /// Extension points for handling callsite features.
+  virtual void OnBlockAnalyzed(const BasicBlock *BB) = 0;
+  virtual InlineResult FinalizeAnalysis() = 0;
----------------
Can you document each handler in source?

Also does it make more sense to provide a dummy empty body so that users are not forced to implement all of them?


================
Comment at: llvm/lib/Analysis/InlineCost.cpp:301
 
+class DefaultCallAnalyzer : public CallAnalyzer {
+  const int CostUpperBound = INT_MAX - InlineConstants::InstrCost - 1;
----------------
InlineCostCallAnalyzer?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71733





More information about the llvm-commits mailing list