Add InlineCost class for represent the estimated cost of inlining a

function.
 - This explicitly models the costs for functions which should
   "always" or "never" be inlined. This fixes bugs where such costs
   were not previously respected.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58450 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar
2008-10-30 19:26:59 +00:00
parent fa7935fcb3
commit c5e1ec47c7
8 changed files with 97 additions and 18 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ namespace {
SimpleInliner() : Inliner(&ID) {}
SimpleInliner(int Threshold) : Inliner(&ID, Threshold) {}
static char ID; // Pass identification, replacement for typeid
int getInlineCost(CallSite CS) {
InlineCost getInlineCost(CallSite CS) {
return CA.getInlineCost(CS, NeverInline);
}
float getInlineFudgeFactor(CallSite CS) {