diff options
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/IPO/ArgumentPromotion.cpp | 10 | ||||
-rw-r--r-- | lib/Transforms/IPO/DeadArgumentElimination.cpp | 10 | ||||
-rw-r--r-- | lib/Transforms/IPO/PruneEH.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/IPO/StructRetPromotion.cpp | 8 | ||||
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 16 | ||||
-rw-r--r-- | lib/Transforms/Scalar/MemCpyOptimizer.cpp | 1 | ||||
-rw-r--r-- | lib/Transforms/Scalar/SimplifyCFGPass.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/InlineFunction.cpp | 2 |
8 files changed, 25 insertions, 26 deletions
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index f3b29fe61b..a1d8c75bd3 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -508,7 +508,7 @@ Function *ArgPromotion::DoPromotion(Function *F, const PAListPtr &PAL = F->getParamAttrs(); // Add any return attributes. - if (ParameterAttributes attrs = PAL.getParamAttrs(0)) + if (Attributes attrs = PAL.getParamAttrs(0)) ParamAttrsVec.push_back(ParamAttrsWithIndex::get(0, attrs)); // First, determine the new argument list @@ -525,7 +525,7 @@ Function *ArgPromotion::DoPromotion(Function *F, } else if (!ArgsToPromote.count(I)) { // Unchanged argument Params.push_back(I->getType()); - if (ParameterAttributes attrs = PAL.getParamAttrs(ArgIndex)) + if (Attributes attrs = PAL.getParamAttrs(ArgIndex)) ParamAttrsVec.push_back(ParamAttrsWithIndex::get(Params.size(), attrs)); } else if (I->use_empty()) { // Dead argument (which are always marked as promotable) @@ -621,7 +621,7 @@ Function *ArgPromotion::DoPromotion(Function *F, const PAListPtr &CallPAL = CS.getParamAttrs(); // Add any return attributes. - if (ParameterAttributes attrs = CallPAL.getParamAttrs(0)) + if (Attributes attrs = CallPAL.getParamAttrs(0)) ParamAttrsVec.push_back(ParamAttrsWithIndex::get(0, attrs)); // Loop over the operands, inserting GEP and loads in the caller as @@ -633,7 +633,7 @@ Function *ArgPromotion::DoPromotion(Function *F, if (!ArgsToPromote.count(I) && !ByValArgsToTransform.count(I)) { Args.push_back(*AI); // Unmodified argument - if (ParameterAttributes Attrs = CallPAL.getParamAttrs(ArgIndex)) + if (Attributes Attrs = CallPAL.getParamAttrs(ArgIndex)) ParamAttrsVec.push_back(ParamAttrsWithIndex::get(Args.size(), Attrs)); } else if (ByValArgsToTransform.count(I)) { @@ -688,7 +688,7 @@ Function *ArgPromotion::DoPromotion(Function *F, // Push any varargs arguments on the list for (; AI != CS.arg_end(); ++AI, ++ArgIndex) { Args.push_back(*AI); - if (ParameterAttributes Attrs = CallPAL.getParamAttrs(ArgIndex)) + if (Attributes Attrs = CallPAL.getParamAttrs(ArgIndex)) ParamAttrsVec.push_back(ParamAttrsWithIndex::get(Args.size(), Attrs)); } diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp index ec8f1364e8..724d2b36d0 100644 --- a/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp @@ -593,7 +593,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) { const PAListPtr &PAL = F->getParamAttrs(); // The existing function return attributes. - ParameterAttributes RAttrs = PAL.getParamAttrs(0); + Attributes RAttrs = PAL.getParamAttrs(0); // Find out the new return value. @@ -678,7 +678,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) { // Get the original parameter attributes (skipping the first one, that is // for the return value. - if (ParameterAttributes Attrs = PAL.getParamAttrs(i + 1)) + if (Attributes Attrs = PAL.getParamAttrs(i + 1)) ParamAttrsVec.push_back(ParamAttrsWithIndex::get(Params.size(), Attrs)); } else { ++NumArgumentsEliminated; @@ -730,7 +730,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) { const PAListPtr &CallPAL = CS.getParamAttrs(); // The call return attributes. - ParameterAttributes RAttrs = CallPAL.getParamAttrs(0); + Attributes RAttrs = CallPAL.getParamAttrs(0); // Adjust in case the function was changed to return void. RAttrs &= ~ParamAttr::typeIncompatible(NF->getReturnType()); if (RAttrs) @@ -746,7 +746,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) { if (ArgAlive[i]) { Args.push_back(*I); // Get original parameter attributes, but skip return attributes. - if (ParameterAttributes Attrs = CallPAL.getParamAttrs(i + 1)) + if (Attributes Attrs = CallPAL.getParamAttrs(i + 1)) ParamAttrsVec.push_back(ParamAttrsWithIndex::get(Args.size(), Attrs)); } @@ -756,7 +756,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) { // Push any varargs arguments on the list. Don't forget their attributes. for (CallSite::arg_iterator E = CS.arg_end(); I != E; ++I, ++i) { Args.push_back(*I); - if (ParameterAttributes Attrs = CallPAL.getParamAttrs(i + 1)) + if (Attributes Attrs = CallPAL.getParamAttrs(i + 1)) ParamAttrsVec.push_back(ParamAttrsWithIndex::get(Args.size(), Attrs)); } diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp index 297c6c1541..9968d59451 100644 --- a/lib/Transforms/IPO/PruneEH.cpp +++ b/lib/Transforms/IPO/PruneEH.cpp @@ -125,7 +125,7 @@ bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &SCC) { // If the SCC doesn't unwind or doesn't throw, note this fact. if (!SCCMightUnwind || !SCCMightReturn) for (unsigned i = 0, e = SCC.size(); i != e; ++i) { - ParameterAttributes NewAttributes = ParamAttr::None; + Attributes NewAttributes = ParamAttr::None; if (!SCCMightUnwind) NewAttributes |= ParamAttr::NoUnwind; diff --git a/lib/Transforms/IPO/StructRetPromotion.cpp b/lib/Transforms/IPO/StructRetPromotion.cpp index 8e6415b2ab..68f20eaf9f 100644 --- a/lib/Transforms/IPO/StructRetPromotion.cpp +++ b/lib/Transforms/IPO/StructRetPromotion.cpp @@ -210,7 +210,7 @@ Function *SRETPromotion::cloneFunctionBody(Function *F, const PAListPtr &PAL = F->getParamAttrs(); // Add any return attributes. - if (ParameterAttributes attrs = PAL.getParamAttrs(0)) + if (Attributes attrs = PAL.getParamAttrs(0)) ParamAttrsVec.push_back(ParamAttrsWithIndex::get(0, attrs)); // Skip first argument. @@ -221,7 +221,7 @@ Function *SRETPromotion::cloneFunctionBody(Function *F, unsigned ParamIndex = 2; while (I != E) { Params.push_back(I->getType()); - if (ParameterAttributes Attrs = PAL.getParamAttrs(ParamIndex)) + if (Attributes Attrs = PAL.getParamAttrs(ParamIndex)) ParamAttrsVec.push_back(ParamAttrsWithIndex::get(ParamIndex - 1, Attrs)); ++I; ++ParamIndex; @@ -264,7 +264,7 @@ void SRETPromotion::updateCallSites(Function *F, Function *NF) { const PAListPtr &PAL = F->getParamAttrs(); // Add any return attributes. - if (ParameterAttributes attrs = PAL.getParamAttrs(0)) + if (Attributes attrs = PAL.getParamAttrs(0)) ArgAttrsVec.push_back(ParamAttrsWithIndex::get(0, attrs)); // Copy arguments, however skip first one. @@ -276,7 +276,7 @@ void SRETPromotion::updateCallSites(Function *F, Function *NF) { unsigned ParamIndex = 2; while (AI != AE) { Args.push_back(*AI); - if (ParameterAttributes Attrs = PAL.getParamAttrs(ParamIndex)) + if (Attributes Attrs = PAL.getParamAttrs(ParamIndex)) ArgAttrsVec.push_back(ParamAttrsWithIndex::get(ParamIndex - 1, Attrs)); ++ParamIndex; ++AI; diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index e68e646b80..8a3ecbc448 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -9127,7 +9127,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { return false; // Cannot transform this return value. if (!CallerPAL.isEmpty() && !Caller->use_empty()) { - ParameterAttributes RAttrs = CallerPAL.getParamAttrs(0); + Attributes RAttrs = CallerPAL.getParamAttrs(0); if (RAttrs & ParamAttr::typeIncompatible(NewRetTy)) return false; // Attribute not compatible with transformed value. } @@ -9180,7 +9180,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { for (unsigned i = CallerPAL.getNumSlots(); i; --i) { if (CallerPAL.getSlot(i - 1).Index <= FT->getNumParams()) break; - ParameterAttributes PAttrs = CallerPAL.getSlot(i - 1).Attrs; + Attributes PAttrs = CallerPAL.getSlot(i - 1).Attrs; if (PAttrs & ParamAttr::VarArgsIncompatible) return false; } @@ -9193,7 +9193,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { attrVec.reserve(NumCommonArgs); // Get any return attributes. - ParameterAttributes RAttrs = CallerPAL.getParamAttrs(0); + Attributes RAttrs = CallerPAL.getParamAttrs(0); // If the return value is not being used, the type may not be compatible // with the existing attributes. Wipe out any problematic attributes. @@ -9216,7 +9216,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { } // Add any parameter attributes. - if (ParameterAttributes PAttrs = CallerPAL.getParamAttrs(i + 1)) + if (Attributes PAttrs = CallerPAL.getParamAttrs(i + 1)) attrVec.push_back(ParamAttrsWithIndex::get(i + 1, PAttrs)); } @@ -9246,7 +9246,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { } // Add any parameter attributes. - if (ParameterAttributes PAttrs = CallerPAL.getParamAttrs(i + 1)) + if (Attributes PAttrs = CallerPAL.getParamAttrs(i + 1)) attrVec.push_back(ParamAttrsWithIndex::get(i + 1, PAttrs)); } } @@ -9329,7 +9329,7 @@ Instruction *InstCombiner::transformCallThroughTrampoline(CallSite CS) { if (!NestAttrs.isEmpty()) { unsigned NestIdx = 1; const Type *NestTy = 0; - ParameterAttributes NestAttr = ParamAttr::None; + Attributes NestAttr = ParamAttr::None; // Look for a parameter marked with the 'nest' attribute. for (FunctionType::param_iterator I = NestFTy->param_begin(), @@ -9353,7 +9353,7 @@ Instruction *InstCombiner::transformCallThroughTrampoline(CallSite CS) { // mean appending it. Likewise for attributes. // Add any function result attributes. - if (ParameterAttributes Attr = Attrs.getParamAttrs(0)) + if (Attributes Attr = Attrs.getParamAttrs(0)) NewAttrs.push_back(ParamAttrsWithIndex::get(0, Attr)); { @@ -9374,7 +9374,7 @@ Instruction *InstCombiner::transformCallThroughTrampoline(CallSite CS) { // Add the original argument and attributes. NewArgs.push_back(*I); - if (ParameterAttributes Attr = Attrs.getParamAttrs(Idx)) + if (Attributes Attr = Attrs.getParamAttrs(Idx)) NewAttrs.push_back (ParamAttrsWithIndex::get(Idx + (Idx >= NestIdx), Attr)); diff --git a/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/lib/Transforms/Scalar/MemCpyOptimizer.cpp index 8810edb533..7ccca00239 100644 --- a/lib/Transforms/Scalar/MemCpyOptimizer.cpp +++ b/lib/Transforms/Scalar/MemCpyOptimizer.cpp @@ -16,7 +16,6 @@ #include "llvm/Transforms/Scalar.h" #include "llvm/IntrinsicInst.h" #include "llvm/Instructions.h" -#include "llvm/ParameterAttributes.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/Dominators.h" diff --git a/lib/Transforms/Scalar/SimplifyCFGPass.cpp b/lib/Transforms/Scalar/SimplifyCFGPass.cpp index de04fda915..1246afcfc0 100644 --- a/lib/Transforms/Scalar/SimplifyCFGPass.cpp +++ b/lib/Transforms/Scalar/SimplifyCFGPass.cpp @@ -27,7 +27,7 @@ #include "llvm/Constants.h" #include "llvm/Instructions.h" #include "llvm/Module.h" -#include "llvm/ParameterAttributes.h" +#include "llvm/Attributes.h" #include "llvm/Support/CFG.h" #include "llvm/Support/Compiler.h" #include "llvm/Pass.h" diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp index b0e70bb89a..1339740c37 100644 --- a/lib/Transforms/Utils/InlineFunction.cpp +++ b/lib/Transforms/Utils/InlineFunction.cpp @@ -18,7 +18,7 @@ #include "llvm/Module.h" #include "llvm/Instructions.h" #include "llvm/Intrinsics.h" -#include "llvm/ParameterAttributes.h" +#include "llvm/Attributes.h" #include "llvm/Analysis/CallGraph.h" #include "llvm/Target/TargetData.h" #include "llvm/ADT/SmallVector.h" |