Use TargetRegisterInfo for printing MachineOperand register comments
authorDan Gohman <dan433584@gmail.com>
Tue, 17 Nov 2015 16:01:28 +0000 (16:01 +0000)
committerDan Gohman <dan433584@gmail.com>
Tue, 17 Nov 2015 16:01:28 +0000 (16:01 +0000)
commit7673d242f73b19a7f5f011c9a1679f46ddf8de2a
tree10b353df040480984e95b056ef990ccda1c8f720
parent08e6ab9d252aa0140800f45672bb2c8c57fb3ade
Use TargetRegisterInfo for printing MachineOperand register comments

Several places in AsmPrinter.cpp print comments describing MachineOperand
registers using MCRegisterInfo, which uses MCOperand-oriented names. This
doesn't work for targets that use virtual registers exclusively, as
WebAssembly does, since virtual registers are represented and printed
differently.

This patch preserves what seems to be the spirit of r229978, avoiding the
use of TM.getSubtargetImpl(), while still using MachineOperand-oriented
printing for MachineOperands.

Differential Revision: http://reviews.llvm.org/D14709

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253338 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
test/CodeGen/AMDGPU/llvm.dbg.value.ll
test/CodeGen/ARM/debug-info-arg.ll
test/CodeGen/ARM/debug-info-blocks.ll
test/CodeGen/ARM/debug-info-branch-folding.ll
test/CodeGen/BPF/sockex2.ll
test/CodeGen/Mips/llvm-ir/call.ll
test/CodeGen/X86/2010-05-28-Crash.ll
test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll