aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/AliasAnalysis.cpp
diff options
context:
space:
mode:
authorJohannes Doerfert <johannes@jdoerfert.de>2023-06-14 21:44:24 -0700
committerJohannes Doerfert <johannes@jdoerfert.de>2023-07-03 10:07:03 -0700
commita90ac20c528f65ea50d14bc261bb65f7446b2231 (patch)
treecb462c852fb913f811c0882572b2e1aac261f799 /llvm/lib/Analysis/AliasAnalysis.cpp
parent1b102886c0c33bb01ff8f2360b57c7b8d039abcc (diff)
downloadllvm-a90ac20c528f65ea50d14bc261bb65f7446b2231.zip
llvm-a90ac20c528f65ea50d14bc261bb65f7446b2231.tar.gz
llvm-a90ac20c528f65ea50d14bc261bb65f7446b2231.tar.bz2
[MemoryEffects][NFCI] Make the MemoryEffects class reusable
In a follow up we will reuse the logic in MemoryEffectsBase to merge AAMemoryLocation and AAMemoryBehavior without duplicating all the bit fiddling code already available in MemoryEffectsBase. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D153305
Diffstat (limited to 'llvm/lib/Analysis/AliasAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/AliasAnalysis.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Analysis/AliasAnalysis.cpp b/llvm/lib/Analysis/AliasAnalysis.cpp
index a5338af..7b2f91f 100644
--- a/llvm/lib/Analysis/AliasAnalysis.cpp
+++ b/llvm/lib/Analysis/AliasAnalysis.cpp
@@ -227,12 +227,12 @@ ModRefInfo AAResults::getModRefInfo(const CallBase *Call,
// We can completely ignore inaccessible memory here, because MemoryLocations
// can only reference accessible memory.
auto ME = getMemoryEffects(Call, AAQI)
- .getWithoutLoc(MemoryEffects::InaccessibleMem);
+ .getWithoutLoc(IRMemLocation::InaccessibleMem);
if (ME.doesNotAccessMemory())
return ModRefInfo::NoModRef;
- ModRefInfo ArgMR = ME.getModRef(MemoryEffects::ArgMem);
- ModRefInfo OtherMR = ME.getWithoutLoc(MemoryEffects::ArgMem).getModRef();
+ 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
@@ -442,15 +442,15 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, ModRefInfo MR) {
}
raw_ostream &llvm::operator<<(raw_ostream &OS, MemoryEffects ME) {
- for (MemoryEffects::Location Loc : MemoryEffects::locations()) {
+ for (IRMemLocation Loc : MemoryEffects::locations()) {
switch (Loc) {
- case MemoryEffects::ArgMem:
+ case IRMemLocation::ArgMem:
OS << "ArgMem: ";
break;
- case MemoryEffects::InaccessibleMem:
+ case IRMemLocation::InaccessibleMem:
OS << "InaccessibleMem: ";
break;
- case MemoryEffects::Other:
+ case IRMemLocation::Other:
OS << "Other: ";
break;
}