mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-28 15:33:16 +00:00
[RewriteStatepointsForGC] Strengthen a confusingly weak assertion [NFC]
The assertion was weaker than it should be and gave the impression we're growing the number of base defining values being considered during the fixed point interation. That's not true. The tighter form of the assert is useful documentation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247221 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
dc9cbaf22e
commit
3f0fe63960
@ -797,7 +797,7 @@ static Value *findBasePointer(Value *I, DefiningValueMapTy &cache) {
|
||||
bool progress = true;
|
||||
while (progress) {
|
||||
#ifndef NDEBUG
|
||||
size_t oldSize = States.size();
|
||||
const size_t oldSize = States.size();
|
||||
#endif
|
||||
progress = false;
|
||||
// We're only changing values in this loop, thus safe to keep iterators.
|
||||
@ -842,8 +842,8 @@ static Value *findBasePointer(Value *I, DefiningValueMapTy &cache) {
|
||||
}
|
||||
}
|
||||
|
||||
assert(oldSize <= States.size());
|
||||
assert(oldSize == States.size() || progress);
|
||||
assert(oldSize == States.size() &&
|
||||
"fixed point shouldn't be adding any new nodes to state");
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
Loading…
Reference in New Issue
Block a user