[llvm] r318964 - Revert 318963 "[APInt] Don't print debug messages from the APInt knuth division algorithm by default"

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 24 11:32:35 PST 2017


Author: ctopper
Date: Fri Nov 24 11:32:34 2017
New Revision: 318964

URL: http://llvm.org/viewvc/llvm-project?rev=318964&view=rev
Log:
Revert 318963 "[APInt] Don't print debug messages from the APInt knuth division algorithm by default"

I seem to have botched the logic when switching to push_macro

Modified:
    llvm/trunk/lib/Support/APInt.cpp

Modified: llvm/trunk/lib/Support/APInt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APInt.cpp?rev=318964&r1=318963&r2=318964&view=diff
==============================================================================
--- llvm/trunk/lib/Support/APInt.cpp (original)
+++ llvm/trunk/lib/Support/APInt.cpp Fri Nov 24 11:32:34 2017
@@ -1252,14 +1252,6 @@ static void KnuthDiv(uint32_t *u, uint32
   // b denotes the base of the number system. In our case b is 2^32.
   const uint64_t b = uint64_t(1) << 32;
 
-// The DEBUG macros here tend to be spam in the debug output if you're not
-// debugging this code. Disable them unless KNUTH_DEBUG is defined.
-#pragma push_macro("DEBUG")
-#ifndef KNUTH_DEBUG
-#undef DEBUG
-#define DEBUG(X) do {} while (true)
-#endif
-
   DEBUG(dbgs() << "KnuthDiv: m=" << m << " n=" << n << '\n');
   DEBUG(dbgs() << "KnuthDiv: original:");
   DEBUG(for (int i = m+n; i >=0; i--) dbgs() << " " << u[i]);
@@ -1399,8 +1391,6 @@ static void KnuthDiv(uint32_t *u, uint32
     DEBUG(dbgs() << '\n');
   }
   DEBUG(dbgs() << '\n');
-
-#pragma pop_macro("DEBUG")
 }
 
 void APInt::divide(const WordType *LHS, unsigned lhsWords, const WordType *RHS,




More information about the llvm-commits mailing list