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