|
LLVM
4.0.0
|
This class prints out the machine functions using the MIR serialization format. More...
Public Member Functions | |
| MIRPrinter (raw_ostream &OS) | |
| void | print (const MachineFunction &MF) |
| void | convert (yaml::MachineFunction &MF, const MachineRegisterInfo &RegInfo, const TargetRegisterInfo *TRI) |
| void | convert (ModuleSlotTracker &MST, yaml::MachineFrameInfo &YamlMFI, const MachineFrameInfo &MFI) |
| void | convert (yaml::MachineFunction &MF, const MachineConstantPool &ConstantPool) |
| void | convert (ModuleSlotTracker &MST, yaml::MachineJumpTable &YamlJTI, const MachineJumpTableInfo &JTI) |
| void | convertStackObjects (yaml::MachineFunction &YMF, const MachineFunction &MF, ModuleSlotTracker &MST) |
This class prints out the machine functions using the MIR serialization format.
Definition at line 73 of file MIRPrinter.cpp.
|
inline |
Definition at line 81 of file MIRPrinter.cpp.
| void MIRPrinter::convert | ( | yaml::MachineFunction & | MF, |
| const MachineRegisterInfo & | RegInfo, | ||
| const TargetRegisterInfo * | TRI | ||
| ) |
Definition at line 208 of file MIRPrinter.cpp.
References assert(), llvm::yaml::MachineFunction::CalleeSavedRegisters, llvm::yaml::VirtualRegisterDefinition::Class, llvm::MachineRegisterInfo::def_empty(), E, llvm::RegisterBank::getName(), llvm::MachineRegisterInfo::getNumVirtRegs(), llvm::MachineRegisterInfo::getRegBankOrNull(), llvm::MachineRegisterInfo::getRegClass(), llvm::TargetRegisterInfo::getRegClassName(), llvm::MachineRegisterInfo::getRegClassOrNull(), llvm::MachineRegisterInfo::getSimpleHint(), llvm::MachineRegisterInfo::getType(), llvm::MachineRegisterInfo::getUsedPhysRegsMask(), I, llvm::yaml::VirtualRegisterDefinition::ID, llvm::TargetRegisterInfo::index2VirtReg(), llvm::LLT::isValid(), llvm::MachineRegisterInfo::livein_begin(), llvm::MachineRegisterInfo::livein_end(), llvm::yaml::MachineFunction::LiveIns, llvm::StringRef::lower(), llvm::BitVector::none(), llvm::yaml::VirtualRegisterDefinition::PreferredRegister, printReg(), llvm::yaml::MachineFunctionLiveIn::Register, llvm::BitVector::size(), llvm::MachineRegisterInfo::tracksLiveness(), llvm::yaml::MachineFunction::TracksRegLiveness, llvm::yaml::MachineFunctionLiveIn::VirtualRegister, and llvm::yaml::MachineFunction::VirtualRegisters.
Referenced by print().
| void MIRPrinter::convert | ( | ModuleSlotTracker & | MST, |
| yaml::MachineFrameInfo & | YamlMFI, | ||
| const MachineFrameInfo & | MFI | ||
| ) |
Definition at line 258 of file MIRPrinter.cpp.
References llvm::yaml::MachineFrameInfo::AdjustsStack, llvm::MachineFrameInfo::adjustsStack(), llvm::MachineFrameInfo::getMaxAlignment(), llvm::MachineFrameInfo::getMaxCallFrameSize(), llvm::MachineFrameInfo::getOffsetAdjustment(), llvm::MachineFrameInfo::getRestorePoint(), llvm::MachineFrameInfo::getSavePoint(), llvm::MachineFrameInfo::getStackSize(), llvm::yaml::MachineFrameInfo::HasCalls, llvm::MachineFrameInfo::hasCalls(), llvm::yaml::MachineFrameInfo::HasMustTailInVarArgFunc, llvm::MachineFrameInfo::hasMustTailInVarArgFunc(), llvm::yaml::MachineFrameInfo::HasOpaqueSPAdjustment, llvm::MachineFrameInfo::hasOpaqueSPAdjustment(), llvm::MachineFrameInfo::hasPatchPoint(), llvm::yaml::MachineFrameInfo::HasPatchPoint, llvm::MachineFrameInfo::hasStackMap(), llvm::yaml::MachineFrameInfo::HasStackMap, llvm::yaml::MachineFrameInfo::HasVAStart, llvm::MachineFrameInfo::hasVAStart(), llvm::MachineFrameInfo::isFrameAddressTaken(), llvm::yaml::MachineFrameInfo::IsFrameAddressTaken, llvm::MachineFrameInfo::isReturnAddressTaken(), llvm::yaml::MachineFrameInfo::IsReturnAddressTaken, llvm::yaml::MachineFrameInfo::MaxAlignment, llvm::yaml::MachineFrameInfo::MaxCallFrameSize, llvm::yaml::MachineFrameInfo::OffsetAdjustment, llvm::MIPrinter::printMBBReference(), llvm::yaml::MachineFrameInfo::RestorePoint, llvm::yaml::MachineFrameInfo::SavePoint, llvm::yaml::MachineFrameInfo::StackSize, and llvm::yaml::StringValue::Value.
| void MIRPrinter::convert | ( | yaml::MachineFunction & | MF, |
| const MachineConstantPool & | ConstantPool | ||
| ) |
Definition at line 391 of file MIRPrinter.cpp.
References llvm::yaml::MachineConstantPoolValue::Alignment, llvm::yaml::MachineFunction::Constants, llvm::MachineConstantPool::getConstants(), llvm::yaml::MachineConstantPoolValue::ID, llvm_unreachable, llvm::Value::printAsOperand(), llvm::raw_string_ostream::str(), and llvm::yaml::MachineConstantPoolValue::Value.
| void MIRPrinter::convert | ( | ModuleSlotTracker & | MST, |
| yaml::MachineJumpTable & | YamlJTI, | ||
| const MachineJumpTableInfo & | JTI | ||
| ) |
Definition at line 410 of file MIRPrinter.cpp.
References llvm::yaml::MachineJumpTable::Entry::Blocks, llvm::yaml::MachineJumpTable::Entries, llvm::MachineJumpTableInfo::getEntryKind(), llvm::MachineJumpTableInfo::getJumpTables(), llvm::yaml::MachineJumpTable::Entry::ID, llvm::yaml::MachineJumpTable::Kind, MBB, llvm::MIPrinter::printMBBReference(), and llvm::raw_string_ostream::str().
| void MIRPrinter::convertStackObjects | ( | yaml::MachineFunction & | YMF, |
| const MachineFunction & | MF, | ||
| ModuleSlotTracker & | MST | ||
| ) |
Definition at line 286 of file MIRPrinter.cpp.
References llvm::yaml::MachineStackObject::Alignment, llvm::yaml::FixedMachineStackObject::Alignment, assert(), llvm::yaml::MachineStackObject::DefaultType, llvm::yaml::FixedMachineStackObject::DefaultType, E, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::yaml::MachineFunction::FixedStackObjects, llvm::yaml::MachineFunction::FrameInfo, llvm::MachineFrameInfo::getCalleeSavedInfo(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFrameInfo::getLocalFrameObjectCount(), llvm::MachineFrameInfo::getLocalFrameObjectMap(), llvm::MachineFrameInfo::getObjectAlignment(), llvm::MachineFrameInfo::getObjectAllocation(), llvm::MachineFrameInfo::getObjectIndexBegin(), llvm::MachineFrameInfo::getObjectIndexEnd(), llvm::MachineFrameInfo::getObjectOffset(), llvm::MachineFrameInfo::getObjectSize(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFrameInfo::getStackProtectorIndex(), llvm::MachineFunction::getSubtarget(), llvm::MachineFunction::getVariableDbgInfo(), llvm::MachineFrameInfo::hasStackProtectorIndex(), I, llvm::yaml::MachineStackObject::ID, llvm::yaml::FixedMachineStackObject::ID, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::yaml::FixedMachineStackObject::IsAliased, llvm::MachineFrameInfo::isAliasedObjectIndex(), llvm::MachineFrameInfo::isDeadObjectIndex(), llvm::yaml::FixedMachineStackObject::IsImmutable, llvm::MachineFrameInfo::isImmutableObjectIndex(), llvm::MachineFrameInfo::isSpillSlotObjectIndex(), llvm::MachineFrameInfo::isVariableSizedObjectIndex(), llvm::yaml::MachineStackObject::Name, llvm::yaml::MachineStackObject::Offset, llvm::yaml::FixedMachineStackObject::Offset, printReg(), llvm::MIPrinter::printStackObjectReference(), llvm::yaml::MachineStackObject::Size, llvm::yaml::FixedMachineStackObject::Size, llvm::yaml::MachineStackObject::SpillSlot, llvm::yaml::FixedMachineStackObject::SpillSlot, llvm::yaml::MachineFunction::StackObjects, llvm::yaml::MachineFrameInfo::StackProtector, llvm::yaml::MachineStackObject::Type, llvm::yaml::FixedMachineStackObject::Type, llvm::yaml::StringValue::Value, and llvm::yaml::MachineStackObject::VariableSized.
Referenced by print().
| void MIRPrinter::print | ( | const MachineFunction & | MF | ) |
Definition at line 170 of file MIRPrinter.cpp.
References llvm::yaml::MachineFunction::Alignment, llvm::yaml::MachineFunction::Body, convert(), convertStackObjects(), llvm::yaml::MachineFunction::ExposesReturnsTwice, llvm::MachineFunction::exposesReturnsTwice(), llvm::raw_ostream::flush(), llvm::yaml::MachineFunction::FrameInfo, llvm::MachineFunction::getAlignment(), llvm::MachineFunction::getConstantPool(), llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getJumpTableInfo(), llvm::MachineFunction::getName(), llvm::GlobalValue::getParent(), llvm::MachineFunction::getProperties(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), llvm::MachineFunctionProperties::hasProperty(), llvm::ModuleSlotTracker::incorporateFunction(), llvm::yaml::MachineFunction::JumpTableInfo, llvm::MachineFunctionProperties::Legalized, llvm::yaml::MachineFunction::Legalized, MBB, llvm::yaml::MachineFunction::Name, llvm::MIPrinter::print(), llvm::MachineFunctionProperties::RegBankSelected, llvm::yaml::MachineFunction::RegBankSelected, llvm::MachineFunctionProperties::Selected, llvm::yaml::MachineFunction::Selected, llvm::yaml::StringValue::Value, and llvm::yaml::BlockStringValue::Value.
Referenced by llvm::printMIR().
1.8.6