diff options
Diffstat (limited to 'llvm/lib/Analysis/AliasAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/AliasAnalysis.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/llvm/lib/Analysis/AliasAnalysis.cpp b/llvm/lib/Analysis/AliasAnalysis.cpp index 5114137..9573da9 100644 --- a/llvm/lib/Analysis/AliasAnalysis.cpp +++ b/llvm/lib/Analysis/AliasAnalysis.cpp @@ -220,38 +220,6 @@ ModRefInfo AAResults::getModRefInfo(const CallBase *Call, return ModRefInfo::NoModRef; } - // Try to refine the mod-ref info further using other API entry points to the - // aggregate set of AA results. - - // We can completely ignore inaccessible memory here, because MemoryLocations - // can only reference accessible memory. - auto ME = getMemoryEffects(Call, AAQI) - .getWithoutLoc(IRMemLocation::InaccessibleMem); - if (ME.doesNotAccessMemory()) - return ModRefInfo::NoModRef; - - ModRefInfo ArgMR = ME.getModRef(IRMemLocation::ArgMem); - ModRefInfo OtherMR = ME.getWithoutLoc(IRMemLocation::ArgMem).getModRef(); - if ((ArgMR | OtherMR) != OtherMR) { - // Refine the modref info for argument memory. We only bother to do this - // if ArgMR is not a subset of OtherMR, otherwise this won't have an impact - // on the final result. - ModRefInfo AllArgsMask = ModRefInfo::NoModRef; - for (const auto &I : llvm::enumerate(Call->args())) { - const Value *Arg = I.value(); - if (!Arg->getType()->isPointerTy()) - continue; - unsigned ArgIdx = I.index(); - MemoryLocation ArgLoc = MemoryLocation::getForArgument(Call, ArgIdx, TLI); - AliasResult ArgAlias = alias(ArgLoc, Loc, AAQI, Call); - if (ArgAlias != AliasResult::NoAlias) - AllArgsMask |= getArgModRefInfo(Call, ArgIdx); - } - ArgMR &= AllArgsMask; - } - - Result &= ArgMR | OtherMR; - // Apply the ModRef mask. This ensures that if Loc is a constant memory // location, we take into account the fact that the call definitely could not // modify the memory location. |