[llvm-commits] [llvm] r140698 - in /llvm/trunk/lib/Target/PTX: PTXAsmPrinter.cpp PTXAsmPrinter.h
Justin Holewinski
justin.holewinski at gmail.com
Wed Sep 28 07:32:06 PDT 2011
Author: jholewinski
Date: Wed Sep 28 09:32:06 2011
New Revision: 140698
URL: http://llvm.org/viewvc/llvm-project?rev=140698&view=rev
Log:
PTX: MC-ize the PTX backend (patch 2 of N)
Get rid of some of the no-longer-needed parts of PTXAsmPrinter.
Modified:
llvm/trunk/lib/Target/PTX/PTXAsmPrinter.cpp
llvm/trunk/lib/Target/PTX/PTXAsmPrinter.h
Modified: llvm/trunk/lib/Target/PTX/PTXAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXAsmPrinter.cpp?rev=140698&r1=140697&r2=140698&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PTX/PTXAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/PTX/PTXAsmPrinter.cpp Wed Sep 28 09:32:06 2011
@@ -136,6 +136,7 @@
{
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 @@
EmitVariableDeclaration(i);
}
-bool PTXAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
- SetupMachineFunction(MF);
- EmitFunctionDeclaration();
- EmitFunctionBody();
- return false;
-}
-
void PTXAsmPrinter::EmitFunctionBodyStart() {
OutStreamer.EmitRawText(Twine("{"));
@@ -534,7 +528,7 @@
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()) {
Modified: llvm/trunk/lib/Target/PTX/PTXAsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PTX/PTXAsmPrinter.h?rev=140698&r1=140697&r2=140698&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PTX/PTXAsmPrinter.h (original)
+++ llvm/trunk/lib/Target/PTX/PTXAsmPrinter.h Wed Sep 28 09:32:06 2011
@@ -34,12 +34,9 @@
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);
More information about the llvm-commits
mailing list