diff options
author | Torok Edwin <edwintorok@gmail.com> | 2009-05-23 14:06:57 +0000 |
---|---|---|
committer | Torok Edwin <edwintorok@gmail.com> | 2009-05-23 14:06:57 +0000 |
commit | 7996339dd8d6485f23ccebddbc464cc912a84e2a (patch) | |
tree | 4838390ff61d86db54e5ddeaf5c2262a83212179 /llvm/lib/Transforms/Utils/InlineCost.cpp | |
parent | 53a71147bae783da16253bf80f4d0c9e4a8aba50 (diff) | |
download | bcm5719-llvm-7996339dd8d6485f23ccebddbc464cc912a84e2a.tar.gz bcm5719-llvm-7996339dd8d6485f23ccebddbc464cc912a84e2a.zip |
available_externall linkage is not local, this was confusing the codegenerator,
and it wasn't generating calls through @PLT for these functions.
hasLocalLinkage() is now false for available_externally,
I attempted to fix the inliner and dce to handle available_externally properly.
It passed make check.
llvm-svn: 72328
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineCost.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineCost.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineCost.cpp b/llvm/lib/Transforms/Utils/InlineCost.cpp index c9eb0ea1c90..87aff01a585 100644 --- a/llvm/lib/Transforms/Utils/InlineCost.cpp +++ b/llvm/lib/Transforms/Utils/InlineCost.cpp @@ -189,7 +189,8 @@ InlineCost InlineCostAnalyzer::getInlineCost(CallSite CS, // If there is only one call of the function, and it has internal linkage, // make it almost guaranteed to be inlined. // - if (Callee->hasLocalLinkage() && Callee->hasOneUse()) + if ((Callee->hasLocalLinkage() || Callee->hasAvailableExternallyLinkage()) && + Callee->hasOneUse()) InlineCost -= 15000; // If this function uses the coldcc calling convention, prefer not to inline |