[llvm] r303201 - NewGVN: Only do something in verifyStoreExpressions if assertions are enabled, to avoid unused code warnings.
Daniel Berlin via llvm-commits
llvm-commits at lists.llvm.org
Tue May 16 13:02:45 PDT 2017
Author: dannyb
Date: Tue May 16 15:02:45 2017
New Revision: 303201
URL: http://llvm.org/viewvc/llvm-project?rev=303201&view=rev
Log:
NewGVN: Only do something in verifyStoreExpressions if assertions are enabled, to avoid unused code warnings.
Modified:
llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp?rev=303201&r1=303200&r2=303201&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp Tue May 16 15:02:45 2017
@@ -2643,6 +2643,7 @@ void NewGVN::verifyIterationSettled(Func
// 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() co
"StoreExpression for value");
}
}
+#endif
}
// This is the main value numbering loop, it iterates over the initial touched
More information about the llvm-commits
mailing list