}
};
+} // end anonymous namespace
+
+namespace llvm {
+
/// This class prints out the machine functions using the MIR serialization
/// format.
class MIRPrinter {
void initRegisterMaskIds(const MachineFunction &MF);
};
+} // end namespace llvm
+
+namespace {
+
/// This class prints out the machine instructions using the MIR serialization
/// format.
class MIPrinter {
.printMBBReference(*SuccMBB);
YamlMBB.Successors.push_back(StrOS.str());
}
+ if (MBB.hasSuccessorWeights()) {
+ for (auto I = MBB.succ_begin(), E = MBB.succ_end(); I != E; ++I)
+ YamlMBB.SuccessorWeights.push_back(
+ yaml::UnsignedValue(MBB.getSuccWeight(I)));
+ }
// Print the live in registers.
const auto *TRI = MBB.getParent()->getSubtarget().getRegisterInfo();
assert(TRI && "Expected target register info");
case MachineOperand::MO_Immediate:
OS << Op.getImm();
break;
+ case MachineOperand::MO_FPImmediate:
+ Op.getFPImm()->printAsOperand(OS, /*PrintType=*/true, MST);
+ break;
case MachineOperand::MO_MachineBasicBlock:
printMBBReference(*Op.getMBB());
break;