[llvm] r298760 - [NewGVN] Adjust NDEBUG markers.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 24 19:40:02 PDT 2017


Author: davide
Date: Fri Mar 24 21:40:02 2017
New Revision: 298760

URL: http://llvm.org/viewvc/llvm-project?rev=298760&view=rev
Log:
[NewGVN] Adjust NDEBUG markers.

This avoids 'used but not defined' warnings in Release builds
with GCC.

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=298760&r1=298759&r2=298760&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/NewGVN.cpp Fri Mar 24 21:40:02 2017
@@ -1928,6 +1928,7 @@ bool NewGVN::singleReachablePHIPath(cons
 // subject to very rare false negatives. It is only useful for
 // testing/debugging.
 void NewGVN::verifyMemoryCongruency() const {
+#ifndef NDEBUG
   // Anything equivalent in the memory access table should be in the same
   // congruence class.
 
@@ -1982,6 +1983,7 @@ void NewGVN::verifyMemoryCongruency() co
              "All MemoryPhi arguments should be in the same class");
     }
   }
+#endif
 }
 
 // Verify that the sparse propagation we did actually found the maximal fixpoint
@@ -2167,10 +2169,8 @@ bool NewGVN::runGVN() {
 
   initializeCongruenceClasses(F);
   iterateTouchedInstructions();
-#ifndef NDEBUG
   verifyMemoryCongruency();
   verifyIterationSettled(F);
-#endif
 
   Changed |= eliminateInstructions(F);
 




More information about the llvm-commits mailing list