summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/AliasAnalysis.cpp
diff options
context:
space:
mode:
authorNicolai Haehnle <nhaehnle@gmail.com>2016-07-11 14:11:45 +0000
committerNicolai Haehnle <nhaehnle@gmail.com>2016-07-11 14:11:45 +0000
commit9343f36f8eec31842cbd07a48b62e5acd80d02bc (patch)
treeaa31dfeadd0f63743f70e3cb99ad4a4805d348a7 /llvm/lib/Analysis/AliasAnalysis.cpp
parent0d38830aca17e66f54ba57857b5e75d9df1827d4 (diff)
downloadbcm5719-llvm-9343f36f8eec31842cbd07a48b62e5acd80d02bc.tar.gz
bcm5719-llvm-9343f36f8eec31842cbd07a48b62e5acd80d02bc.zip
AliasAnalysis: unify getModRefInfo(I, CS) semantics with other overloads
This subtle change to getModRefInfo(Instruction, ImmutableCallSite) is to ensure that the semantics are equal to that of getModRefInfo(CS1, CS2) when the Instruction is a call-site. This is now more in line with getModRefInfo generally: it returns Mod when I modifies a memory location that is accessed (read or written) by CS and Ref when I reads a memory location that is written by CS. From a grep of the code, the only uses of this particular getModRefInfo overload are in MemorySSA and MemCpyOptimizer, and they only care about where the result is MR_NoModRef or not. Therefore, this change should have no visible effect. Separated out from D17279 upon request. llvm-svn: 275065
Diffstat (limited to 'llvm/lib/Analysis/AliasAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/AliasAnalysis.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/AliasAnalysis.cpp b/llvm/lib/Analysis/AliasAnalysis.cpp
index 643e9da1db1..ab5f814fb39 100644
--- a/llvm/lib/Analysis/AliasAnalysis.cpp
+++ b/llvm/lib/Analysis/AliasAnalysis.cpp
@@ -110,7 +110,7 @@ ModRefInfo AAResults::getModRefInfo(Instruction *I, ImmutableCallSite Call) {
// We may have two calls
if (auto CS = ImmutableCallSite(I)) {
// Check if the two calls modify the same memory
- return getModRefInfo(Call, CS);
+ return getModRefInfo(CS, Call);
} else {
// Otherwise, check if the call modifies or references the
// location this memory access defines. The best we can say
OpenPOWER on IntegriCloud