diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-11-20 19:09:04 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-11-20 19:09:04 +0000 |
commit | 612d70b19d3f46bf293daa2952127ba8bcb1edf6 (patch) | |
tree | 57d064afd1671f449fb10a2dc155bfa61a102cbf /llvm/lib/Analysis/MemoryDependenceAnalysis.cpp | |
parent | 8ad31c2e360411db9035fa502817f8ca63b99893 (diff) | |
download | bcm5719-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.cpp | 3 |
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 |