summaryrefslogtreecommitdiffstats
path: root/lib/Transforms
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-12-22 00:37:52 +0000
committerBill Wendling <isanbard@gmail.com>2012-12-22 00:37:52 +0000
commit629fb82419d9bfff6ae475363bcce66192dfcc8e (patch)
tree8ec184d15af2c37f00ead25dd271cdef536e0e22 /lib/Transforms
parent9679a04da65b33037abac50a54884bb9b7b73698 (diff)
downloadexternal_llvm-629fb82419d9bfff6ae475363bcce66192dfcc8e.zip
external_llvm-629fb82419d9bfff6ae475363bcce66192dfcc8e.tar.gz
external_llvm-629fb82419d9bfff6ae475363bcce66192dfcc8e.tar.bz2
Change 'AttrVal' to 'AttrKind' to better reflect that it's a kind of attribute instead of the value of the attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170972 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Utils/BuildLibCalls.cpp24
-rw-r--r--lib/Transforms/Vectorize/LoopVectorize.cpp2
2 files changed, 13 insertions, 13 deletions
diff --git a/lib/Transforms/Utils/BuildLibCalls.cpp b/lib/Transforms/Utils/BuildLibCalls.cpp
index bfb96cc..51335ab 100644
--- a/lib/Transforms/Utils/BuildLibCalls.cpp
+++ b/lib/Transforms/Utils/BuildLibCalls.cpp
@@ -40,9 +40,9 @@ Value *llvm::EmitStrLen(Value *Ptr, IRBuilder<> &B, const DataLayout *TD,
Module *M = B.GetInsertBlock()->getParent()->getParent();
AttributeWithIndex AWI[2];
AWI[0] = AttributeWithIndex::get(M->getContext(), 1, Attribute::NoCapture);
- Attribute::AttrVal AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
+ Attribute::AttrKind AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
AWI[1] = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex,
- ArrayRef<Attribute::AttrVal>(AVs, 2));
+ ArrayRef<Attribute::AttrKind>(AVs, 2));
LLVMContext &Context = B.GetInsertBlock()->getContext();
Constant *StrLen = M->getOrInsertFunction("strlen",
@@ -69,9 +69,9 @@ Value *llvm::EmitStrNLen(Value *Ptr, Value *MaxLen, IRBuilder<> &B,
Module *M = B.GetInsertBlock()->getParent()->getParent();
AttributeWithIndex AWI[2];
AWI[0] = AttributeWithIndex::get(M->getContext(), 1, Attribute::NoCapture);
- Attribute::AttrVal AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
+ Attribute::AttrKind AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
AWI[1] = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex,
- ArrayRef<Attribute::AttrVal>(AVs, 2));
+ ArrayRef<Attribute::AttrKind>(AVs, 2));
LLVMContext &Context = B.GetInsertBlock()->getContext();
Constant *StrNLen = M->getOrInsertFunction("strnlen",
@@ -97,10 +97,10 @@ Value *llvm::EmitStrChr(Value *Ptr, char C, IRBuilder<> &B,
return 0;
Module *M = B.GetInsertBlock()->getParent()->getParent();
- Attribute::AttrVal AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
+ Attribute::AttrKind AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
AttributeWithIndex AWI =
AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex,
- ArrayRef<Attribute::AttrVal>(AVs, 2));
+ ArrayRef<Attribute::AttrKind>(AVs, 2));
Type *I8Ptr = B.getInt8PtrTy();
Type *I32Ty = B.getInt32Ty();
@@ -126,9 +126,9 @@ Value *llvm::EmitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len,
AttributeWithIndex AWI[3];
AWI[0] = AttributeWithIndex::get(M->getContext(), 1, Attribute::NoCapture);
AWI[1] = AttributeWithIndex::get(M->getContext(), 2, Attribute::NoCapture);
- Attribute::AttrVal AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
+ Attribute::AttrKind AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
AWI[2] = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex,
- ArrayRef<Attribute::AttrVal>(AVs, 2));
+ ArrayRef<Attribute::AttrKind>(AVs, 2));
LLVMContext &Context = B.GetInsertBlock()->getContext();
Value *StrNCmp = M->getOrInsertFunction("strncmp",
@@ -236,9 +236,9 @@ Value *llvm::EmitMemChr(Value *Ptr, Value *Val,
Module *M = B.GetInsertBlock()->getParent()->getParent();
AttributeWithIndex AWI;
- Attribute::AttrVal AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
+ Attribute::AttrKind AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
AWI = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex,
- ArrayRef<Attribute::AttrVal>(AVs, 2));
+ ArrayRef<Attribute::AttrKind>(AVs, 2));
LLVMContext &Context = B.GetInsertBlock()->getContext();
Value *MemChr = M->getOrInsertFunction("memchr",
AttributeSet::get(M->getContext(), AWI),
@@ -266,9 +266,9 @@ Value *llvm::EmitMemCmp(Value *Ptr1, Value *Ptr2,
AttributeWithIndex AWI[3];
AWI[0] = AttributeWithIndex::get(M->getContext(), 1, Attribute::NoCapture);
AWI[1] = AttributeWithIndex::get(M->getContext(), 2, Attribute::NoCapture);
- Attribute::AttrVal AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
+ Attribute::AttrKind AVs[2] = { Attribute::ReadOnly, Attribute::NoUnwind };
AWI[2] = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex,
- ArrayRef<Attribute::AttrVal>(AVs, 2));
+ ArrayRef<Attribute::AttrKind>(AVs, 2));
LLVMContext &Context = B.GetInsertBlock()->getContext();
Value *MemCmp = M->getOrInsertFunction("memcmp",
diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp
index 6f8c65a..f5ff79c 100644
--- a/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -94,7 +94,7 @@ struct LoopVectorize : public LoopPass {
// Check the function attribues to find out if this function should be
// optimized for size.
Function *F = L->getHeader()->getParent();
- Attribute::AttrVal SzAttr= Attribute::OptimizeForSize;
+ Attribute::AttrKind SzAttr= Attribute::OptimizeForSize;
bool OptForSize = F->getFnAttributes().hasAttribute(SzAttr);
unsigned VF = CM.selectVectorizationFactor(OptForSize, VectorizationFactor);