|
LLVM 24.0.0git
|
This class contains meta information specific to a module. More...
#include "llvm/CodeGen/MachineModuleInfo.h"
Public Member Functions | |
| LLVM_ABI | MachineModuleInfo (const TargetMachine *TM=nullptr) |
| LLVM_ABI | MachineModuleInfo (const TargetMachine *TM, MCContext *ExtContext) |
| LLVM_ABI | MachineModuleInfo (MachineModuleInfo &&MMII) |
| LLVM_ABI | ~MachineModuleInfo () |
| LLVM_ABI void | initialize () |
| LLVM_ABI void | finalize () |
| const TargetMachine & | getTarget () const |
| const MCContext & | getContext () const |
| MCContext & | getContext () |
| const Module * | getModule () const |
| LLVM_ABI MachineFunction & | getOrCreateMachineFunction (Function &F) |
Returns the MachineFunction constructed for the IR function F. | |
| LLVM_ABI MachineFunction * | getMachineFunction (const Function &F) const |
Returns the MachineFunction associated to IR function F if there is one, otherwise nullptr. | |
| void | groupMachineFunctionsForDeletion (const Function &F1, const Function &F2) |
| Group two IR functions so their MachineFunctions are deleted together once both functions have been finalized. | |
| LLVM_ABI void | deleteMachineFunctionFor (Function &F) |
Delete the MachineFunction MF and reset the link in the IR Function to Machine Function map. | |
| LLVM_ABI 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 85 of file MachineModuleInfo.h.
|
explicit |
Definition at line 51 of file MachineModuleInfo.cpp.
References initialize().
Referenced by getObjFileInfo(), MachineModuleAnalysis, and MachineModuleInfo().
|
explicit |
Definition at line 59 of file MachineModuleInfo.cpp.
References initialize().
| MachineModuleInfo::MachineModuleInfo | ( | MachineModuleInfo && | MMII | ) |
Definition at line 40 of file MachineModuleInfo.cpp.
References MachineModuleInfo(), and llvm::move().
| 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.
When a function is not grouped with any other function, its MF gets deleted right away. When a function is grouped with other functions, its MF gets deleted when all functions in the same group have been finalized.
Definition at line 106 of file MachineModuleInfo.cpp.
References llvm::all_of(), F, and llvm::MachineFunction::insert().
| void MachineModuleInfo::finalize | ( | ) |
Definition at line 32 of file MachineModuleInfo.cpp.
Referenced by ~MachineModuleInfo().
|
inline |
Definition at line 138 of file MachineModuleInfo.h.
| 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::ARMBaseInstrInfo::getOutliningTypeImpl(), llvm::MIRParserImpl::parseMachineFunction(), patchPhis(), and llvm::printMIR().
Definition at line 142 of file MachineModuleInfo.h.
Referenced by llvm::AMDGPUMachineModuleInfo::AMDGPUMachineModuleInfo(), llvm::ThunkInserter< Derived, InsertedThunksTy >::createThunkFunction(), getAuthPtrSlotSymbolHelper(), 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 179 of file MachineModuleInfo.h.
Referenced by emitNonLazyStubs(), llvm::AArch64_ELFTargetObjectFile::emitPersonalityValueImpl(), llvm::AArch64_ELFTargetObjectFile::getAuthPtrSlotSymbol(), llvm::AArch64_MachoTargetObjectFile::getAuthPtrSlotSymbol(), llvm::TargetLoweringObjectFileMachO::getCFIPersonalitySymbol(), llvm::TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel(), getObjFileInfo(), llvm::SparcELFTargetObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference(), and mcLower().
|
inline |
Definition at line 186 of file MachineModuleInfo.h.
References getObjFileInfo(), and MachineModuleInfo().
| 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(), I, llvm::MachineFunction::initTargetMachineFunctionInfo(), and llvm::MachineFunction.
Referenced by createFrameHelperMachineFunction(), llvm::ThunkInserter< Derived, InsertedThunksTy >::createThunkFunction(), and llvm::MIRParserImpl::parseMachineFunction().
|
inline |
Definition at line 133 of file MachineModuleInfo.h.
Referenced by llvm::AMDGPUMachineModuleInfo::AMDGPUMachineModuleInfo(), EmitInlineAsmStr(), and llvm::MIRParserImpl::parseMachineFunction().
|
inline |
Group two IR functions so their MachineFunctions are deleted together once both functions have been finalized.
Definition at line 158 of file MachineModuleInfo.h.
| void MachineModuleInfo::initialize | ( | ) |
Definition at line 27 of file MachineModuleInfo.cpp.
Referenced by MachineModuleInfo(), and MachineModuleInfo().
| void MachineModuleInfo::insertFunction | ( | const Function & | F, |
| std::unique_ptr< MachineFunction > && | MF ) |
Add an externally created MachineFunction MF for F.
Definition at line 128 of file MachineModuleInfo.cpp.
|
friend |
Definition at line 87 of file MachineModuleInfo.h.
References LLVM_ABI, MachineModuleAnalysis, and MachineModuleInfo().
Referenced by MachineModuleAnalysis.
|
friend |
Definition at line 86 of file MachineModuleInfo.h.
References MachineModuleInfoWrapperPass.
Referenced by MachineModuleInfoWrapperPass.