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/Utils | |
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/Utils')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineCost.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineCost.cpp b/llvm/lib/Transforms/Utils/InlineCost.cpp index 5c97fd2f706..2eaec06b353 100644 --- a/llvm/lib/Transforms/Utils/InlineCost.cpp +++ b/llvm/lib/Transforms/Utils/InlineCost.cpp @@ -221,6 +221,9 @@ int InlineCostAnalyzer::getInlineCost(CallSite CS, // If we should never inline this, return a huge cost. if (CalleeFI.NeverInline) return 2000000000; + + if (Callee->getNotes() & FN_NOTE_AlwaysInline) + return -2000000000; // Add to the inline quality for properties that make the call valuable to // inline. This includes factors that indicate that the result of inlining |