Skip to content

Commit 9899427

Browse files
committed
[NFC][AliasSetTracker] Remove implicit conversion AliasResult to integer.
Preparation to make AliasResult scoped enumeration. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D97973
1 parent ed74583 commit 9899427

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/lib/Analysis/AliasSetTracker.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ AliasSet *AliasSetTracker::mergeAliasSetsForPointer(const Value *Ptr,
300300
const AAMDNodes &AAInfo,
301301
bool &MustAliasAll) {
302302
AliasSet *FoundSet = nullptr;
303-
AliasResult AllAR = MustAlias;
303+
MustAliasAll = true;
304304
for (AliasSet &AS : llvm::make_early_inc_range(*this)) {
305305
if (AS.Forward)
306306
continue;
@@ -309,8 +309,8 @@ AliasSet *AliasSetTracker::mergeAliasSetsForPointer(const Value *Ptr,
309309
if (AR == NoAlias)
310310
continue;
311311

312-
AllAR =
313-
AliasResult(AllAR & AR); // Possible downgrade to May/Partial, even No
312+
if (AR != MustAlias)
313+
MustAliasAll = false;
314314

315315
if (!FoundSet) {
316316
// If this is the first alias set ptr can go into, remember it.
@@ -321,7 +321,6 @@ AliasSet *AliasSetTracker::mergeAliasSetsForPointer(const Value *Ptr,
321321
}
322322
}
323323

324-
MustAliasAll = (AllAR == MustAlias);
325324
return FoundSet;
326325
}
327326

0 commit comments

Comments
 (0)