From: Daniel Berlin Date: Tue, 16 May 2017 20:02:45 +0000 (+0000) Subject: NewGVN: Only do something in verifyStoreExpressions if assertions are enabled, to... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d0402428aed202d4f33663c8fba21593029e05ff;p=llvm NewGVN: Only do something in verifyStoreExpressions if assertions are enabled, to avoid unused code warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303201 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/NewGVN.cpp b/lib/Transforms/Scalar/NewGVN.cpp index 81b29b6c28f..506e9ea8faf 100644 --- a/lib/Transforms/Scalar/NewGVN.cpp +++ b/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> StoreExpressionSet; for (const auto &KV : ExpressionToClass) { if (auto *SE = dyn_cast(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