[llvm] r320141 - [CodeGen] Move printing MO_MachineBasicBlock operands to MachineOperand::print
Francis Visoiu Mistrih via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 8 03:48:02 PST 2017
Author: thegameg
Date: Fri Dec 8 03:48:02 2017
New Revision: 320141
URL: http://llvm.org/viewvc/llvm-project?rev=320141&view=rev
Log:
[CodeGen] Move printing MO_MachineBasicBlock operands to MachineOperand::print
Work towards the unification of MIR and debug output by refactoring the
interfaces.
Modified:
llvm/trunk/lib/CodeGen/MIRPrinter.cpp
Modified: llvm/trunk/lib/CodeGen/MIRPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MIRPrinter.cpp?rev=320141&r1=320140&r2=320141&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MIRPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/MIRPrinter.cpp Fri Dec 8 03:48:02 2017
@@ -855,7 +855,8 @@ void MIPrinter::print(const MachineInstr
printTargetFlags(Op);
switch (Op.getType()) {
case MachineOperand::MO_Register:
- case MachineOperand::MO_CImmediate: {
+ case MachineOperand::MO_CImmediate:
+ case MachineOperand::MO_MachineBasicBlock: {
unsigned TiedOperandIdx = 0;
if (ShouldPrintRegisterTies && Op.isTied() && !Op.isDef())
TiedOperandIdx = Op.getParent()->findTiedOperandIdx(OpIdx);
@@ -873,9 +874,6 @@ void MIPrinter::print(const MachineInstr
case MachineOperand::MO_FPImmediate:
Op.getFPImm()->printAsOperand(OS, /*PrintType=*/true, MST);
break;
- case MachineOperand::MO_MachineBasicBlock:
- OS << printMBBReference(*Op.getMBB());
- break;
case MachineOperand::MO_FrameIndex:
printStackObjectReference(Op.getIndex());
break;
More information about the llvm-commits
mailing list