LLVM 20.0.0git
|
This class contains meta information specific to a module. More...
#include "llvm/CodeGen/MachineModuleInfo.h"
Public Member Functions | |
MachineModuleInfo (const LLVMTargetMachine *TM=nullptr) | |
MachineModuleInfo (const LLVMTargetMachine *TM, MCContext *ExtContext) | |
MachineModuleInfo (MachineModuleInfo &&MMII) | |
~MachineModuleInfo () | |
void | initialize () |
void | finalize () |
const LLVMTargetMachine & | 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(), llvm::MCContext::setObjectFileInfo(), and TM.
|
explicit |
Definition at line 59 of file MachineModuleInfo.cpp.
References initialize(), llvm::MCContext::setObjectFileInfo(), and TM.
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 129 of file MachineModuleInfo.h.
Definition at line 126 of file MachineModuleInfo.h.
Referenced by llvm::DirectXTargetMachine::addPassesToEmitFile(), llvm::LLVMTargetMachine::addPassesToEmitFile(), llvm::LLVMTargetMachine::addPassesToEmitMC(), llvm::DebugHandlerBase::beginInstruction(), llvm::MachineModuleInfoWrapperPass::doInitialization(), llvm::X86AsmPrinter::emitEndOfAsmFile(), EmitInlineAsmStr(), emitNonLazyStubs(), llvm::AVRAsmPrinter::emitStartOfAsmFile(), llvm::X86AsmPrinter::emitStartOfAsmFile(), llvm::DebugHandlerBase::endInstruction(), llvm::AsmPrinter::getCodeViewJumpTableInfo(), getOrCreateMachineFunction(), and llvm::MachineModuleAnalysis::run().
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(), collectReqs(), llvm::AArch64InstrInfo::getOutliningTypeImpl(), llvm::ARMBaseInstrInfo::getOutliningTypeImpl(), llvm::MIRParserImpl::parseMachineFunction(), and llvm::AMDGPUResourceUsageAnalysis::runOnModule().
Definition at line 133 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(), EmitInlineAsmStr(), llvm::CodeViewDebug::endFunctionImpl(), llvm::WinCFGuard::endModule(), llvm::WinException::endModule(), getAuthPtrSlotSymbolHelper(), llvm::AsmPrinter::getDataLayout(), and llvm::TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel().
|
inline |
Keep track of various per-module pieces of information for backends that would like to do so.
Definition at line 157 of file MachineModuleInfo.h.
Referenced by llvm::AsmPrinter::doFinalization(), llvm::WebAssemblyAsmPrinter::emitDecls(), llvm::ARMAsmPrinter::emitEndOfAsmFile(), emitNonLazyStubs(), 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 164 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::LLVMTargetMachine::registerMachineRegisterInfoCallback().
Referenced by createFrameHelperMachineFunction(), llvm::ThunkInserter< Derived, InsertedThunksTy >::createThunkFunction(), and llvm::MIRParserImpl::parseMachineFunction().
|
inline |
Definition at line 124 of file MachineModuleInfo.h.
References TM.
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.