We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 44551cf commit c8d6e04Copy full SHA for c8d6e04
llvm/lib/Analysis/MemorySSA.cpp
@@ -543,8 +543,11 @@ template <class AliasAnalysisType> class ClobberWalker {
543
walkToPhiOrClobber(DefPath &Desc, const MemoryAccess *StopAt = nullptr,
544
const MemoryAccess *SkipStopAt = nullptr) const {
545
assert(!isa<MemoryUse>(Desc.Last) && "Uses don't exist in my world");
546
- assert(UpwardWalkLimit && *UpwardWalkLimit > 0 &&
547
- "Need a positive walk limit");
+ assert(UpwardWalkLimit && "Need a valid walk limit");
+ // This will not do any alias() calls. It returns in the first iteration in
548
+ // the loop below.
549
+ if (*UpwardWalkLimit == 0)
550
+ (*UpwardWalkLimit)++;
551
552
for (MemoryAccess *Current : def_chain(Desc.Last)) {
553
Desc.Last = Current;
0 commit comments