[llvm] [BatchAA] Fix a reference to a non-exising `pointsToConstantMemory` overload (NFC) (PR #82173)
Momchil Velikov via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 18 10:02:13 PST 2024
https://github.com/momchil-velikov updated https://github.com/llvm/llvm-project/pull/82173
>From 7ed00e53f6f47030953a6f2aaab0a5b203e7e9cb Mon Sep 17 00:00:00 2001
From: Momchil Velikov <momchil.velikov at arm.com>
Date: Sun, 18 Feb 2024 16:11:57 +0000
Subject: [PATCH 1/2] [BatchAA] Fix a reference to a non-exising
`pointsToConstantMemory` overload (NFC)
---
llvm/include/llvm/Analysis/AliasAnalysis.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/llvm/include/llvm/Analysis/AliasAnalysis.h b/llvm/include/llvm/Analysis/AliasAnalysis.h
index e8e4f491be5a3d..f1c39f27b2cca6 100644
--- a/llvm/include/llvm/Analysis/AliasAnalysis.h
+++ b/llvm/include/llvm/Analysis/AliasAnalysis.h
@@ -566,8 +566,6 @@ class AAResults {
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB,
AAQueryInfo &AAQI, const Instruction *CtxI = nullptr);
- bool pointsToConstantMemory(const MemoryLocation &Loc, AAQueryInfo &AAQI,
- bool OrLocal = false);
ModRefInfo getModRefInfoMask(const MemoryLocation &Loc, AAQueryInfo &AAQI,
bool IgnoreLocals = false);
ModRefInfo getModRefInfo(const Instruction *I, const CallBase *Call2,
@@ -635,7 +633,7 @@ class BatchAAResults {
return AA.alias(LocA, LocB, AAQI);
}
bool pointsToConstantMemory(const MemoryLocation &Loc, bool OrLocal = false) {
- return AA.pointsToConstantMemory(Loc, AAQI, OrLocal);
+ return AA.pointsToConstantMemory(Loc, OrLocal);
}
ModRefInfo getModRefInfoMask(const MemoryLocation &Loc,
bool IgnoreLocals = false) {
>From df1e60048a58bd610add3c88f44b2ee3a5a5be6f Mon Sep 17 00:00:00 2001
From: Momchil Velikov <momchil.velikov at arm.com>
Date: Sun, 18 Feb 2024 17:56:38 +0000
Subject: [PATCH 2/2] [fixup] Use the AAQueryInfo from the BatchAA
---
llvm/include/llvm/Analysis/AliasAnalysis.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/include/llvm/Analysis/AliasAnalysis.h b/llvm/include/llvm/Analysis/AliasAnalysis.h
index f1c39f27b2cca6..4c6669fe78f678 100644
--- a/llvm/include/llvm/Analysis/AliasAnalysis.h
+++ b/llvm/include/llvm/Analysis/AliasAnalysis.h
@@ -633,7 +633,7 @@ class BatchAAResults {
return AA.alias(LocA, LocB, AAQI);
}
bool pointsToConstantMemory(const MemoryLocation &Loc, bool OrLocal = false) {
- return AA.pointsToConstantMemory(Loc, OrLocal);
+ return isNoModRef(AA.getModRefInfoMask(Loc, AAQI, OrLocal));
}
ModRefInfo getModRefInfoMask(const MemoryLocation &Loc,
bool IgnoreLocals = false) {
More information about the llvm-commits
mailing list