[llvm] 57f7f0d - [AST] Use BatchAA in aliasesPointer() (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 30 07:22:41 PDT 2022
Author: Nikita Popov
Date: 2022-09-30T16:22:29+02:00
New Revision: 57f7f0d6cf0706a88e1ecb74f3d3e8891cceabfa
URL: https://github.com/llvm/llvm-project/commit/57f7f0d6cf0706a88e1ecb74f3d3e8891cceabfa
DIFF: https://github.com/llvm/llvm-project/commit/57f7f0d6cf0706a88e1ecb74f3d3e8891cceabfa.diff
LOG: [AST] Use BatchAA in aliasesPointer() (NFC)
Added:
Modified:
llvm/include/llvm/Analysis/AliasSetTracker.h
llvm/lib/Analysis/AliasSetTracker.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/AliasSetTracker.h b/llvm/include/llvm/Analysis/AliasSetTracker.h
index 179ec457abc5..3a3c8095ad93 100644
--- a/llvm/include/llvm/Analysis/AliasSetTracker.h
+++ b/llvm/include/llvm/Analysis/AliasSetTracker.h
@@ -311,7 +311,7 @@ class AliasSet : public ilist_node<AliasSet> {
/// If the specified pointer "may" (or must) alias one of the members in the
/// set return the appropriate AliasResult. Otherwise return NoAlias.
AliasResult aliasesPointer(const Value *Ptr, LocationSize Size,
- const AAMDNodes &AAInfo, AAResults &AA) const;
+ const AAMDNodes &AAInfo, BatchAAResults &AA) const;
bool aliasesUnknownInst(const Instruction *Inst, BatchAAResults &AA) const;
};
diff --git a/llvm/lib/Analysis/AliasSetTracker.cpp b/llvm/lib/Analysis/AliasSetTracker.cpp
index 232fefe47499..b8b64d3890c4 100644
--- a/llvm/lib/Analysis/AliasSetTracker.cpp
+++ b/llvm/lib/Analysis/AliasSetTracker.cpp
@@ -189,7 +189,7 @@ void AliasSet::addUnknownInst(Instruction *I, AliasAnalysis &AA) {
///
AliasResult AliasSet::aliasesPointer(const Value *Ptr, LocationSize Size,
const AAMDNodes &AAInfo,
- AliasAnalysis &AA) const {
+ BatchAAResults &AA) const {
if (AliasAny)
return AliasResult::MayAlias;
@@ -275,11 +275,12 @@ AliasSet *AliasSetTracker::mergeAliasSetsForPointer(const Value *Ptr,
bool &MustAliasAll) {
AliasSet *FoundSet = nullptr;
MustAliasAll = true;
+ BatchAAResults BatchAA(AA);
for (AliasSet &AS : llvm::make_early_inc_range(*this)) {
if (AS.Forward)
continue;
- AliasResult AR = AS.aliasesPointer(Ptr, Size, AAInfo, AA);
+ AliasResult AR = AS.aliasesPointer(Ptr, Size, AAInfo, BatchAA);
if (AR == AliasResult::NoAlias)
continue;
More information about the llvm-commits
mailing list