[PATCH] D15701: Refactor inline costs analysis by removing the InlineCostAnalysis class

Easwaran Raman via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 21 13:26:37 PST 2015


eraman created this revision.
eraman added a reviewer: chandlerc.
eraman added subscribers: llvm-commits, davidxl.
eraman set the repository for this revision to rL LLVM.

InlineCostAnalysis is an analysis pass without any need for it to be one. Once it stops being an analysis pass, it doesn't maintain any useful state and the member functions inside can be made free functions. NFC.

(Note: InlineCost.h has the following comment for getInlineCost, a member function of InlineCostAnalysis:

-  //  Note: This is used by out-of-tree passes, please do not remove without
-  //  adding a replacement API.

I am not sure what this means, but this refactoring makes this into a free function with extra parameters)

Repository:
  rL LLVM

http://reviews.llvm.org/D15701

Files:
  include/llvm/Analysis/InlineCost.h
  include/llvm/InitializePasses.h
  lib/Analysis/InlineCost.cpp
  lib/Transforms/IPO/InlineAlways.cpp
  lib/Transforms/IPO/InlineSimple.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15701.43397.patch
Type: text/x-patch
Size: 11772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151221/6ea49f5a/attachment.bin>


More information about the llvm-commits mailing list