mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-14 15:38:57 +00:00
replace printBasicBlockLabel with EmitBasicBlockStart,
now that printBasicBlockLabel is only used for starting a MBB. This allows elimination of a bunch of arguments. llvm-svn: 81684
This commit is contained in:
parent
89e5731659
commit
cbcbedf254
@ -350,12 +350,11 @@ namespace llvm {
|
||||
/// 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.
|
||||
///
|
||||
|
@ -1644,22 +1644,20 @@ MCSymbol *AsmPrinter::GetMBBSymbol(unsigned MBBID) const {
|
||||
}
|
||||
|
||||
|
||||
/// 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());
|
||||
@ -1667,8 +1665,7 @@ void AsmPrinter::printBasicBlockLabel(const MachineBasicBlock *MBB,
|
||||
WriteAsOperand(O, BB, /*PrintType=*/false);
|
||||
}
|
||||
|
||||
if (printColon)
|
||||
EmitComments(*MBB);
|
||||
EmitComments(*MBB);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -282,7 +282,7 @@ bool ARMAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
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();
|
||||
|
@ -170,7 +170,7 @@ bool AlphaAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
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();
|
||||
|
@ -137,7 +137,7 @@ bool BlackfinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
// 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';
|
||||
}
|
||||
|
||||
|
@ -463,7 +463,7 @@ bool LinuxAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
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();
|
||||
|
@ -126,7 +126,7 @@ bool MSP430AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
// 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';
|
||||
}
|
||||
|
||||
|
@ -270,7 +270,7 @@ bool MipsAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
|
||||
// Print a label for the basic block.
|
||||
if (I != MF.begin()) {
|
||||
printBasicBlockLabel(I, true, true);
|
||||
EmitBasicBlockStart(I);
|
||||
O << '\n';
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ bool PIC16AsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
|
||||
// Print a label for the basic block.
|
||||
if (I != MF.begin()) {
|
||||
printBasicBlockLabel(I, true);
|
||||
EmitBasicBlockStart(I, false);
|
||||
O << '\n';
|
||||
}
|
||||
|
||||
|
@ -670,7 +670,7 @@ bool PPCLinuxAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
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();
|
||||
@ -854,7 +854,7 @@ bool PPCDarwinAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
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();
|
||||
|
@ -122,7 +122,7 @@ bool SparcAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
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();
|
||||
|
@ -131,7 +131,7 @@ bool SystemZAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
// 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';
|
||||
}
|
||||
|
||||
|
@ -245,7 +245,7 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
// 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();
|
||||
|
@ -170,7 +170,7 @@ bool X86IntelAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
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();
|
||||
|
@ -273,7 +273,7 @@ bool XCoreAsmPrinter::runOnMachineFunction(MachineFunction &MF)
|
||||
|
||||
// Print a label for the basic block.
|
||||
if (I != MF.begin()) {
|
||||
printBasicBlockLabel(I, true , true);
|
||||
EmitBasicBlockStart(I);
|
||||
O << '\n';
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user