]> granicus.if.org Git - llvm/commitdiff
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)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303201 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/NewGVN.cpp

index 81b29b6c28fbcdb4c38cae8a916d180132ac0d37..506e9ea8faf1f3b1a128f8407a05c1cac8fb963c 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