/// block label.
MCSymbol *GetMBBSymbol(unsigned MBBID) const;
- /// printBasicBlockLabel - This method prints the label for the specified
- /// MachineBasicBlock
- void printBasicBlockLabel(const MachineBasicBlock *MBB,
- bool printAlign = false,
- bool printColon = false,
- bool printComment = true) const;
+ /// EmitBasicBlockStart - This method prints the label for the specified
+ /// MachineBasicBlock, an alignment (if present) and a comment describing
+ /// it if appropriate.
+ void EmitBasicBlockStart(const MachineBasicBlock *MBB,
+ bool printColon = true) const;
protected:
/// EmitZeros - Emit a block of zeros.
///
}
-/// printBasicBlockLabel - This method prints the label for the specified
-/// MachineBasicBlock
-void AsmPrinter::printBasicBlockLabel(const MachineBasicBlock *MBB,
- bool printAlign, bool printColon,
- bool printComment) const {
- if (printAlign) {
- unsigned Align = MBB->getAlignment();
- if (Align)
- EmitAlignment(Log2_32(Align));
- }
+/// EmitBasicBlockStart - This method prints the label for the specified
+/// MachineBasicBlock, an alignment (if present) and a comment describing
+/// it if appropriate.
+void AsmPrinter::EmitBasicBlockStart(const MachineBasicBlock *MBB,
+ bool PrintColon) const {
+ if (unsigned Align = MBB->getAlignment())
+ EmitAlignment(Log2_32(Align));
GetMBBSymbol(MBB->getNumber())->print(O, MAI);
- if (printColon)
+ if (PrintColon)
O << ':';
- if (printComment) {
+
+ if (VerboseAsm) {
if (const BasicBlock *BB = MBB->getBasicBlock())
if (BB->hasName()) {
O.PadToColumn(MAI->getCommentColumn());
WriteAsOperand(O, BB, /*PrintType=*/false);
}
- if (printColon)
- EmitComments(*MBB);
+ EmitComments(*MBB);
}
}
I != E; ++I) {
// Print a label for the basic block.
if (I != MF.begin()) {
- printBasicBlockLabel(I, true, true, VerboseAsm);
+ EmitBasicBlockStart(I);
O << '\n';
}
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
I != E; ++I) {
if (I != MF.begin()) {
- printBasicBlockLabel(I, true, true);
+ EmitBasicBlockStart(I);
O << '\n';
}
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
// This is an entry block or a block that's only reachable via a
// fallthrough edge. In non-VerboseAsm mode, don't print the label.
} else {
- printBasicBlockLabel(I, true, true, VerboseAsm);
+ EmitBasicBlockStart(I);
O << '\n';
}
I != E; ++I) {
// Print a label for the basic block.
if (I != MF.begin()) {
- printBasicBlockLabel(I, true, true);
+ EmitBasicBlockStart(I);
O << '\n';
}
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
// This is an entry block or a block that's only reachable via a
// fallthrough edge. In non-VerboseAsm mode, don't print the label.
} else {
- printBasicBlockLabel(I, true, true, VerboseAsm);
+ EmitBasicBlockStart(I);
O << '\n';
}
// Print a label for the basic block.
if (I != MF.begin()) {
- printBasicBlockLabel(I, true, true);
+ EmitBasicBlockStart(I);
O << '\n';
}
// Print a label for the basic block.
if (I != MF.begin()) {
- printBasicBlockLabel(I, true);
+ EmitBasicBlockStart(I, false);
O << '\n';
}
I != E; ++I) {
// Print a label for the basic block.
if (I != MF.begin()) {
- printBasicBlockLabel(I, true, true);
+ EmitBasicBlockStart(I);
O << '\n';
}
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
I != E; ++I) {
// Print a label for the basic block.
if (I != MF.begin()) {
- printBasicBlockLabel(I, true, true, VerboseAsm);
+ EmitBasicBlockStart(I);
O << '\n';
}
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
I != E; ++I) {
// Print a label for the basic block.
if (I != MF.begin()) {
- printBasicBlockLabel(I, true, true);
+ EmitBasicBlockStart(I);
O << '\n';
}
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
// This is an entry block or a block that's only reachable via a
// fallthrough edge. In non-VerboseAsm mode, don't print the label.
} else {
- printBasicBlockLabel(I, true, true, VerboseAsm);
+ EmitBasicBlockStart(I);
O << '\n';
}
// This is an entry block or a block that's only reachable via a
// fallthrough edge. In non-VerboseAsm mode, don't print the label.
} else {
- printBasicBlockLabel(I, true, true, VerboseAsm);
+ EmitBasicBlockStart(I);
O << '\n';
}
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
I != E; ++I) {
// Print a label for the basic block if there are any predecessors.
if (!I->pred_empty()) {
- printBasicBlockLabel(I, true, true);
+ EmitBasicBlockStart(I);
O << '\n';
}
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
// Print a label for the basic block.
if (I != MF.begin()) {
- printBasicBlockLabel(I, true , true);
+ EmitBasicBlockStart(I);
O << '\n';
}