mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-08 19:25:47 +00:00
DEBUGify some DOUTs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78887 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -143,11 +143,11 @@ bool LoopUnroll::runOnLoop(Loop *L, LPPassManager &LPM) {
|
|||||||
// Enforce the threshold.
|
// Enforce the threshold.
|
||||||
if (UnrollThreshold != NoThreshold) {
|
if (UnrollThreshold != NoThreshold) {
|
||||||
unsigned LoopSize = ApproximateLoopSize(L);
|
unsigned LoopSize = ApproximateLoopSize(L);
|
||||||
DOUT << " Loop Size = " << LoopSize << "\n";
|
DEBUG(errs() << " Loop Size = " << LoopSize << "\n");
|
||||||
uint64_t Size = (uint64_t)LoopSize*Count;
|
uint64_t Size = (uint64_t)LoopSize*Count;
|
||||||
if (TripCount != 1 && Size > UnrollThreshold) {
|
if (TripCount != 1 && Size > UnrollThreshold) {
|
||||||
DOUT << " Too large to fully unroll with count: " << Count
|
DEBUG(errs() << " Too large to fully unroll with count: " << Count
|
||||||
<< " because size: " << Size << ">" << UnrollThreshold << "\n";
|
<< " because size: " << Size << ">" << UnrollThreshold << "\n");
|
||||||
if (UnrollAllowPartial) {
|
if (UnrollAllowPartial) {
|
||||||
// Reduce unroll count to be modulo of TripCount for partial unrolling
|
// Reduce unroll count to be modulo of TripCount for partial unrolling
|
||||||
Count = UnrollThreshold / LoopSize;
|
Count = UnrollThreshold / LoopSize;
|
||||||
@@ -155,14 +155,15 @@ bool LoopUnroll::runOnLoop(Loop *L, LPPassManager &LPM) {
|
|||||||
Count--;
|
Count--;
|
||||||
}
|
}
|
||||||
if (Count < 2) {
|
if (Count < 2) {
|
||||||
DOUT << " could not unroll partially\n";
|
DEBUG(errs() << " could not unroll partially\n");
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
DOUT << " partially unrolling with count: " << Count << "\n";
|
DEBUG(errs() << " partially unrolling with count: "
|
||||||
|
<< Count << "\n");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DOUT << " will not try to unroll partially because "
|
DEBUG(errs() << " will not try to unroll partially because "
|
||||||
<< "-unroll-allow-partial not given\n";
|
<< "-unroll-allow-partial not given\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user