summaryrefslogtreecommitdiffstats
path: root/lib/Transforms/IPO
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2008-09-24 00:55:02 +0000
committerDevang Patel <dpatel@apple.com>2008-09-24 00:55:02 +0000
commite3d76d37e972d6f7b1335a3944ce31ae8f4cd3c9 (patch)
tree9486c5db47b3b661eb15d77b56bd55f5a1fdf44a /lib/Transforms/IPO
parent3d8cd9ec10bd394a4b6d7c8f57a5b37e2d46634d (diff)
downloadexternal_llvm-e3d76d37e972d6f7b1335a3944ce31ae8f4cd3c9.zip
external_llvm-e3d76d37e972d6f7b1335a3944ce31ae8f4cd3c9.tar.gz
external_llvm-e3d76d37e972d6f7b1335a3944ce31ae8f4cd3c9.tar.bz2
s/ParamAttrsWithIndex/FnAttributeWithIndex/g
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56535 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO')
-rw-r--r--lib/Transforms/IPO/ArgumentPromotion.cpp12
-rw-r--r--lib/Transforms/IPO/DeadArgumentElimination.cpp14
-rw-r--r--lib/Transforms/IPO/StructRetPromotion.cpp12
3 files changed, 19 insertions, 19 deletions
diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp
index a1d8c75..d71ed94 100644
--- a/lib/Transforms/IPO/ArgumentPromotion.cpp
+++ b/lib/Transforms/IPO/ArgumentPromotion.cpp
@@ -504,12 +504,12 @@ Function *ArgPromotion::DoPromotion(Function *F,
// ParamAttrs - Keep track of the parameter attributes for the arguments
// that we are *not* promoting. For the ones that we do promote, the parameter
// attributes are lost
- SmallVector<ParamAttrsWithIndex, 8> ParamAttrsVec;
+ SmallVector<FnAttributeWithIndex, 8> ParamAttrsVec;
const PAListPtr &PAL = F->getParamAttrs();
// Add any return attributes.
if (Attributes attrs = PAL.getParamAttrs(0))
- ParamAttrsVec.push_back(ParamAttrsWithIndex::get(0, attrs));
+ ParamAttrsVec.push_back(FnAttributeWithIndex::get(0, attrs));
// First, determine the new argument list
unsigned ArgIndex = 1;
@@ -526,7 +526,7 @@ Function *ArgPromotion::DoPromotion(Function *F,
// Unchanged argument
Params.push_back(I->getType());
if (Attributes attrs = PAL.getParamAttrs(ArgIndex))
- ParamAttrsVec.push_back(ParamAttrsWithIndex::get(Params.size(), attrs));
+ ParamAttrsVec.push_back(FnAttributeWithIndex::get(Params.size(), attrs));
} else if (I->use_empty()) {
// Dead argument (which are always marked as promotable)
++NumArgumentsDead;
@@ -622,7 +622,7 @@ Function *ArgPromotion::DoPromotion(Function *F,
// Add any return attributes.
if (Attributes attrs = CallPAL.getParamAttrs(0))
- ParamAttrsVec.push_back(ParamAttrsWithIndex::get(0, attrs));
+ ParamAttrsVec.push_back(FnAttributeWithIndex::get(0, attrs));
// Loop over the operands, inserting GEP and loads in the caller as
// appropriate.
@@ -634,7 +634,7 @@ Function *ArgPromotion::DoPromotion(Function *F,
Args.push_back(*AI); // Unmodified argument
if (Attributes Attrs = CallPAL.getParamAttrs(ArgIndex))
- ParamAttrsVec.push_back(ParamAttrsWithIndex::get(Args.size(), Attrs));
+ ParamAttrsVec.push_back(FnAttributeWithIndex::get(Args.size(), Attrs));
} else if (ByValArgsToTransform.count(I)) {
// Emit a GEP and load for each element of the struct.
@@ -689,7 +689,7 @@ Function *ArgPromotion::DoPromotion(Function *F,
for (; AI != CS.arg_end(); ++AI, ++ArgIndex) {
Args.push_back(*AI);
if (Attributes Attrs = CallPAL.getParamAttrs(ArgIndex))
- ParamAttrsVec.push_back(ParamAttrsWithIndex::get(Args.size(), Attrs));
+ ParamAttrsVec.push_back(FnAttributeWithIndex::get(Args.size(), Attrs));
}
Instruction *New;
diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp
index 724d2b3..ab3321d 100644
--- a/lib/Transforms/IPO/DeadArgumentElimination.cpp
+++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp
@@ -226,7 +226,7 @@ bool DAE::DeleteDeadVarargs(Function &Fn) {
// Drop any attributes that were on the vararg arguments.
PAListPtr PAL = CS.getParamAttrs();
if (!PAL.isEmpty() && PAL.getSlot(PAL.getNumSlots() - 1).Index > NumArgs) {
- SmallVector<ParamAttrsWithIndex, 8> ParamAttrsVec;
+ SmallVector<FnAttributeWithIndex, 8> ParamAttrsVec;
for (unsigned i = 0; PAL.getSlot(i).Index <= NumArgs; ++i)
ParamAttrsVec.push_back(PAL.getSlot(i));
PAL = PAListPtr::get(ParamAttrsVec.begin(), ParamAttrsVec.end());
@@ -589,7 +589,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) {
std::vector<const Type*> Params;
// Set up to build a new list of parameter attributes.
- SmallVector<ParamAttrsWithIndex, 8> ParamAttrsVec;
+ SmallVector<FnAttributeWithIndex, 8> ParamAttrsVec;
const PAListPtr &PAL = F->getParamAttrs();
// The existing function return attributes.
@@ -661,7 +661,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) {
&& "Return attributes no longer compatible?");
if (RAttrs)
- ParamAttrsVec.push_back(ParamAttrsWithIndex::get(0, RAttrs));
+ ParamAttrsVec.push_back(FnAttributeWithIndex::get(0, RAttrs));
// Remember which arguments are still alive.
SmallVector<bool, 10> ArgAlive(FTy->getNumParams(), false);
@@ -679,7 +679,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) {
// Get the original parameter attributes (skipping the first one, that is
// for the return value.
if (Attributes Attrs = PAL.getParamAttrs(i + 1))
- ParamAttrsVec.push_back(ParamAttrsWithIndex::get(Params.size(), Attrs));
+ ParamAttrsVec.push_back(FnAttributeWithIndex::get(Params.size(), Attrs));
} else {
++NumArgumentsEliminated;
DOUT << "DAE - Removing argument " << i << " (" << I->getNameStart()
@@ -734,7 +734,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) {
// Adjust in case the function was changed to return void.
RAttrs &= ~ParamAttr::typeIncompatible(NF->getReturnType());
if (RAttrs)
- ParamAttrsVec.push_back(ParamAttrsWithIndex::get(0, RAttrs));
+ ParamAttrsVec.push_back(FnAttributeWithIndex::get(0, RAttrs));
// Declare these outside of the loops, so we can reuse them for the second
// loop, which loops the varargs.
@@ -747,7 +747,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) {
Args.push_back(*I);
// Get original parameter attributes, but skip return attributes.
if (Attributes Attrs = CallPAL.getParamAttrs(i + 1))
- ParamAttrsVec.push_back(ParamAttrsWithIndex::get(Args.size(), Attrs));
+ ParamAttrsVec.push_back(FnAttributeWithIndex::get(Args.size(), Attrs));
}
if (ExtraArgHack)
@@ -757,7 +757,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) {
for (CallSite::arg_iterator E = CS.arg_end(); I != E; ++I, ++i) {
Args.push_back(*I);
if (Attributes Attrs = CallPAL.getParamAttrs(i + 1))
- ParamAttrsVec.push_back(ParamAttrsWithIndex::get(Args.size(), Attrs));
+ ParamAttrsVec.push_back(FnAttributeWithIndex::get(Args.size(), Attrs));
}
// Reconstruct the ParamAttrsList based on the vector we constructed.
diff --git a/lib/Transforms/IPO/StructRetPromotion.cpp b/lib/Transforms/IPO/StructRetPromotion.cpp
index 68f20ea..69aecc3 100644
--- a/lib/Transforms/IPO/StructRetPromotion.cpp
+++ b/lib/Transforms/IPO/StructRetPromotion.cpp
@@ -206,12 +206,12 @@ Function *SRETPromotion::cloneFunctionBody(Function *F,
std::vector<const Type*> Params;
// ParamAttrs - Keep track of the parameter attributes for the arguments.
- SmallVector<ParamAttrsWithIndex, 8> ParamAttrsVec;
+ SmallVector<FnAttributeWithIndex, 8> ParamAttrsVec;
const PAListPtr &PAL = F->getParamAttrs();
// Add any return attributes.
if (Attributes attrs = PAL.getParamAttrs(0))
- ParamAttrsVec.push_back(ParamAttrsWithIndex::get(0, attrs));
+ ParamAttrsVec.push_back(FnAttributeWithIndex::get(0, attrs));
// Skip first argument.
Function::arg_iterator I = F->arg_begin(), E = F->arg_end();
@@ -222,7 +222,7 @@ Function *SRETPromotion::cloneFunctionBody(Function *F,
while (I != E) {
Params.push_back(I->getType());
if (Attributes Attrs = PAL.getParamAttrs(ParamIndex))
- ParamAttrsVec.push_back(ParamAttrsWithIndex::get(ParamIndex - 1, Attrs));
+ ParamAttrsVec.push_back(FnAttributeWithIndex::get(ParamIndex - 1, Attrs));
++I;
++ParamIndex;
}
@@ -256,7 +256,7 @@ void SRETPromotion::updateCallSites(Function *F, Function *NF) {
SmallVector<Value*, 16> Args;
// ParamAttrs - Keep track of the parameter attributes for the arguments.
- SmallVector<ParamAttrsWithIndex, 8> ArgAttrsVec;
+ SmallVector<FnAttributeWithIndex, 8> ArgAttrsVec;
while (!F->use_empty()) {
CallSite CS = CallSite::get(*F->use_begin());
@@ -265,7 +265,7 @@ void SRETPromotion::updateCallSites(Function *F, Function *NF) {
const PAListPtr &PAL = F->getParamAttrs();
// Add any return attributes.
if (Attributes attrs = PAL.getParamAttrs(0))
- ArgAttrsVec.push_back(ParamAttrsWithIndex::get(0, attrs));
+ ArgAttrsVec.push_back(FnAttributeWithIndex::get(0, attrs));
// Copy arguments, however skip first one.
CallSite::arg_iterator AI = CS.arg_begin(), AE = CS.arg_end();
@@ -277,7 +277,7 @@ void SRETPromotion::updateCallSites(Function *F, Function *NF) {
while (AI != AE) {
Args.push_back(*AI);
if (Attributes Attrs = PAL.getParamAttrs(ParamIndex))
- ArgAttrsVec.push_back(ParamAttrsWithIndex::get(ParamIndex - 1, Attrs));
+ ArgAttrsVec.push_back(FnAttributeWithIndex::get(ParamIndex - 1, Attrs));
++ParamIndex;
++AI;
}