This is an archive of the discontinued LLVM Phabricator instance.

Use TargetRegisterInfo for printing MachineOperand register comments
ClosedPublic

Authored by sunfish on Nov 16 2015, 8:55 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

sunfish updated this revision to Diff 40295.Nov 16 2015, 8:55 AM
sunfish retitled this revision from to Use TargetRegisterInfo for printing MachineOperand register comments.
sunfish updated this object.
sunfish added a reviewer: echristo.
sunfish set the repository for this revision to rL LLVM.
sunfish added a subscriber: llvm-commits.
echristo accepted this revision.Nov 16 2015, 9:27 AM
echristo edited edge metadata.

Looks obvious. Thanks!

-eric

This revision is now accepted and ready to land.Nov 16 2015, 9:27 AM
This revision was automatically updated to reflect the committed changes.