summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2015-09-10 00:32:56 +0000
committerPhilip Reames <listmail@philipreames.com>2015-09-10 00:32:56 +0000
commitb4e55f392390a6c37541f996a4497b1806d54b90 (patch)
tree049702af8ed8e2dbd937cf4d513d333790313434 /llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
parentc8ded462c4f845026dbc347bf37e2951dbbd01ed (diff)
downloadbcm5719-llvm-b4e55f392390a6c37541f996a4497b1806d54b90.tar.gz
bcm5719-llvm-b4e55f392390a6c37541f996a4497b1806d54b90.zip
[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. llvm-svn: 247221
Diffstat (limited to 'llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
index 22baeddc1a5..57687def2d9 100644
--- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
+++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
@@ -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
OpenPOWER on IntegriCloud