[llvm] 9899427 - [NFC][AliasSetTracker] Remove implicit conversion AliasResult to integer.
via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 4 13:53:42 PST 2021
Author: dfukalov
Date: 2021-03-05T00:53:27+03:00
New Revision: 9899427174b4a6a42c64dcdf29e3f23e40a1fc19
URL: https://github.com/llvm/llvm-project/commit/9899427174b4a6a42c64dcdf29e3f23e40a1fc19
DIFF: https://github.com/llvm/llvm-project/commit/9899427174b4a6a42c64dcdf29e3f23e40a1fc19.diff
LOG: [NFC][AliasSetTracker] Remove implicit conversion AliasResult to integer.
Preparation to make AliasResult scoped enumeration.
Reviewed By: nikic
Differential Revision: https://reviews.llvm.org/D97973
Added:
Modified:
llvm/lib/Analysis/AliasSetTracker.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/AliasSetTracker.cpp b/llvm/lib/Analysis/AliasSetTracker.cpp
index e43416deb643..381433323ba8 100644
--- a/llvm/lib/Analysis/AliasSetTracker.cpp
+++ b/llvm/lib/Analysis/AliasSetTracker.cpp
@@ -300,7 +300,7 @@ AliasSet *AliasSetTracker::mergeAliasSetsForPointer(const Value *Ptr,
const AAMDNodes &AAInfo,
bool &MustAliasAll) {
AliasSet *FoundSet = nullptr;
- AliasResult AllAR = MustAlias;
+ MustAliasAll = true;
for (AliasSet &AS : llvm::make_early_inc_range(*this)) {
if (AS.Forward)
continue;
@@ -309,8 +309,8 @@ AliasSet *AliasSetTracker::mergeAliasSetsForPointer(const Value *Ptr,
if (AR == NoAlias)
continue;
- AllAR =
- AliasResult(AllAR & AR); // Possible downgrade to May/Partial, even No
+ if (AR != MustAlias)
+ MustAliasAll = false;
if (!FoundSet) {
// If this is the first alias set ptr can go into, remember it.
@@ -321,7 +321,6 @@ AliasSet *AliasSetTracker::mergeAliasSetsForPointer(const Value *Ptr,
}
}
- MustAliasAll = (AllAR == MustAlias);
return FoundSet;
}
More information about the llvm-commits
mailing list