aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit173862e5468fbcf4b022b9088d2c81b25c2d60c5 (patch)
tree7e5397de7252f267c99878bc8176abc1bfb0fdd2 /lib/Analysis/MemoryDependenceAnalysis.cpp
parent742e5cf61298e9d7a0672d0cd79708c4939da489 (diff)
downloadexternal_llvm-173862e5468fbcf4b022b9088d2c81b25c2d60c5.zip
external_llvm-173862e5468fbcf4b022b9088d2c81b25c2d60c5.tar.gz
external_llvm-173862e5468fbcf4b022b9088d2c81b25c2d60c5.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145013 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/MemoryDependenceAnalysis.cpp')
-rw-r--r--lib/Analysis/MemoryDependenceAnalysis.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp
index 323c84f..e779bf2 100644
--- a/lib/Analysis/MemoryDependenceAnalysis.cpp
+++ b/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