forked from OSchip/llvm-project
[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:
parent
bb4cf6e1e1
commit
8abf4484fe
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue