LLVM 20.0.0git
|
This class prints out the machine instructions using the MIR serialization format. More...
Public Member Functions | |
MIPrinter (raw_ostream &OS, ModuleSlotTracker &MST, const DenseMap< const uint32_t *, unsigned > &RegisterMaskIds, const DenseMap< int, FrameIndexOperand > &StackObjectOperandMapping) | |
void | print (const MachineBasicBlock &MBB) |
void | print (const MachineInstr &MI) |
void | printStackObjectReference (int FrameIndex) |
void | print (const MachineInstr &MI, unsigned OpIdx, const TargetRegisterInfo *TRI, const TargetInstrInfo *TII, bool ShouldPrintRegisterTies, LLT TypeToPrint, bool PrintDef=true) |
This class prints out the machine instructions using the MIR serialization format.
Definition at line 143 of file MIRPrinter.cpp.
|
inline |
Definition at line 155 of file MIRPrinter.cpp.
References OS.
void MIPrinter::print | ( | const MachineBasicBlock & | MBB | ) |
Definition at line 703 of file MIRPrinter.cpp.
References assert(), llvm::MachineInstr::BundledSucc, llvm::MachineBasicBlock::empty(), llvm::First, llvm::format(), llvm::MachineBasicBlock::getNumber(), llvm::BranchProbability::getNumerator(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getRegInfo(), llvm::MachineBasicBlock::getSuccProbability(), I, llvm::raw_ostream::indent(), llvm::MachineBasicBlock::instrs(), llvm::MachineBasicBlock::livein_empty(), llvm::MachineBasicBlock::liveins_dbg(), MBB, MI, MRI, print(), llvm::PrintLaneMask(), llvm::printMBBReference(), llvm::MachineBasicBlock::printName(), llvm::MachineBasicBlock::PrintNameAttributes, llvm::MachineBasicBlock::PrintNameIr, llvm::printReg(), SimplifyMIR, llvm::MachineBasicBlock::succ_begin(), llvm::MachineBasicBlock::succ_empty(), llvm::MachineBasicBlock::succ_end(), and TRI.
Referenced by print(), and llvm::MIRPrinter::print().
void MIPrinter::print | ( | const MachineInstr & | MI | ) |
Definition at line 776 of file MIRPrinter.cpp.
References assert(), llvm::MachineInstr::Disjoint, DL, llvm::MachineInstr::FmAfn, llvm::MachineInstr::FmArcp, llvm::MachineInstr::FmContract, llvm::MachineInstr::FmNoInfs, llvm::MachineInstr::FmNoNans, llvm::MachineInstr::FmNsz, llvm::MachineInstr::FmReassoc, llvm::MachineInstr::FrameDestroy, llvm::MachineInstr::FrameSetup, llvm::Function::getContext(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getSubtarget(), I, llvm::MachineInstr::IsExact, isReg(), MI, MRI, llvm::MachineInstr::NoConvergent, llvm::MachineInstr::NoFPExcept, llvm::MachineInstr::NoMerge, llvm::MachineInstr::NonNeg, llvm::MachineInstr::NoSWrap, llvm::MachineInstr::NoUSWrap, llvm::MachineInstr::NoUWrap, print(), llvm::DWARFExpression::Operation::print(), llvm::MachineBasicBlock::printAsOperand(), PrintLocations, llvm::MachineOperand::printSymbol(), llvm::MachineInstr::SameSign, TII, TRI, and llvm::MachineInstr::Unpredictable.
void MIPrinter::print | ( | const MachineInstr & | MI, |
unsigned | OpIdx, | ||
const TargetRegisterInfo * | TRI, | ||
const TargetInstrInfo * | TII, | ||
bool | ShouldPrintRegisterTies, | ||
LLT | TypeToPrint, | ||
bool | PrintDef = true |
||
) |
Definition at line 945 of file MIRPrinter.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), formatOperandComment(), llvm::StringRef::lower(), MI, llvm::MachineOperand::MO_BlockAddress, llvm::MachineOperand::MO_CFIIndex, llvm::MachineOperand::MO_CImmediate, llvm::MachineOperand::MO_ConstantPoolIndex, llvm::MachineOperand::MO_DbgInstrRef, llvm::MachineOperand::MO_ExternalSymbol, llvm::MachineOperand::MO_FPImmediate, llvm::MachineOperand::MO_FrameIndex, llvm::MachineOperand::MO_GlobalAddress, llvm::MachineOperand::MO_Immediate, llvm::MachineOperand::MO_IntrinsicID, llvm::MachineOperand::MO_JumpTableIndex, llvm::MachineOperand::MO_MachineBasicBlock, llvm::MachineOperand::MO_MCSymbol, llvm::MachineOperand::MO_Metadata, llvm::MachineOperand::MO_Predicate, llvm::MachineOperand::MO_Register, llvm::MachineOperand::MO_RegisterLiveOut, llvm::MachineOperand::MO_RegisterMask, llvm::MachineOperand::MO_ShuffleMask, llvm::MachineOperand::MO_TargetIndex, llvm::DWARFExpression::Operation::print(), printCustomRegMask(), printStackObjectReference(), llvm::MachineOperand::printSubRegIdx(), llvm::MachineOperand::printTargetFlags(), TII, and TRI.
void MIPrinter::printStackObjectReference | ( | int | FrameIndex | ) |
Definition at line 930 of file MIRPrinter.cpp.
References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), and llvm::MachineOperand::printStackObjectReference().
Referenced by llvm::MIRPrinter::convertStackObjects(), and print().