diff options
| author | Bill Wendling <isanbard@gmail.com> | 2012-12-19 07:18:57 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2012-12-19 07:18:57 +0000 |
| commit | 3d7b0b8ac7eef54764f80af62d53d661c9ba2951 (patch) | |
| tree | b729cff563ce07cd73f566039bd84fe5efc4a0b6 /llvm/lib/Transforms/IPO/FunctionAttrs.cpp | |
| parent | 7967fc14b912d9e355570f1f9db8ccb7d7518d94 (diff) | |
| download | bcm5719-llvm-3d7b0b8ac7eef54764f80af62d53d661c9ba2951.tar.gz bcm5719-llvm-3d7b0b8ac7eef54764f80af62d53d661c9ba2951.zip | |
Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attribute in the future.
llvm-svn: 170502
Diffstat (limited to 'llvm/lib/Transforms/IPO/FunctionAttrs.cpp')
| -rw-r--r-- | llvm/lib/Transforms/IPO/FunctionAttrs.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp index 685833da1a9..8efecc37ebb 100644 --- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/llvm/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())) |

