diff options
| author | Alina Sbirlea <asbirlea@google.com> | 2019-03-29 22:55:59 +0000 |
|---|---|---|
| committer | Alina Sbirlea <asbirlea@google.com> | 2019-03-29 22:55:59 +0000 |
| commit | c8d6e0496dc3bd44e15d640cd2c465cbfd1a6b08 (patch) | |
| tree | bf09f6f02598e36cf184dec85517533b24c1fb2c /llvm | |
| parent | 44551cf69380549205e386ae8b1d5518bafd44eb (diff) | |
| download | bcm5719-llvm-c8d6e0496dc3bd44e15d640cd2c465cbfd1a6b08.tar.gz bcm5719-llvm-c8d6e0496dc3bd44e15d640cd2c465cbfd1a6b08.zip | |
[MemorySSA] Temporary fix assert when reaching 0 limit.
llvm-svn: 357327
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/Analysis/MemorySSA.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/MemorySSA.cpp b/llvm/lib/Analysis/MemorySSA.cpp index 7a3f2db8831..a8100312f21 100644 --- a/llvm/lib/Analysis/MemorySSA.cpp +++ b/llvm/lib/Analysis/MemorySSA.cpp @@ -543,8 +543,11 @@ template <class AliasAnalysisType> class ClobberWalker { walkToPhiOrClobber(DefPath &Desc, const MemoryAccess *StopAt = nullptr, const MemoryAccess *SkipStopAt = nullptr) const { assert(!isa<MemoryUse>(Desc.Last) && "Uses don't exist in my world"); - assert(UpwardWalkLimit && *UpwardWalkLimit > 0 && - "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 + // the loop below. + if (*UpwardWalkLimit == 0) + (*UpwardWalkLimit)++; for (MemoryAccess *Current : def_chain(Desc.Last)) { Desc.Last = Current; |

