[PATCH] D40836: [CodeGen] Unify printing API for MachineOperand between MIR and debug
Francis Visoiu Mistrih via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 5 06:12:07 PST 2017
thegameg created this revision.
Herald added a subscriber: JDevlieghere.
Work towards the unification of MIR and debug output by refactoring the interfaces.
For MachineOperand::print, keep a simple version that can be easily called from `dump()`, and a more complex one which will be called from both the MIRPrinter and MachineInstr::print.
Add extra checks inside MachineOperand for detached operands (operands with getParent() == nullptr).
https://reviews.llvm.org/D40836
Files:
include/llvm/CodeGen/MachineInstr.h
include/llvm/CodeGen/MachineOperand.h
include/llvm/CodeGen/TargetRegisterInfo.h
lib/CodeGen/MIRPrinter.cpp
lib/CodeGen/MachineInstr.cpp
lib/CodeGen/MachineOperand.cpp
lib/CodeGen/TargetRegisterInfo.cpp
unittests/CodeGen/MachineOperandTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40836.125514.patch
Type: text/x-patch
Size: 20697 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171205/ee0538f6/attachment.bin>
More information about the llvm-commits
mailing list