NewGVN: Only do something in verifyStoreExpressions if assertions are enabled, to...
authorDaniel Berlin <dberlin@dberlin.org>
Tue, 16 May 2017 20:02:45 +0000 (20:02 +0000)
committerDaniel Berlin <dberlin@dberlin.org>
Tue, 16 May 2017 20:02:45 +0000 (20:02 +0000)
llvm-svn: 303201

llvm/lib/Transforms/Scalar/NewGVN.cpp

index 81b29b6..506e9ea 100644 (file)
@@ -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