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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79751 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2009-08-22 20:11:17 +00:00
parent fb98a43b31
commit 44ff7949c7

View File

@ -229,13 +229,13 @@ bool IfConverter::runOnMachineFunction(MachineFunction &MF) {
if (!TII) return false; if (!TII) return false;
DEBUG(errs() << "\nIfcvt: function (" << ++FnNum << ") \'" DEBUG(errs() << "\nIfcvt: function (" << ++FnNum << ") \'"
<< MF.getFunction()->getName() << "\'"); << MF.getFunction()->getName() << "\'");
if (FnNum < IfCvtFnStart || (IfCvtFnStop != -1 && FnNum > IfCvtFnStop)) { if (FnNum < IfCvtFnStart || (IfCvtFnStop != -1 && FnNum > IfCvtFnStop)) {
DOUT << " skipped\n"; DEBUG(errs() << " skipped\n");
return false; return false;
} }
DOUT << "\n"; DEBUG(errs() << "\n");
MF.RenumberBlocks(); MF.RenumberBlocks();
BBAnalysis.resize(MF.getNumBlockIDs()); BBAnalysis.resize(MF.getNumBlockIDs());
@ -280,13 +280,13 @@ bool IfConverter::runOnMachineFunction(MachineFunction &MF) {
case ICSimpleFalse: { case ICSimpleFalse: {
bool isFalse = Kind == ICSimpleFalse; bool isFalse = Kind == ICSimpleFalse;
if ((isFalse && DisableSimpleF) || (!isFalse && DisableSimple)) break; if ((isFalse && DisableSimpleF) || (!isFalse && DisableSimple)) break;
DOUT << "Ifcvt (Simple" << (Kind == ICSimpleFalse ? " false" :"") DEBUG(errs() << "Ifcvt (Simple" << (Kind == ICSimpleFalse ? " false" :"")
<< "): BB#" << BBI.BB->getNumber() << " (" << "): BB#" << BBI.BB->getNumber() << " ("
<< ((Kind == ICSimpleFalse) << ((Kind == ICSimpleFalse)
? BBI.FalseBB->getNumber() ? BBI.FalseBB->getNumber()
: BBI.TrueBB->getNumber()) << ") "; : BBI.TrueBB->getNumber()) << ") ");
RetVal = IfConvertSimple(BBI, Kind); RetVal = IfConvertSimple(BBI, Kind);
DOUT << (RetVal ? "succeeded!" : "failed!") << "\n"; DEBUG(errs() << (RetVal ? "succeeded!" : "failed!") << "\n");
if (RetVal) { if (RetVal) {
if (isFalse) NumSimpleFalse++; if (isFalse) NumSimpleFalse++;
else NumSimple++; else NumSimple++;
@ -303,16 +303,16 @@ bool IfConverter::runOnMachineFunction(MachineFunction &MF) {
if (DisableTriangleR && !isFalse && isRev) break; if (DisableTriangleR && !isFalse && isRev) break;
if (DisableTriangleF && isFalse && !isRev) break; if (DisableTriangleF && isFalse && !isRev) break;
if (DisableTriangleFR && isFalse && isRev) break; if (DisableTriangleFR && isFalse && isRev) break;
DOUT << "Ifcvt (Triangle"; DEBUG(errs() << "Ifcvt (Triangle");
if (isFalse) if (isFalse)
DOUT << " false"; DEBUG(errs() << " false");
if (isRev) if (isRev)
DOUT << " rev"; DEBUG(errs() << " rev");
DOUT << "): BB#" << BBI.BB->getNumber() << " (T:" DEBUG(errs() << "): BB#" << BBI.BB->getNumber() << " (T:"
<< BBI.TrueBB->getNumber() << ",F:" << BBI.TrueBB->getNumber() << ",F:"
<< BBI.FalseBB->getNumber() << ") "; << BBI.FalseBB->getNumber() << ") ");
RetVal = IfConvertTriangle(BBI, Kind); RetVal = IfConvertTriangle(BBI, Kind);
DOUT << (RetVal ? "succeeded!" : "failed!") << "\n"; DEBUG(errs() << (RetVal ? "succeeded!" : "failed!") << "\n");
if (RetVal) { if (RetVal) {
if (isFalse) { if (isFalse) {
if (isRev) NumTriangleFRev++; if (isRev) NumTriangleFRev++;
@ -326,11 +326,11 @@ bool IfConverter::runOnMachineFunction(MachineFunction &MF) {
} }
case ICDiamond: { case ICDiamond: {
if (DisableDiamond) break; if (DisableDiamond) break;
DOUT << "Ifcvt (Diamond): BB#" << BBI.BB->getNumber() << " (T:" DEBUG(errs() << "Ifcvt (Diamond): BB#" << BBI.BB->getNumber() << " (T:"
<< BBI.TrueBB->getNumber() << ",F:" << BBI.TrueBB->getNumber() << ",F:"
<< BBI.FalseBB->getNumber() << ") "; << BBI.FalseBB->getNumber() << ") ");
RetVal = IfConvertDiamond(BBI, Kind, NumDups, NumDups2); RetVal = IfConvertDiamond(BBI, Kind, NumDups, NumDups2);
DOUT << (RetVal ? "succeeded!" : "failed!") << "\n"; DEBUG(errs() << (RetVal ? "succeeded!" : "failed!") << "\n");
if (RetVal) NumDiamonds++; if (RetVal) NumDiamonds++;
break; break;
} }