diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-12-19 07:18:57 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-12-19 07:18:57 +0000 |
commit | 034b94b17006f51722886b0f2283fb6fb19aca1f (patch) | |
tree | e42e091c12137e9599d0e58bfa4336c4af7333b3 /lib/Transforms/IPO/Inliner.cpp | |
parent | 85022561f9c78446bbc5f745cd9b58f4e5dc92ec (diff) |
Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170502 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/Inliner.cpp')
-rw-r--r-- | lib/Transforms/IPO/Inliner.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Transforms/IPO/Inliner.cpp b/lib/Transforms/IPO/Inliner.cpp index b636414250..a854beb9b1 100644 --- a/lib/Transforms/IPO/Inliner.cpp +++ b/lib/Transforms/IPO/Inliner.cpp @@ -93,11 +93,11 @@ static bool InlineCallIfPossible(CallSite CS, InlineFunctionInfo &IFI, // If the inlined function had a higher stack protection level than the // calling function, then bump up the caller's stack protection level. - if (Callee->getFnAttributes().hasAttribute(Attributes::StackProtectReq)) - Caller->addFnAttr(Attributes::StackProtectReq); - else if (Callee->getFnAttributes().hasAttribute(Attributes::StackProtect) && - !Caller->getFnAttributes().hasAttribute(Attributes::StackProtectReq)) - Caller->addFnAttr(Attributes::StackProtect); + if (Callee->getFnAttributes().hasAttribute(Attribute::StackProtectReq)) + Caller->addFnAttr(Attribute::StackProtectReq); + else if (Callee->getFnAttributes().hasAttribute(Attribute::StackProtect) && + !Caller->getFnAttributes().hasAttribute(Attribute::StackProtectReq)) + Caller->addFnAttr(Attribute::StackProtect); // Look at all of the allocas that we inlined through this call site. If we // have already inlined other allocas through other calls into this function, @@ -209,7 +209,7 @@ unsigned Inliner::getInlineThreshold(CallSite CS) const { // would decrease the threshold. Function *Caller = CS.getCaller(); bool OptSize = Caller && !Caller->isDeclaration() && - Caller->getFnAttributes().hasAttribute(Attributes::OptimizeForSize); + Caller->getFnAttributes().hasAttribute(Attribute::OptimizeForSize); if (!(InlineLimit.getNumOccurrences() > 0) && OptSize && OptSizeThreshold < thres) thres = OptSizeThreshold; @@ -218,9 +218,9 @@ unsigned Inliner::getInlineThreshold(CallSite CS) const { // and the caller does not need to minimize its size. Function *Callee = CS.getCalledFunction(); bool InlineHint = Callee && !Callee->isDeclaration() && - Callee->getFnAttributes().hasAttribute(Attributes::InlineHint); + Callee->getFnAttributes().hasAttribute(Attribute::InlineHint); if (InlineHint && HintThreshold > thres - && !Caller->getFnAttributes().hasAttribute(Attributes::MinSize)) + && !Caller->getFnAttributes().hasAttribute(Attribute::MinSize)) thres = HintThreshold; return thres; @@ -536,7 +536,7 @@ bool Inliner::removeDeadFunctions(CallGraph &CG, bool AlwaysInlineOnly) { // about always-inline functions. This is a bit of a hack to share code // between here and the InlineAlways pass. if (AlwaysInlineOnly && - !F->getFnAttributes().hasAttribute(Attributes::AlwaysInline)) + !F->getFnAttributes().hasAttribute(Attribute::AlwaysInline)) continue; // If the only remaining users of the function are dead constants, remove |