summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDaniel Berlin <dberlin@dberlin.org>2017-05-16 20:02:45 +0000
committerDaniel Berlin <dberlin@dberlin.org>2017-05-16 20:02:45 +0000
commit6c66e9a22ac28e286e92f175893f0b466c1ab0db (patch)
tree7991c83fc2281c6e1766b3496789bc78e41dfd87 /llvm/lib
parent4540357240e545ec91885913ac67362c80cfc388 (diff)
downloadbcm5719-llvm-6c66e9a22ac28e286e92f175893f0b466c1ab0db.tar.gz
bcm5719-llvm-6c66e9a22ac28e286e92f175893f0b466c1ab0db.zip
NewGVN: Only do something in verifyStoreExpressions if assertions are enabled, to avoid unused code warnings.
llvm-svn: 303201
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/NewGVN.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/NewGVN.cpp b/llvm/lib/Transforms/Scalar/NewGVN.cpp
index 81b29b6c28f..506e9ea8faf 100644
--- a/llvm/lib/Transforms/Scalar/NewGVN.cpp
+++ b/llvm/lib/Transforms/Scalar/NewGVN.cpp
@@ -2643,6 +2643,7 @@ void NewGVN::verifyIterationSettled(Function &F) {
// if we don't erase the old store expressions from the table, a load can find
// a no-longer valid StoreExpression.
void NewGVN::verifyStoreExpressions() const {
+#ifndef NDEBUG
DenseSet<std::pair<const Value *, const Value *>> StoreExpressionSet;
for (const auto &KV : ExpressionToClass) {
if (auto *SE = dyn_cast<StoreExpression>(KV.first)) {
@@ -2657,6 +2658,7 @@ void NewGVN::verifyStoreExpressions() const {
"StoreExpression for value");
}
}
+#endif
}
// This is the main value numbering loop, it iterates over the initial touched
OpenPOWER on IntegriCloud