diff options
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/IPO/InlineAlways.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Transforms/IPO/InlineSimple.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Transforms/IPO/Inliner.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopUnswitch.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineCost.cpp | 2 |
5 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/IPO/InlineAlways.cpp b/llvm/lib/Transforms/IPO/InlineAlways.cpp index 448f2461411..1079c4ad738 100644 --- a/llvm/lib/Transforms/IPO/InlineAlways.cpp +++ b/llvm/lib/Transforms/IPO/InlineAlways.cpp @@ -63,7 +63,7 @@ bool AlwaysInliner::doInitialization(CallGraph &CG) { for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) - if (!I->isDeclaration() && !I->hasNote(Attribute::AlwaysInline)) + if (!I->isDeclaration() && !I->hasFnAttr(Attribute::AlwaysInline)) NeverInline.insert(I); return false; diff --git a/llvm/lib/Transforms/IPO/InlineSimple.cpp b/llvm/lib/Transforms/IPO/InlineSimple.cpp index b19494a6a41..02cae2a6e67 100644 --- a/llvm/lib/Transforms/IPO/InlineSimple.cpp +++ b/llvm/lib/Transforms/IPO/InlineSimple.cpp @@ -65,7 +65,7 @@ bool SimpleInliner::doInitialization(CallGraph &CG) { for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) - if (!I->isDeclaration() && I->hasNote(Attribute::NoInline)) + if (!I->isDeclaration() && I->hasFnAttr(Attribute::NoInline)) NeverInline.insert(I); // Get llvm.noinline diff --git a/llvm/lib/Transforms/IPO/Inliner.cpp b/llvm/lib/Transforms/IPO/Inliner.cpp index abc10944141..c2672720040 100644 --- a/llvm/lib/Transforms/IPO/Inliner.cpp +++ b/llvm/lib/Transforms/IPO/Inliner.cpp @@ -141,7 +141,8 @@ bool Inliner::runOnSCC(const std::vector<CallGraphNode*> &SCC) { int CurrentThreshold = InlineThreshold; Function *Fn = CS.getCaller(); - if (Fn && !Fn->isDeclaration() && Fn->hasNote(Attribute::OptimizeForSize) + if (Fn && !Fn->isDeclaration() + && Fn->hasFnAttr(Attribute::OptimizeForSize) && InlineThreshold != 50) { CurrentThreshold = 50; } diff --git a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp index 15eaa786bea..fbfe2977278 100644 --- a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -430,7 +430,7 @@ bool LoopUnswitch::UnswitchIfProfitable(Value *LoopCond, Constant *Val){ Function *F = loopHeader->getParent(); // Do not unswitch if the function is optimized for size. - if (!F->isDeclaration() && F->hasNote(Attribute::OptimizeForSize)) + if (!F->isDeclaration() && F->hasFnAttr(Attribute::OptimizeForSize)) return false; // Check to see if it would be profitable to unswitch current loop. diff --git a/llvm/lib/Transforms/Utils/InlineCost.cpp b/llvm/lib/Transforms/Utils/InlineCost.cpp index 55755c1995e..d0b51855d9c 100644 --- a/llvm/lib/Transforms/Utils/InlineCost.cpp +++ b/llvm/lib/Transforms/Utils/InlineCost.cpp @@ -222,7 +222,7 @@ int InlineCostAnalyzer::getInlineCost(CallSite CS, if (CalleeFI.NeverInline) return 2000000000; - if (!Callee->isDeclaration() && Callee->hasNote(Attribute::AlwaysInline)) + if (!Callee->isDeclaration() && Callee->hasFnAttr(Attribute::AlwaysInline)) return -2000000000; // Add to the inline quality for properties that make the call valuable to |