summaryrefslogtreecommitdiff
path: root/lib/Target/NVPTX/NVPTXAsmPrinter.h
diff options
context:
space:
mode:
authorJustin Holewinski <jholewinski@nvidia.com>2013-10-11 12:39:36 +0000
committerJustin Holewinski <jholewinski@nvidia.com>2013-10-11 12:39:36 +0000
commit43777c3150c1dd12c661f62d5d7c95bf9b04c16a (patch)
treef9e93da9fdd9d405be3d996b5d5fde342a85c0e9 /lib/Target/NVPTX/NVPTXAsmPrinter.h
parent4fc2774b438c6c09f487362e53d5ac1a84edea73 (diff)
downloadllvm-43777c3150c1dd12c661f62d5d7c95bf9b04c16a.tar.gz
llvm-43777c3150c1dd12c661f62d5d7c95bf9b04c16a.tar.bz2
llvm-43777c3150c1dd12c661f62d5d7c95bf9b04c16a.tar.xz
Make AsmPrinter::emitImplicitDef a virtual method so targets can emit custom comments for implicit defs
For NVPTX, this fixes a crash where the emitImplicitDef implementation was expecting physical registers, while NVPTX uses virtual registers (with a couple of exceptions). Now, the implicit def comment will be emitted as a true PTX register name. Other targets can use this to customize the output of implicit def comments. Fixes PR17519 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192444 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/NVPTX/NVPTXAsmPrinter.h')
-rw-r--r--lib/Target/NVPTX/NVPTXAsmPrinter.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/NVPTX/NVPTXAsmPrinter.h b/lib/Target/NVPTX/NVPTXAsmPrinter.h
index 06ea102827..df49d54da0 100644
--- a/lib/Target/NVPTX/NVPTXAsmPrinter.h
+++ b/lib/Target/NVPTX/NVPTXAsmPrinter.h
@@ -188,6 +188,7 @@ private:
void EmitFunctionEntryLabel();
void EmitFunctionBodyStart();
void EmitFunctionBodyEnd();
+ void emitImplicitDef(const MachineInstr *MI) const;
void EmitInstruction(const MachineInstr *);
void lowerToMCInst(const MachineInstr *MI, MCInst &OutMI);
@@ -213,7 +214,7 @@ private:
void emitGlobals(const Module &M);
void emitHeader(Module &M, raw_ostream &O);
void emitKernelFunctionDirectives(const Function &F, raw_ostream &O) const;
- void emitVirtualRegister(unsigned int vr, bool isVec, raw_ostream &O);
+ void emitVirtualRegister(unsigned int vr, raw_ostream &);
void emitFunctionExternParamList(const MachineFunction &MF);
void emitFunctionParamList(const Function *, raw_ostream &O);
void emitFunctionParamList(const MachineFunction &MF, raw_ostream &O);
@@ -294,7 +295,7 @@ public:
bool ignoreLoc(const MachineInstr &);
- virtual void getVirtualRegisterName(unsigned, bool, raw_ostream &);
+ std::string getVirtualRegisterName(unsigned) const;
DebugLoc prevDebugLoc;
void emitLineNumberAsDotLoc(const MachineInstr &);