diff options
| author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2017-12-19 21:47:10 +0000 |
|---|---|---|
| committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2017-12-19 21:47:10 +0000 |
| commit | cb2683d46a5287b29b2494348f1921f7caed5c68 (patch) | |
| tree | 94e740724fa69bc0558b47a652c6afd7d92f61c4 /llvm/lib/CodeGen | |
| parent | bbd610ae925b3d21babc5d41e184cd4a93d172fd (diff) | |
| download | bcm5719-llvm-cb2683d46a5287b29b2494348f1921f7caed5c68.tar.gz bcm5719-llvm-cb2683d46a5287b29b2494348f1921f7caed5c68.zip | |
[CodeGen] Move printing MO_IntrinsicID operands to MachineOperand::print
Work towards the unification of MIR and debug output by refactoring the
interfaces.
llvm-svn: 321112
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/MIRPrinter.cpp | 9 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/MachineOperand.cpp | 4 |
2 files changed, 4 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp index 9b38b893973..6b9da344166 100644 --- a/llvm/lib/CodeGen/MIRPrinter.cpp +++ b/llvm/lib/CodeGen/MIRPrinter.cpp @@ -785,7 +785,8 @@ void MIPrinter::print(const MachineInstr &MI, unsigned OpIdx, case MachineOperand::MO_Metadata: case MachineOperand::MO_MCSymbol: case MachineOperand::MO_CFIIndex: - case MachineOperand::MO_IntrinsicID: { + case MachineOperand::MO_IntrinsicID: + case MachineOperand::MO_Predicate: { unsigned TiedOperandIdx = 0; if (ShouldPrintRegisterTies && Op.isReg() && Op.isTied() && !Op.isDef()) TiedOperandIdx = Op.getParent()->findTiedOperandIdx(OpIdx); @@ -814,12 +815,6 @@ void MIPrinter::print(const MachineInstr &MI, unsigned OpIdx, printCustomRegMask(Op.getRegMask(), OS, TRI); break; } - case MachineOperand::MO_Predicate: { - auto Pred = static_cast<CmpInst::Predicate>(Op.getPredicate()); - OS << (CmpInst::isIntPredicate(Pred) ? "int" : "float") << "pred(" - << CmpInst::getPredicateName(Pred) << ')'; - break; - } } } diff --git a/llvm/lib/CodeGen/MachineOperand.cpp b/llvm/lib/CodeGen/MachineOperand.cpp index 586e826be58..fee99c91bbe 100644 --- a/llvm/lib/CodeGen/MachineOperand.cpp +++ b/llvm/lib/CodeGen/MachineOperand.cpp @@ -807,8 +807,8 @@ void MachineOperand::print(raw_ostream &OS, ModuleSlotTracker &MST, } case MachineOperand::MO_Predicate: { auto Pred = static_cast<CmpInst::Predicate>(getPredicate()); - OS << '<' << (CmpInst::isIntPredicate(Pred) ? "intpred" : "floatpred") - << CmpInst::getPredicateName(Pred) << '>'; + OS << (CmpInst::isIntPredicate(Pred) ? "int" : "float") << "pred(" + << CmpInst::getPredicateName(Pred) << ')'; break; } } |

