[AA] Remove a needless variable [NFC]

There's no need to track a seperate variable for argmemonly aliasing.  This falls out naturally of the modinfo union.  Note that we may return earlier than we would have earlier if all arguments are explicitly readnone.  The overall result doesn't change, just how we get there.

llvm-svn: 340443
This commit is contained in:
Philip Reames 2018-08-22 19:50:45 +00:00
parent bb4cf6e1e1
commit 8abf4484fe
1 changed files with 1 additions and 3 deletions

View File

@ -178,7 +178,6 @@ ModRefInfo AAResults::getModRefInfo(ImmutableCallSite CS,
Result = clearRef(Result);
if (onlyAccessesArgPointees(MRB) || onlyAccessesInaccessibleOrArgMem(MRB)) {
bool DoesAlias = false;
bool IsMustAlias = true;
ModRefInfo AllArgsMask = ModRefInfo::NoModRef;
if (doesAccessArgPointees(MRB)) {
@ -191,7 +190,6 @@ ModRefInfo AAResults::getModRefInfo(ImmutableCallSite CS,
AliasResult ArgAlias = alias(ArgLoc, Loc);
if (ArgAlias != NoAlias) {
ModRefInfo ArgMask = getArgModRefInfo(CS, ArgIdx);
DoesAlias = true;
AllArgsMask = unionModRef(AllArgsMask, ArgMask);
}
// Conservatively clear IsMustAlias unless only MustAlias is found.
@ -199,7 +197,7 @@ ModRefInfo AAResults::getModRefInfo(ImmutableCallSite CS,
}
}
// Return NoModRef if no alias found with any argument.
if (!DoesAlias)
if (isNoModRef(AllArgsMask))
return ModRefInfo::NoModRef;
// Logical & between other AA analyses and argument analysis.
Result = intersectModRef(Result, AllArgsMask);