diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2017-12-13 10:30:45 +0000 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2017-12-13 10:30:45 +0000 |
commit | 26ae8a6582c8c420b222e5b672c6845e182340f5 (patch) | |
tree | a2c146ace61de186baec22106525bfffb3732769 /llvm/lib/CodeGen/MIRPrinter.cpp | |
parent | fead6ae660ac5f4548250f972ccbd905a038132a (diff) | |
download | bcm5719-llvm-26ae8a6582c8c420b222e5b672c6845e182340f5.tar.gz bcm5719-llvm-26ae8a6582c8c420b222e5b672c6845e182340f5.zip |
[CodeGen] Print constant pool index operands as %const.0 + 8 in both MIR and debug output
Work towards the unification of MIR and debug output by printing
`%const.0 + 8` instead of `<cp#0+8>` and `%const.0 - 8` instead of
`<cp#0-8>`.
Only debug syntax is affected.
Differential Revision: https://reviews.llvm.org/D41116
llvm-svn: 320564
Diffstat (limited to 'llvm/lib/CodeGen/MIRPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MIRPrinter.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp index ccec5b4348d..f4f248e6053 100644 --- a/llvm/lib/CodeGen/MIRPrinter.cpp +++ b/llvm/lib/CodeGen/MIRPrinter.cpp @@ -862,7 +862,8 @@ void MIPrinter::print(const MachineInstr &MI, unsigned OpIdx, LLVM_FALLTHROUGH; case MachineOperand::MO_Register: case MachineOperand::MO_CImmediate: - case MachineOperand::MO_MachineBasicBlock: { + case MachineOperand::MO_MachineBasicBlock: + case MachineOperand::MO_ConstantPoolIndex: { unsigned TiedOperandIdx = 0; if (ShouldPrintRegisterTies && Op.isReg() && Op.isTied() && !Op.isDef()) TiedOperandIdx = Op.getParent()->findTiedOperandIdx(OpIdx); @@ -877,10 +878,6 @@ void MIPrinter::print(const MachineInstr &MI, unsigned OpIdx, case MachineOperand::MO_FrameIndex: printStackObjectReference(Op.getIndex()); break; - case MachineOperand::MO_ConstantPoolIndex: - OS << "%const." << Op.getIndex(); - printOffset(Op.getOffset()); - break; case MachineOperand::MO_TargetIndex: OS << "target-index("; if (const auto *Name = |