case TargetInstrInfo::EH_LABEL:
case TargetInstrInfo::GC_LABEL:
printLabel(II);
+ O << '\n';
break;
case TargetInstrInfo::INLINEASM:
printInlineAsm(II);
+ O << '\n';
break;
case TargetInstrInfo::IMPLICIT_DEF:
printImplicitDef(II);
+ O << '\n';
break;
case TargetInstrInfo::KILL:
printKill(II);
+ O << '\n';
break;
default:
EmitInstruction(II);
}
if (VerboseAsm)
EmitComments(*II);
- O << '\n';
// FIXME: Clean up processDebugLoc.
processDebugLoc(II, false);
}
}
-/// EmitComments - Pretty-print comments for basic blocks.
+/// PrintBasicBlockLoopComments - Pretty-print comments for basic blocks.
static void PrintBasicBlockLoopComments(const MachineBasicBlock &MBB,
const MachineLoopInfo *LI,
const AsmPrinter &AP) {
if (!VerboseAsm)
return;
- bool Newline = false;
-
if (!MI.getDebugLoc().isUnknown()) {
DILocation DLT = MF->getDILocation(MI.getDebugLoc());
O << ':' << DLT.getLineNumber();
if (DLT.getColumnNumber() != 0)
O << ':' << DLT.getColumnNumber();
- Newline = true;
+ O << '\n';
}
// Check for spills and reloads
if (TM.getInstrInfo()->isLoadFromStackSlotPostFE(&MI, FI)) {
if (FrameInfo->isSpillSlotObjectIndex(FI)) {
MMO = *MI.memoperands_begin();
- if (Newline) O << '\n';
O.PadToColumn(MAI->getCommentColumn());
- O << MAI->getCommentString() << ' ' << MMO->getSize() << "-byte Reload";
- Newline = true;
+ O << MAI->getCommentString() << ' ' << MMO->getSize() << "-byte Reload\n";
}
}
else if (TM.getInstrInfo()->hasLoadFromStackSlot(&MI, MMO, FI)) {
if (FrameInfo->isSpillSlotObjectIndex(FI)) {
- if (Newline) O << '\n';
O.PadToColumn(MAI->getCommentColumn());
O << MAI->getCommentString() << ' '
- << MMO->getSize() << "-byte Folded Reload";
- Newline = true;
+ << MMO->getSize() << "-byte Folded Reload\n";
}
}
else if (TM.getInstrInfo()->isStoreToStackSlotPostFE(&MI, FI)) {
if (FrameInfo->isSpillSlotObjectIndex(FI)) {
MMO = *MI.memoperands_begin();
- if (Newline) O << '\n';
O.PadToColumn(MAI->getCommentColumn());
- O << MAI->getCommentString() << ' ' << MMO->getSize() << "-byte Spill";
- Newline = true;
+ O << MAI->getCommentString() << ' ' << MMO->getSize() << "-byte Spill\n";
}
}
else if (TM.getInstrInfo()->hasStoreToStackSlot(&MI, MMO, FI)) {
if (FrameInfo->isSpillSlotObjectIndex(FI)) {
- if (Newline) O << '\n';
O.PadToColumn(MAI->getCommentColumn());
O << MAI->getCommentString() << ' '
- << MMO->getSize() << "-byte Folded Spill";
- Newline = true;
+ << MMO->getSize() << "-byte Folded Spill\n";
}
}
if (TM.getInstrInfo()->isMoveInstr(MI, SrcReg, DstReg,
SrcSubIdx, DstSubIdx)) {
if (MI.getAsmPrinterFlag(ReloadReuse)) {
- if (Newline) O << '\n';
O.PadToColumn(MAI->getCommentColumn());
- O << MAI->getCommentString() << " Reload Reuse";
+ O << MAI->getCommentString() << " Reload Reuse\n";
}
}
}