diff options
| author | Devang Patel <dpatel@apple.com> | 2008-09-03 18:47:45 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2008-09-03 18:47:45 +0000 |
| commit | 0d442ffa2b244cdf468d99c42b07ae6cf5af9780 (patch) | |
| tree | a66c989b05f2a36eb8a2e8a62d24380c72e54a8c /llvm/lib/Transforms/IPO | |
| parent | 79661994b1186e252a272ce0097cafc7120c3244 (diff) | |
| download | bcm5719-llvm-0d442ffa2b244cdf468d99c42b07ae6cf5af9780.tar.gz bcm5719-llvm-0d442ffa2b244cdf468d99c42b07ae6cf5af9780.zip | |
Handle "always inline" note during inline cost analysis.
llvm-svn: 55712
Diffstat (limited to 'llvm/lib/Transforms/IPO')
| -rw-r--r-- | llvm/lib/Transforms/IPO/Inliner.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp index 3ea16208a52..1c3d5a81f36 100644 --- a/llvm/lib/Transforms/IPO/Inliner.cpp +++ b/llvm/lib/Transforms/IPO/Inliner.cpp @@ -140,12 +140,7 @@ bool Inliner::runOnSCC(const std::vector<CallGraphNode*> &SCC) { int InlineCost = getInlineCost(CS); float FudgeFactor = getInlineFudgeFactor(CS); - Function *Fn = CS.getCalledFunction(); - bool AlwaysInline = false; - if (Fn && (Fn->getNotes() & FN_NOTE_AlwaysInline)) - AlwaysInline = true; - if (!AlwaysInline - && InlineCost >= (int)(InlineThreshold * FudgeFactor)) { + if (InlineCost >= (int)(InlineThreshold * FudgeFactor)) { DOUT << " NOT Inlining: cost=" << InlineCost << ", Call: " << *CS.getInstruction(); } else { |

