mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
PTX: MC-ize the PTX backend (patch 2 of N)
Get rid of some of the no-longer-needed parts of PTXAsmPrinter. llvm-svn: 140698
This commit is contained in:
parent
2f96de340f
commit
a68272b38f
@ -136,6 +136,7 @@ void PTXAsmPrinter::EmitStartOfAsmFile(Module &M)
|
||||
{
|
||||
const PTXSubtarget& ST = TM.getSubtarget<PTXSubtarget>();
|
||||
|
||||
// Emit the PTX .version and .target attributes
|
||||
OutStreamer.EmitRawText(Twine("\t.version " + ST.getPTXVersionString()));
|
||||
OutStreamer.EmitRawText(Twine("\t.target " + ST.getTargetString() +
|
||||
(ST.supportsDouble() ? ""
|
||||
@ -169,13 +170,6 @@ void PTXAsmPrinter::EmitStartOfAsmFile(Module &M)
|
||||
EmitVariableDeclaration(i);
|
||||
}
|
||||
|
||||
bool PTXAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
SetupMachineFunction(MF);
|
||||
EmitFunctionDeclaration();
|
||||
EmitFunctionBody();
|
||||
return false;
|
||||
}
|
||||
|
||||
void PTXAsmPrinter::EmitFunctionBodyStart() {
|
||||
OutStreamer.EmitRawText(Twine("{"));
|
||||
|
||||
@ -534,7 +528,7 @@ void PTXAsmPrinter::EmitVariableDeclaration(const GlobalVariable *gv) {
|
||||
OutStreamer.AddBlankLine();
|
||||
}
|
||||
|
||||
void PTXAsmPrinter::EmitFunctionDeclaration() {
|
||||
void PTXAsmPrinter::EmitFunctionEntryLabel() {
|
||||
// The function label could have already been emitted if two symbols end up
|
||||
// conflicting due to asm renaming. Detect this and emit an error.
|
||||
if (!CurrentFnSym->isUndefined()) {
|
||||
|
@ -34,12 +34,9 @@ public:
|
||||
bool doFinalization(Module &M);
|
||||
|
||||
virtual void EmitStartOfAsmFile(Module &M);
|
||||
|
||||
virtual bool runOnMachineFunction(MachineFunction &MF);
|
||||
|
||||
virtual void EmitFunctionBodyStart();
|
||||
virtual void EmitFunctionBodyEnd();
|
||||
|
||||
virtual void EmitFunctionEntryLabel();
|
||||
virtual void EmitInstruction(const MachineInstr *MI);
|
||||
|
||||
void printOperand(const MachineInstr *MI, int opNum, raw_ostream &OS);
|
||||
|
Loading…
x
Reference in New Issue
Block a user