Convert DOUT to DEBUG(errs()...).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79762 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2009-08-22 20:46:59 +00:00
parent 960bb85b21
commit 9c52affd37

View File

@ -297,20 +297,26 @@ void PEI::calculateAnticAvail(MachineFunction &Fn) {
} }
} }
DEBUG(if (ShrinkWrapDebugging >= Details) { DEBUG({
DOUT << "-----------------------------------------------------------\n"; if (ShrinkWrapDebugging >= Details) {
DOUT << " Antic/Avail Sets:\n"; errs()
DOUT << "-----------------------------------------------------------\n"; << "-----------------------------------------------------------\n"
DOUT << "iterations = " << iterations << "\n"; << " Antic/Avail Sets:\n"
DOUT << "-----------------------------------------------------------\n"; << "-----------------------------------------------------------\n"
DOUT << "MBB | USED | ANTIC_IN | ANTIC_OUT | AVAIL_IN | AVAIL_OUT\n"; << "iterations = " << iterations << "\n"
DOUT << "-----------------------------------------------------------\n"; << "-----------------------------------------------------------\n"
<< "MBB | USED | ANTIC_IN | ANTIC_OUT | AVAIL_IN | AVAIL_OUT\n"
<< "-----------------------------------------------------------\n";
for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end(); for (MachineFunction::iterator MBBI = Fn.begin(), MBBE = Fn.end();
MBBI != MBBE; ++MBBI) { MBBI != MBBE; ++MBBI) {
MachineBasicBlock* MBB = MBBI; MachineBasicBlock* MBB = MBBI;
dumpSets(MBB); dumpSets(MBB);
} }
DOUT << "-----------------------------------------------------------\n";
errs()
<< "-----------------------------------------------------------\n";
}
}); });
} }
@ -945,10 +951,10 @@ void PEI::verifySpillRestorePlacement() {
if (spilled.empty()) if (spilled.empty())
continue; continue;
DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " DEBUG(errs() << "SAVE[" << getBasicBlockName(MBB) << "] = "
<< stringifyCSRegSet(spilled) << stringifyCSRegSet(spilled)
<< " RESTORE[" << getBasicBlockName(MBB) << "] = " << " RESTORE[" << getBasicBlockName(MBB) << "] = "
<< stringifyCSRegSet(CSRRestore[MBB]) << "\n"; << stringifyCSRegSet(CSRRestore[MBB]) << "\n");
if (CSRRestore[MBB].intersects(spilled)) { if (CSRRestore[MBB].intersects(spilled)) {
restored |= (CSRRestore[MBB] & spilled); restored |= (CSRRestore[MBB] & spilled);
@ -998,10 +1004,10 @@ void PEI::verifySpillRestorePlacement() {
if (restored.empty()) if (restored.empty())
continue; continue;
DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " DEBUG(errs() << "SAVE[" << getBasicBlockName(MBB) << "] = "
<< stringifyCSRegSet(CSRSave[MBB]) << stringifyCSRegSet(CSRSave[MBB])
<< " RESTORE[" << getBasicBlockName(MBB) << "] = " << " RESTORE[" << getBasicBlockName(MBB) << "] = "
<< stringifyCSRegSet(restored) << "\n"; << stringifyCSRegSet(restored) << "\n");
if (CSRSave[MBB].intersects(restored)) { if (CSRSave[MBB].intersects(restored)) {
spilled |= (CSRSave[MBB] & restored); spilled |= (CSRSave[MBB] & restored);
@ -1072,14 +1078,15 @@ std::string PEI::stringifyCSRegSet(const CSRegSet& s) {
} }
void PEI::dumpSet(const CSRegSet& s) { void PEI::dumpSet(const CSRegSet& s) {
DOUT << stringifyCSRegSet(s) << "\n"; DEBUG(errs() << stringifyCSRegSet(s) << "\n");
} }
void PEI::dumpUsed(MachineBasicBlock* MBB) { void PEI::dumpUsed(MachineBasicBlock* MBB) {
if (MBB) { DEBUG({
DOUT << "CSRUsed[" << getBasicBlockName(MBB) << "] = " if (MBB)
errs() << "CSRUsed[" << getBasicBlockName(MBB) << "] = "
<< stringifyCSRegSet(CSRUsed[MBB]) << "\n"; << stringifyCSRegSet(CSRUsed[MBB]) << "\n";
} });
} }
void PEI::dumpAllUsed() { void PEI::dumpAllUsed() {
@ -1091,19 +1098,21 @@ void PEI::dumpAllUsed() {
} }
void PEI::dumpSets(MachineBasicBlock* MBB) { void PEI::dumpSets(MachineBasicBlock* MBB) {
if (MBB) { DEBUG({
DOUT << getBasicBlockName(MBB) << " | " if (MBB)
errs() << getBasicBlockName(MBB) << " | "
<< stringifyCSRegSet(CSRUsed[MBB]) << " | " << stringifyCSRegSet(CSRUsed[MBB]) << " | "
<< stringifyCSRegSet(AnticIn[MBB]) << " | " << stringifyCSRegSet(AnticIn[MBB]) << " | "
<< stringifyCSRegSet(AnticOut[MBB]) << " | " << stringifyCSRegSet(AnticOut[MBB]) << " | "
<< stringifyCSRegSet(AvailIn[MBB]) << " | " << stringifyCSRegSet(AvailIn[MBB]) << " | "
<< stringifyCSRegSet(AvailOut[MBB]) << "\n"; << stringifyCSRegSet(AvailOut[MBB]) << "\n";
} });
} }
void PEI::dumpSets1(MachineBasicBlock* MBB) { void PEI::dumpSets1(MachineBasicBlock* MBB) {
if (MBB) { DEBUG({
DOUT << getBasicBlockName(MBB) << " | " if (MBB)
errs() << getBasicBlockName(MBB) << " | "
<< stringifyCSRegSet(CSRUsed[MBB]) << " | " << stringifyCSRegSet(CSRUsed[MBB]) << " | "
<< stringifyCSRegSet(AnticIn[MBB]) << " | " << stringifyCSRegSet(AnticIn[MBB]) << " | "
<< stringifyCSRegSet(AnticOut[MBB]) << " | " << stringifyCSRegSet(AnticOut[MBB]) << " | "
@ -1111,7 +1120,7 @@ void PEI::dumpSets1(MachineBasicBlock* MBB) {
<< stringifyCSRegSet(AvailOut[MBB]) << " | " << stringifyCSRegSet(AvailOut[MBB]) << " | "
<< stringifyCSRegSet(CSRSave[MBB]) << " | " << stringifyCSRegSet(CSRSave[MBB]) << " | "
<< stringifyCSRegSet(CSRRestore[MBB]) << "\n"; << stringifyCSRegSet(CSRRestore[MBB]) << "\n";
} });
} }
void PEI::dumpAllSets() { void PEI::dumpAllSets() {
@ -1123,20 +1132,21 @@ void PEI::dumpAllSets() {
} }
void PEI::dumpSRSets() { void PEI::dumpSRSets() {
DEBUG({
for (MachineFunction::iterator MBB = MF->begin(), E = MF->end(); for (MachineFunction::iterator MBB = MF->begin(), E = MF->end();
MBB != E; ++MBB) { MBB != E; ++MBB) {
if (! CSRSave[MBB].empty()) { if (!CSRSave[MBB].empty()) {
DOUT << "SAVE[" << getBasicBlockName(MBB) << "] = " errs() << "SAVE[" << getBasicBlockName(MBB) << "] = "
<< stringifyCSRegSet(CSRSave[MBB]); << stringifyCSRegSet(CSRSave[MBB]);
if (CSRRestore[MBB].empty()) if (CSRRestore[MBB].empty())
DOUT << "\n"; errs() << '\n';
} }
if (! CSRRestore[MBB].empty()) {
if (! CSRSave[MBB].empty()) if (!CSRRestore[MBB].empty() && !CSRSave[MBB].empty())
DOUT << " "; errs() << " "
DOUT << "RESTORE[" << getBasicBlockName(MBB) << "] = " << "RESTORE[" << getBasicBlockName(MBB) << "] = "
<< stringifyCSRegSet(CSRRestore[MBB]) << "\n"; << stringifyCSRegSet(CSRRestore[MBB]) << "\n";
} }
} });
} }
#endif #endif