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