]> granicus.if.org Git - llvm/commitdiff
[NewGVN] Adjust NDEBUG markers.
authorDavide Italiano <davide@freebsd.org>
Sat, 25 Mar 2017 02:40:02 +0000 (02:40 +0000)
committerDavide Italiano <davide@freebsd.org>
Sat, 25 Mar 2017 02:40:02 +0000 (02:40 +0000)
This avoids 'used but not defined' warnings in Release builds
with GCC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298760 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/NewGVN.cpp

index ab7400c562bdc8a767dd5ad400c520f2baa7cdae..9dbafec09df683c30e7e4f98700c5b2785d4fe55 100644 (file)
@@ -1928,6 +1928,7 @@ bool NewGVN::singleReachablePHIPath(const MemoryAccess *First,
 // 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() const {
              "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);