diff options
author | Dale Johannesen <dalej@apple.com> | 2008-02-19 21:38:47 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-02-19 21:38:47 +0000 |
commit | 89268bc6e2c11c951d1c37f100696bff48d58fbf (patch) | |
tree | 7a654c3dd76155923833fd2ae7636110938cf813 /llvm/lib/Transforms/IPO/ArgumentPromotion.cpp | |
parent | 4ae998528531ad6719d3503fce1e72e5a4d589b6 (diff) | |
download | bcm5719-llvm-89268bc6e2c11c951d1c37f100696bff48d58fbf.tar.gz bcm5719-llvm-89268bc6e2c11c951d1c37f100696bff48d58fbf.zip |
Expand ParameterAttributes to 32 bits (in preparation
for adding alignment info, not there yet). Clean up
interfaces to reference ParameterAttributes consistently.
llvm-svn: 47342
Diffstat (limited to 'llvm/lib/Transforms/IPO/ArgumentPromotion.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/ArgumentPromotion.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp index 4486677e630..894e6ba564b 100644 --- a/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -405,7 +405,7 @@ Function *ArgPromotion::DoPromotion(Function *F, const ParamAttrsList *PAL = F->getParamAttrs(); // Add any return attributes. - if (unsigned attrs = PAL ? PAL->getParamAttrs(0) : 0) + if (ParameterAttributes attrs = PAL ? PAL->getParamAttrs(0) : ParamAttr::None) ParamAttrsVec.push_back(ParamAttrsWithIndex::get(0, attrs)); unsigned ArgIndex = 1; @@ -420,7 +420,8 @@ Function *ArgPromotion::DoPromotion(Function *F, ++NumByValArgsPromoted; } else if (!ArgsToPromote.count(I)) { Params.push_back(I->getType()); - if (unsigned attrs = PAL ? PAL->getParamAttrs(ArgIndex) : 0) + if (ParameterAttributes attrs = PAL ? PAL->getParamAttrs(ArgIndex) : + ParamAttr::None) ParamAttrsVec.push_back(ParamAttrsWithIndex::get(Params.size(), attrs)); } else if (I->use_empty()) { ++NumArgumentsDead; @@ -496,7 +497,8 @@ Function *ArgPromotion::DoPromotion(Function *F, PAL = CS.getParamAttrs(); // Add any return attributes. - if (unsigned attrs = PAL ? PAL->getParamAttrs(0) : 0) + if (ParameterAttributes attrs = PAL ? PAL->getParamAttrs(0) : + ParamAttr::None) ParamAttrsVec.push_back(ParamAttrsWithIndex::get(0, attrs)); // Loop over the operands, inserting GEP and loads in the caller as @@ -508,7 +510,8 @@ Function *ArgPromotion::DoPromotion(Function *F, if (!ArgsToPromote.count(I) && !ByValArgsToTransform.count(I)) { Args.push_back(*AI); // Unmodified argument - if (unsigned Attrs = PAL ? PAL->getParamAttrs(ArgIndex) : 0) + if (ParameterAttributes Attrs = PAL ? PAL->getParamAttrs(ArgIndex) : + ParamAttr::None) ParamAttrsVec.push_back(ParamAttrsWithIndex::get(Args.size(), Attrs)); } else if (ByValArgsToTransform.count(I)) { @@ -547,7 +550,8 @@ Function *ArgPromotion::DoPromotion(Function *F, // Push any varargs arguments on the list for (; AI != CS.arg_end(); ++AI, ++ArgIndex) { Args.push_back(*AI); - if (unsigned Attrs = PAL ? PAL->getParamAttrs(ArgIndex) : 0) + if (ParameterAttributes Attrs = PAL ? PAL->getParamAttrs(ArgIndex) : + ParamAttr::None) ParamAttrsVec.push_back(ParamAttrsWithIndex::get(Args.size(), Attrs)); } |