Make AsmPrinter::emitImplicitDef a virtual method so targets can emit custom comments...
authorJustin Holewinski <jholewinski@nvidia.com>
Fri, 11 Oct 2013 12:39:36 +0000 (12:39 +0000)
committerJustin Holewinski <jholewinski@nvidia.com>
Fri, 11 Oct 2013 12:39:36 +0000 (12:39 +0000)
commit43777c3150c1dd12c661f62d5d7c95bf9b04c16a
treef9e93da9fdd9d405be3d996b5d5fde342a85c0e9
parent4fc2774b438c6c09f487362e53d5ac1a84edea73
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
include/llvm/CodeGen/AsmPrinter.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/Target/NVPTX/NVPTXAsmPrinter.cpp
lib/Target/NVPTX/NVPTXAsmPrinter.h
test/CodeGen/NVPTX/implicit-def.ll [new file with mode: 0644]