aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/IPO/FunctionAttrs.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-12-19 07:18:57 +0000
committerBill Wendling <isanbard@gmail.com>2012-12-19 07:18:57 +0000
commit034b94b17006f51722886b0f2283fb6fb19aca1f (patch)
treee42e091c12137e9599d0e58bfa4336c4af7333b3 /lib/Transforms/IPO/FunctionAttrs.cpp
parent85022561f9c78446bbc5f745cd9b58f4e5dc92ec (diff)
downloadexternal_llvm-034b94b17006f51722886b0f2283fb6fb19aca1f.zip
external_llvm-034b94b17006f51722886b0f2283fb6fb19aca1f.tar.gz
external_llvm-034b94b17006f51722886b0f2283fb6fb19aca1f.tar.bz2
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/FunctionAttrs.cpp')
-rw-r--r--lib/Transforms/IPO/FunctionAttrs.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/Transforms/IPO/FunctionAttrs.cpp b/lib/Transforms/IPO/FunctionAttrs.cpp
index 685833d..8efecc3 100644
--- a/lib/Transforms/IPO/FunctionAttrs.cpp
+++ b/lib/Transforms/IPO/FunctionAttrs.cpp
@@ -213,16 +213,16 @@ bool FunctionAttrs::AddReadAttrs(const CallGraphSCC &SCC) {
// Clear out any existing attributes.
AttrBuilder B;
- B.addAttribute(Attributes::ReadOnly)
- .addAttribute(Attributes::ReadNone);
+ B.addAttribute(Attribute::ReadOnly)
+ .addAttribute(Attribute::ReadNone);
F->removeAttribute(AttributeSet::FunctionIndex,
- Attributes::get(F->getContext(), B));
+ Attribute::get(F->getContext(), B));
// Add in the new attribute.
B.clear();
- B.addAttribute(ReadsMemory ? Attributes::ReadOnly : Attributes::ReadNone);
+ B.addAttribute(ReadsMemory ? Attribute::ReadOnly : Attribute::ReadNone);
F->addAttribute(AttributeSet::FunctionIndex,
- Attributes::get(F->getContext(), B));
+ Attribute::get(F->getContext(), B));
if (ReadsMemory)
++NumReadOnly;
@@ -358,7 +358,7 @@ bool FunctionAttrs::AddNoCaptureAttrs(const CallGraphSCC &SCC) {
ArgumentGraph AG;
AttrBuilder B;
- B.addAttribute(Attributes::NoCapture);
+ B.addAttribute(Attribute::NoCapture);
// Check each function in turn, determining which pointer arguments are not
// captured.
@@ -381,7 +381,7 @@ bool FunctionAttrs::AddNoCaptureAttrs(const CallGraphSCC &SCC) {
for (Function::arg_iterator A = F->arg_begin(), E = F->arg_end();
A != E; ++A) {
if (A->getType()->isPointerTy() && !A->hasNoCaptureAttr()) {
- A->addAttr(Attributes::get(F->getContext(), B));
+ A->addAttr(Attribute::get(F->getContext(), B));
++NumNoCapture;
Changed = true;
}
@@ -396,7 +396,7 @@ bool FunctionAttrs::AddNoCaptureAttrs(const CallGraphSCC &SCC) {
if (!Tracker.Captured) {
if (Tracker.Uses.empty()) {
// If it's trivially not captured, mark it nocapture now.
- A->addAttr(Attributes::get(F->getContext(), B));
+ A->addAttr(Attribute::get(F->getContext(), B));
++NumNoCapture;
Changed = true;
} else {
@@ -431,7 +431,7 @@ bool FunctionAttrs::AddNoCaptureAttrs(const CallGraphSCC &SCC) {
ArgumentSCC[0]->Uses[0] == ArgumentSCC[0]) {
ArgumentSCC[0]->
Definition->
- addAttr(Attributes::get(ArgumentSCC[0]->Definition->getContext(), B));
+ addAttr(Attribute::get(ArgumentSCC[0]->Definition->getContext(), B));
++NumNoCapture;
Changed = true;
}
@@ -473,7 +473,7 @@ bool FunctionAttrs::AddNoCaptureAttrs(const CallGraphSCC &SCC) {
for (unsigned i = 0, e = ArgumentSCC.size(); i != e; ++i) {
Argument *A = ArgumentSCC[i]->Definition;
- A->addAttr(Attributes::get(A->getContext(), B));
+ A->addAttr(Attribute::get(A->getContext(), B));
++NumNoCapture;
Changed = true;
}
@@ -530,7 +530,7 @@ bool FunctionAttrs::IsFunctionMallocLike(Function *F,
case Instruction::Call:
case Instruction::Invoke: {
CallSite CS(RVI);
- if (CS.paramHasAttr(0, Attributes::NoAlias))
+ if (CS.paramHasAttr(0, Attribute::NoAlias))
break;
if (CS.getCalledFunction() &&
SCCNodes.count(CS.getCalledFunction()))