diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-20 14:16:56 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-20 14:16:56 +0000 |
| commit | 2cab237b5dbfe1b3e9c7aa7a3c02d2b98fcf7462 (patch) | |
| tree | 524fe828571f81358bba62fdb6d04c6e5e96a2a4 /contrib/llvm/lib/Support/APInt.cpp | |
| parent | 6c7828a2807ea5e50c79ca42dbedf2b589ce63b2 (diff) | |
| parent | 044eb2f6afba375a914ac9d8024f8f5142bb912e (diff) | |
Notes
Diffstat (limited to 'contrib/llvm/lib/Support/APInt.cpp')
| -rw-r--r-- | contrib/llvm/lib/Support/APInt.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/llvm/lib/Support/APInt.cpp b/contrib/llvm/lib/Support/APInt.cpp index c558ddd82161..1ea6319acfad 100644 --- a/contrib/llvm/lib/Support/APInt.cpp +++ b/contrib/llvm/lib/Support/APInt.cpp @@ -1252,6 +1252,14 @@ static void KnuthDiv(uint32_t *u, uint32_t *v, uint32_t *q, uint32_t* r, // 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 (false) +#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]); @@ -1391,6 +1399,8 @@ static void KnuthDiv(uint32_t *u, uint32_t *v, uint32_t *q, uint32_t* r, DEBUG(dbgs() << '\n'); } DEBUG(dbgs() << '\n'); + +#pragma pop_macro("DEBUG") } void APInt::divide(const WordType *LHS, unsigned lhsWords, const WordType *RHS, |
