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

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 8 14:23:25 PST 2020


davidxl added inline comments.


================
Comment at: llvm/lib/Analysis/InlineCost.cpp:2016
   // functions (and hence DT and LI will hopefully be cheap).
   if (Caller->hasMinSize()) {
     DominatorTree DT(F);
----------------
eraman wrote:
> mtrofin wrote:
> > eraman wrote:
> > > Shouldn't this entire block be moved to InlineCostCallAnalyzer as this isn't performing symbolic evaluation or legality check?
> > Possibly, but all that prep work - getting a DominatorTree, LoopInfo, going over loops, making sure we ignore those that aren't executed - would be necessary if we want to account the number of loops somehow. 
> Well, all this prep work is for cost computation right? Again, since the goal is to keep only symbolic analysis + legality check  here,  why keep these here?
This looks like cost computation specific and should probably be moved to the derived class.  It can query the base class about deadblocks.


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