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

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 20 20:16:58 PST 2019


davidxl added inline comments.


================
Comment at: llvm/lib/Analysis/InlineCost.cpp:149
+  virtual void onSwitch(unsigned NumCaseCluster) {}
+  virtual void onCommonInstruction() {}
+  virtual void onLoops(unsigned NumLoops) {}
----------------
Document -- similarly for other APIs overrider may need to define.


================
Comment at: llvm/lib/Analysis/InlineCost.cpp:150
+  virtual void onCommonInstruction() {}
+  virtual void onLoops(unsigned NumLoops) {}
+
----------------
document.


================
Comment at: llvm/lib/Analysis/InlineCost.cpp:156
+
+  virtual void onAggregateUsedInCallArgument(Value *Arg) {}
+  virtual void onAggregateUse(Value *V) {}
----------------
Should it be named 'onInitializeSROAArg' or something?


================
Comment at: llvm/lib/Analysis/InlineCost.cpp:157
+  virtual void onAggregateUsedInCallArgument(Value *Arg) {}
+  virtual void onAggregateUse(Value *V) {}
+
----------------
Document semantics of the API. Also should it be renamed 'onAggregateSROAUse'?


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