Change errs() to dbgs().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92520 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Greene 2010-01-04 22:02:01 +00:00
parent f1c3a8650a
commit 083b7ffb4d

View File

@ -229,14 +229,14 @@ bool IfConverter::runOnMachineFunction(MachineFunction &MF) {
TII = MF.getTarget().getInstrInfo(); TII = MF.getTarget().getInstrInfo();
if (!TII) return false; if (!TII) return false;
DEBUG(errs() << "\nIfcvt: function (" << ++FnNum << ") \'" DEBUG(dbgs() << "\nIfcvt: function (" << ++FnNum << ") \'"
<< MF.getFunction()->getName() << "\'"); << MF.getFunction()->getName() << "\'");
if (FnNum < IfCvtFnStart || (IfCvtFnStop != -1 && FnNum > IfCvtFnStop)) { if (FnNum < IfCvtFnStart || (IfCvtFnStop != -1 && FnNum > IfCvtFnStop)) {
DEBUG(errs() << " skipped\n"); DEBUG(dbgs() << " skipped\n");
return false; return false;
} }
DEBUG(errs() << "\n"); DEBUG(dbgs() << "\n");
MF.RenumberBlocks(); MF.RenumberBlocks();
BBAnalysis.resize(MF.getNumBlockIDs()); BBAnalysis.resize(MF.getNumBlockIDs());
@ -281,13 +281,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;
DEBUG(errs() << "Ifcvt (Simple" << (Kind == ICSimpleFalse ? " false" :"") DEBUG(dbgs() << "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);
DEBUG(errs() << (RetVal ? "succeeded!" : "failed!") << "\n"); DEBUG(dbgs() << (RetVal ? "succeeded!" : "failed!") << "\n");
if (RetVal) { if (RetVal) {
if (isFalse) NumSimpleFalse++; if (isFalse) NumSimpleFalse++;
else NumSimple++; else NumSimple++;
@ -304,16 +304,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;
DEBUG(errs() << "Ifcvt (Triangle"); DEBUG(dbgs() << "Ifcvt (Triangle");
if (isFalse) if (isFalse)
DEBUG(errs() << " false"); DEBUG(dbgs() << " false");
if (isRev) if (isRev)
DEBUG(errs() << " rev"); DEBUG(dbgs() << " rev");
DEBUG(errs() << "): BB#" << BBI.BB->getNumber() << " (T:" DEBUG(dbgs() << "): 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);
DEBUG(errs() << (RetVal ? "succeeded!" : "failed!") << "\n"); DEBUG(dbgs() << (RetVal ? "succeeded!" : "failed!") << "\n");
if (RetVal) { if (RetVal) {
if (isFalse) { if (isFalse) {
if (isRev) NumTriangleFRev++; if (isRev) NumTriangleFRev++;
@ -327,11 +327,11 @@ bool IfConverter::runOnMachineFunction(MachineFunction &MF) {
} }
case ICDiamond: { case ICDiamond: {
if (DisableDiamond) break; if (DisableDiamond) break;
DEBUG(errs() << "Ifcvt (Diamond): BB#" << BBI.BB->getNumber() << " (T:" DEBUG(dbgs() << "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);
DEBUG(errs() << (RetVal ? "succeeded!" : "failed!") << "\n"); DEBUG(dbgs() << (RetVal ? "succeeded!" : "failed!") << "\n");
if (RetVal) NumDiamonds++; if (RetVal) NumDiamonds++;
break; break;
} }
@ -1141,7 +1141,7 @@ void IfConverter::PredicateBlock(BBInfo &BBI,
continue; continue;
if (!TII->PredicateInstruction(I, Cond)) { if (!TII->PredicateInstruction(I, Cond)) {
#ifndef NDEBUG #ifndef NDEBUG
errs() << "Unable to predicate " << *I << "!\n"; dbgs() << "Unable to predicate " << *I << "!\n";
#endif #endif
llvm_unreachable(0); llvm_unreachable(0);
} }
@ -1177,7 +1177,7 @@ void IfConverter::CopyAndPredicateBlock(BBInfo &ToBBI, BBInfo &FromBBI,
if (!isPredicated) if (!isPredicated)
if (!TII->PredicateInstruction(MI, Cond)) { if (!TII->PredicateInstruction(MI, Cond)) {
#ifndef NDEBUG #ifndef NDEBUG
errs() << "Unable to predicate " << *I << "!\n"; dbgs() << "Unable to predicate " << *I << "!\n";
#endif #endif
llvm_unreachable(0); llvm_unreachable(0);
} }