printOperand(MI, OpNo+1);
}
- virtual void printBasicBlockLabel(const MachineBasicBlock *MBB,
- bool printColon = false,
- bool printComment = true) const;
-
virtual bool runOnMachineFunction(MachineFunction &F) = 0;
virtual bool doFinalization(Module &M) = 0;
return;
}
-void PPCAsmPrinter::printBasicBlockLabel(const MachineBasicBlock *MBB,
- bool printColon,
- bool printComment) const {
- O << PrivateGlobalPrefix << "BB" << getFunctionNumber() << "_"
- << MBB->getNumber();
- if (printColon)
- O << ':';
- if (printComment)
- O << '\t' << CommentString << MBB->getBasicBlock()->getName();
-}
-
/// runOnMachineFunction - This uses the printMachineInstruction()
/// method to print assembly for each instruction.
///
return false; // success
}
-/// runOnMachineFunction - This uses the e()
+/// runOnMachineFunction - This uses the printMachineInstruction()
/// method to print assembly for each instruction.
///
bool AIXAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
// Print out code for the function.
for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
I != E; ++I) {
- // Print a label for the basic block.
- O << PrivateGlobalPrefix << "BB" << getFunctionNumber() << '_'
- << I->getNumber()
- << ":\t" << CommentString << I->getBasicBlock()->getName() << '\n';
+ printBasicBlockLabel(I);
+ O << '\n';
for (MachineBasicBlock::const_iterator II = I->begin(), E = I->end();
II != E; ++II) {
// Print the assembly for the instruction.
return false; // success
}
-void X86SharedAsmPrinter::printBasicBlockLabel(const MachineBasicBlock *MBB,
- bool printColon,
- bool printComment) const {
- O << PrivateGlobalPrefix << "BB"
- << Mang->getValueName(MBB->getParent()->getFunction()) << "_"
- << MBB->getNumber();
- if (printColon)
- O << ':';
- if (printComment)
- O << '\t' << CommentString << MBB->getBasicBlock()->getName();
-}
-
/// createX86CodePrinterPass - Returns a pass that prints the X86 assembly code
/// for a MachineFunction to the given output stream, using the given target
/// machine description.
MI->getOperand(Op+3).isGlobalAddress() ||
MI->getOperand(Op+3).isConstantPoolIndex());
}
-
- virtual void printBasicBlockLabel(const MachineBasicBlock *MBB,
- bool printColon = false,
- bool printComment = true) const;
};
} // end namespace llvm