summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2011-11-20 19:09:04 +0000
committerNick Lewycky <nicholas@mxc.ca>2011-11-20 19:09:04 +0000
commit612d70b19d3f46bf293daa2952127ba8bcb1edf6 (patch)
tree57d064afd1671f449fb10a2dc155bfa61a102cbf /llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
parent8ad31c2e360411db9035fa502817f8ca63b99893 (diff)
downloadbcm5719-llvm-612d70b19d3f46bf293daa2952127ba8bcb1edf6.tar.gz
bcm5719-llvm-612d70b19d3f46bf293daa2952127ba8bcb1edf6.zip
Refactor code to use new attribute getters on CallSite for NoCapture and ByVal.
Suggested in code review by Eli. That code in InstCombine looks kinda suspicious. llvm-svn: 145013
Diffstat (limited to 'llvm/lib/Analysis/MemoryDependenceAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/MemoryDependenceAnalysis.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
index 323c84f7f67..e779bf2b998 100644
--- a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
@@ -393,8 +393,7 @@ MemoryDependenceAnalysis::getModRefInfo(const Instruction *Inst,
// pointer were passed to arguments that were neither of these, then it
// couldn't be no-capture.
if (!(*CI)->getType()->isPointerTy() ||
- (!CS.paramHasAttr(ArgNo+1, Attribute::NoCapture) &&
- !CS.paramHasAttr(ArgNo+1, Attribute::ByVal)))
+ (!CS.doesNotCapture(ArgNo) && !CS.isByValArgument(ArgNo)))
continue;
// If this is a no-capture pointer argument, see if we can tell that it
OpenPOWER on IntegriCloud