LLVM 20.0.0git
|
This class contains meta information specific to a module. More...
#include "llvm/CodeGen/MachineModuleInfo.h"
Public Member Functions | |
MachineModuleInfo (const TargetMachine *TM=nullptr) | |
MachineModuleInfo (const TargetMachine *TM, MCContext *ExtContext) | |
MachineModuleInfo (MachineModuleInfo &&MMII) | |
~MachineModuleInfo () | |
void | initialize () |
void | finalize () |
const TargetMachine & | getTarget () const |
const MCContext & | getContext () const |
MCContext & | getContext () |
const Module * | getModule () const |
MachineFunction & | getOrCreateMachineFunction (Function &F) |
Returns the MachineFunction constructed for the IR function F . | |
MachineFunction * | getMachineFunction (const Function &F) const |
Returns the MachineFunction associated to IR function F if there is one, otherwise nullptr. | |
void | deleteMachineFunctionFor (Function &F) |
Delete the MachineFunction MF and reset the link in the IR Function to Machine Function map. | |
void | insertFunction (const Function &F, std::unique_ptr< MachineFunction > &&MF) |
Add an externally created MachineFunction MF for F . | |
template<typename Ty > | |
Ty & | getObjFileInfo () |
Keep track of various per-module pieces of information for backends that would like to do so. | |
template<typename Ty > | |
const Ty & | getObjFileInfo () const |
Friends | |
class | MachineModuleInfoWrapperPass |
class | MachineModuleAnalysis |
This class contains meta information specific to a module.
Queries can be made by different debugging and exception handling schemes and reformated for specific use.
Definition at line 82 of file MachineModuleInfo.h.
|
explicit |
Definition at line 51 of file MachineModuleInfo.cpp.
References initialize(), and llvm::MCContext::setObjectFileInfo().
|
explicit |
Definition at line 59 of file MachineModuleInfo.cpp.
References initialize(), and llvm::MCContext::setObjectFileInfo().
MachineModuleInfo::MachineModuleInfo | ( | MachineModuleInfo && | MMII | ) |
Definition at line 40 of file MachineModuleInfo.cpp.
References llvm::TargetMachine::getObjFileLowering(), and llvm::MCContext::setObjectFileInfo().
MachineModuleInfo::~MachineModuleInfo | ( | ) |
Definition at line 69 of file MachineModuleInfo.cpp.
References finalize().
void MachineModuleInfo::deleteMachineFunctionFor | ( | Function & | F | ) |
Delete the MachineFunction MF
and reset the link in the IR Function to Machine Function map.
Definition at line 106 of file MachineModuleInfo.cpp.
References F.
void MachineModuleInfo::finalize | ( | ) |
Definition at line 32 of file MachineModuleInfo.cpp.
References llvm::MCContext::reset().
Referenced by llvm::MachineModuleInfoWrapperPass::doFinalization(), and ~MachineModuleInfo().
|
inline |
Definition at line 128 of file MachineModuleInfo.h.
Definition at line 125 of file MachineModuleInfo.h.
Referenced by llvm::DirectXTargetMachine::addPassesToEmitFile(), llvm::CodeGenTargetMachineImpl::addPassesToEmitFile(), llvm::CodeGenTargetMachineImpl::addPassesToEmitMC(), llvm::DebugHandlerBase::beginInstruction(), llvm::MachineModuleInfoWrapperPass::doInitialization(), llvm::X86AsmPrinter::emitEndOfAsmFile(), EmitInlineAsmStr(), llvm::LoongArchAsmPrinter::emitJumpTableInfo(), emitNonLazyStubs(), llvm::AVRAsmPrinter::emitStartOfAsmFile(), llvm::X86AsmPrinter::emitStartOfAsmFile(), llvm::DebugHandlerBase::endInstruction(), llvm::AsmPrinter::getCodeViewJumpTableInfo(), getOrCreateMachineFunction(), llvm::MachineModuleAnalysis::run(), and llvm::SPIRVTranslateModule().
MachineFunction * MachineModuleInfo::getMachineFunction | ( | const Function & | F | ) | const |
Returns the MachineFunction associated to IR function F
if there is one, otherwise nullptr.
NOTE: New pass manager clients shall not use this method to get the MachineFunction
, use MachineFunctionAnalysis
instead.
Definition at line 72 of file MachineModuleInfo.cpp.
Referenced by addDecorations(), addMBBNames(), collectReqs(), llvm::AArch64InstrInfo::getOutliningTypeImpl(), llvm::ARMBaseInstrInfo::getOutliningTypeImpl(), llvm::MIRParserImpl::parseMachineFunction(), and patchPhis().
Definition at line 132 of file MachineModuleInfo.h.
Referenced by llvm::AMDGPUMachineModuleInfo::AMDGPUMachineModuleInfo(), llvm::CodeViewDebug::beginFunctionImpl(), llvm::ThunkInserter< Derived, InsertedThunksTy >::createThunkFunction(), llvm::DwarfDebug::DwarfDebug(), llvm::WebAssemblyAsmPrinter::emitConstantPool(), llvm::AsmPrinter::emitFunctionBody(), llvm::CodeViewDebug::endFunctionImpl(), llvm::WinCFGuard::endModule(), llvm::WinException::endModule(), getAuthPtrSlotSymbolHelper(), llvm::AsmPrinter::getDataLayout(), llvm::TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel(), and llvm::MachineModuleInfoELF::MachineModuleInfoELF().
|
inline |
Keep track of various per-module pieces of information for backends that would like to do so.
Definition at line 156 of file MachineModuleInfo.h.
Referenced by llvm::AsmPrinter::doFinalization(), llvm::WebAssemblyAsmPrinter::emitDecls(), llvm::ARMAsmPrinter::emitEndOfAsmFile(), emitNonLazyStubs(), llvm::AArch64_ELFTargetObjectFile::emitPersonalityValueImpl(), llvm::AArch64_ELFTargetObjectFile::getAuthPtrSlotSymbol(), llvm::AArch64_MachoTargetObjectFile::getAuthPtrSlotSymbol(), llvm::TargetLoweringObjectFileMachO::getCFIPersonalitySymbol(), llvm::AArch64MCInstLower::GetGlobalValueSymbol(), llvm::TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel(), llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference(), and llvm::SparcELFTargetObjectFile::getTTypeGlobalReference().
|
inline |
Definition at line 163 of file MachineModuleInfo.h.
MachineFunction & MachineModuleInfo::getOrCreateMachineFunction | ( | Function & | F | ) |
Returns the MachineFunction constructed for the IR function F
.
Creates a new MachineFunction if none exists yet. NOTE: New pass manager clients shall not use this method to get the MachineFunction
, use MachineFunctionAnalysis
instead.
Definition at line 77 of file MachineModuleInfo.cpp.
References F, getContext(), llvm::TargetMachine::getSubtargetImpl(), I, llvm::MachineFunction::initTargetMachineFunctionInfo(), and llvm::TargetMachine::registerMachineRegisterInfoCallback().
Referenced by createFrameHelperMachineFunction(), llvm::ThunkInserter< Derived, InsertedThunksTy >::createThunkFunction(), and llvm::MIRParserImpl::parseMachineFunction().
|
inline |
Definition at line 123 of file MachineModuleInfo.h.
Referenced by llvm::AVRAsmPrinter::doFinalization(), EmitInlineAsmStr(), llvm::AVRAsmPrinter::emitStartOfAsmFile(), and llvm::MIRParserImpl::parseMachineFunction().
void MachineModuleInfo::initialize | ( | ) |
Definition at line 27 of file MachineModuleInfo.cpp.
Referenced by llvm::MachineModuleInfoWrapperPass::doInitialization(), and MachineModuleInfo().
void MachineModuleInfo::insertFunction | ( | const Function & | F, |
std::unique_ptr< MachineFunction > && | MF | ||
) |
Add an externally created MachineFunction MF
for F
.
Definition at line 112 of file MachineModuleInfo.cpp.
|
friend |
Definition at line 84 of file MachineModuleInfo.h.
|
friend |
Definition at line 83 of file MachineModuleInfo.h.