[llvm] r275065 - AliasAnalysis: unify getModRefInfo(I, CS) semantics with other overloads
Nicolai Haehnle via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 11 07:11:45 PDT 2016
Author: nha
Date: Mon Jul 11 09:11:45 2016
New Revision: 275065
URL: http://llvm.org/viewvc/llvm-project?rev=275065&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Analysis/AliasAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/AliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasAnalysis.cpp?rev=275065&r1=275064&r2=275065&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/AliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/AliasAnalysis.cpp Mon Jul 11 09:11:45 2016
@@ -110,7 +110,7 @@ ModRefInfo AAResults::getModRefInfo(Inst
// 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
More information about the llvm-commits
mailing list