|
LLVM
10.0.0
|
This class contains meta information specific to a module. More...
#include "llvm/CodeGen/MachineModuleInfo.h"
Public Member Functions | |
| MachineModuleInfo (const LLVMTargetMachine *TM=nullptr) | |
| MachineModuleInfo (MachineModuleInfo &&MMII) | |
| ~MachineModuleInfo () | |
| void | initialize () |
| void | finalize () |
| const LLVMTargetMachine & | getTarget () const |
| const MCContext & | getContext () const |
| MCContext & | getContext () |
| const Module * | getModule () const |
| MachineFunction & | getOrCreateMachineFunction (const Function &F) |
Returns the MachineFunction constructed for the IR function F. More... | |
| MachineFunction * | getMachineFunction (const Function &F) const |
Returns the MachineFunction associated to IR function F if there is one, otherwise nullptr. More... | |
| void | deleteMachineFunctionFor (Function &F) |
Delete the MachineFunction MF and reset the link in the IR Function to Machine Function map. More... | |
| template<typename Ty > | |
| Ty & | getObjFileInfo () |
| Keep track of various per-function pieces of information for backends that would like to do so. More... | |
| template<typename Ty > | |
| const Ty & | getObjFileInfo () const |
| bool | hasDebugInfo () const |
| Returns true if valid debug info is present. More... | |
| void | setDebugInfoAvailability (bool avail) |
| bool | usesMSVCFloatingPoint () const |
| void | setUsesMSVCFloatingPoint (bool b) |
| bool | usesMorestackAddr () const |
| void | setUsesMorestackAddr (bool b) |
| bool | hasSplitStack () const |
| void | setHasSplitStack (bool b) |
| bool | hasNosplitStack () const |
| void | setHasNosplitStack (bool b) |
| MCSymbol * | getAddrLabelSymbol (const BasicBlock *BB) |
| Return the symbol to be used for the specified basic block when its address is taken. More... | |
| ArrayRef< MCSymbol * > | getAddrLabelSymbolToEmit (const BasicBlock *BB) |
| Return the symbol to be used for the specified basic block when its address is taken. More... | |
| void | takeDeletedSymbolsForFunction (const Function *F, std::vector< MCSymbol *> &Result) |
| If the specified function has had any references to address-taken blocks generated, but the block got deleted, return the symbol now so we can emit it. More... | |
Friends | |
| class | MachineModuleInfoWrapperPass |
| class | MachineModuleAnalysis |
Exception Handling | |
| void | setCurrentCallSite (unsigned Site) |
| Set the call site currently being processed. More... | |
| unsigned | getCurrentCallSite () |
| Get the call site currently being processed, if any. More... | |
| void | addPersonality (const Function *Personality) |
| Provide the personality function for the exception information. More... | |
| const std::vector< const Function * > & | getPersonalities () const |
| Return array of personality functions ever seen. More... | |
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 78 of file MachineModuleInfo.h.
|
explicit |
Definition at line 237 of file MachineModuleInfo.cpp.
References initialize().
| MachineModuleInfo::MachineModuleInfo | ( | MachineModuleInfo && | MMII | ) |
Definition at line 223 of file MachineModuleInfo.cpp.
| MachineModuleInfo::~MachineModuleInfo | ( | ) |
Definition at line 243 of file MachineModuleInfo.cpp.
References finalize().
Provide the personality function for the exception information.
Definition at line 267 of file MachineModuleInfo.cpp.
Referenced by llvm::MachineFunction::addLandingPad(), and llvm::DwarfCFIException::beginFragment().
| void MachineModuleInfo::deleteMachineFunctionFor | ( | Function & | F | ) |
Delete the MachineFunction MF and reset the link in the IR Function to Machine Function map.
Definition at line 307 of file MachineModuleInfo.cpp.
References llvm::AnalysisUsage::addPreserved(), llvm::AnalysisUsage::addRequired(), deleteMachineFunctionFor(), F(), and runOnFunction().
Referenced by deleteMachineFunctionFor().
| void MachineModuleInfo::finalize | ( | ) |
Definition at line 211 of file MachineModuleInfo.cpp.
References Context.
Referenced by llvm::MachineModuleInfoWrapperPass::doFinalization(), and ~MachineModuleInfo().
|
inline |
Return the symbol to be used for the specified basic block when its address is taken.
This cannot be its normal LBB label because the block may be accessed outside its containing function.
Definition at line 227 of file MachineModuleInfo.h.
Referenced by llvm::AsmPrinter::GetBlockAddressSymbol().
| ArrayRef< MCSymbol * > MachineModuleInfo::getAddrLabelSymbolToEmit | ( | const BasicBlock * | BB | ) |
Return the symbol to be used for the specified basic block when its address is taken.
If other blocks were RAUW'd to this one, we may have to emit them as well, return the whole set.
Definition at line 248 of file MachineModuleInfo.cpp.
References llvm::MMIAddrLabelMap::getAddrLabelSymbolToEmit(), and takeDeletedSymbolsForFunction().
Referenced by llvm::AsmPrinter::EmitBasicBlockStart().
Definition at line 161 of file MachineModuleInfo.h.
References Context.
Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), llvm::LLVMTargetMachine::addPassesToEmitMC(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::DwarfCFIException::beginFunction(), llvm::DebugHandlerBase::beginInstruction(), llvm::CodeViewDebug::beginInstruction(), callingConvSupported(), llvm::X86FrameLowering::emitCalleeSavedFrameMoves(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), EmitGCCInlineAsmStr(), emitNonLazyStubs(), llvm::Mips16FrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::AArch64FrameLowering::emitPrologue(), llvm::SystemZFrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), llvm::DebugHandlerBase::endInstruction(), FixedPointIntrinsicToOpcode(), getSymbolName(), llvm::HexagonFrameLowering::insertCFIInstructions(), llvm::SelectionDAGBuilder::lowerInvokable(), recoverFramePointer(), srcMgrDiagHandler(), and transformCallee().
|
inline |
Definition at line 162 of file MachineModuleInfo.h.
References Context.
|
inline |
Get the call site currently being processed, if any.
return zero if none.
Definition at line 251 of file MachineModuleInfo.h.
Referenced by FixedPointIntrinsicToOpcode(), and llvm::SelectionDAGBuilder::lowerInvokable().
| MachineFunction * MachineModuleInfo::getMachineFunction | ( | const Function & | F | ) | const |
Returns the MachineFunction associated to IR function F if there is one, otherwise nullptr.
Definition at line 277 of file MachineModuleInfo.cpp.
References I.
Referenced by llvm::AArch64InstrInfo::getOutliningType(), INITIALIZE_PASS(), and llvm::MIRParserImpl::parseMachineFunction().
Definition at line 164 of file MachineModuleInfo.h.
References F().
Referenced by llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::RegAllocBase::allocatePhysRegs(), llvm::AMDGPUMachineModuleInfo::AMDGPUMachineModuleInfo(), llvm::BTFDebug::beginInstruction(), llvm::DwarfDebug::beginModule(), checkFunctionsAttributeConsistency(), llvm::CodeViewDebug::CodeViewDebug(), convertTailJumpOpcode(), llvm::DwarfDebug::DwarfDebug(), llvm::MachineInstr::emitError(), EmitGCCInlineAsmStr(), EmitMSInlineAsmStr(), llvm::X86FrameLowering::emitPrologue(), llvm::WinCFGuard::endModule(), llvm::WinException::endModule(), llvm::X86TargetLowering::expandIndirectJTBranch(), llvm::AsmPrinter::getDataLayout(), llvm::TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel(), getMOVL(), getRetpolineSymbol(), getStringIdTypeIdx(), getSymbolName(), INITIALIZE_PASS(), IsCallReturnTwice(), parseVersion(), llvm::X86AsmPrinter::runOnMachineFunction(), and srcMgrDiagHandler().
|
inline |
Keep track of various per-function pieces of information for backends that would like to do so.
Definition at line 181 of file MachineModuleInfo.h.
Referenced by llvm::AsmPrinter::doFinalization(), llvm::ARMAsmPrinter::EmitEndOfAsmFile(), llvm::X86AsmPrinter::EmitFunctionBodyEnd(), emitNonLazyStubs(), llvm::TargetLoweringObjectFileMachO::getCFIPersonalitySymbol(), llvm::AArch64MCInstLower::GetGlobalAddressSymbol(), llvm::TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel(), getMachOMMI(), getModifierVariantKind(), llvm::SparcELFTargetObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), and llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference().
|
inline |
Definition at line 188 of file MachineModuleInfo.h.
| MachineFunction & MachineModuleInfo::getOrCreateMachineFunction | ( | const Function & | F | ) |
Returns the MachineFunction constructed for the IR function F.
Creates a new MachineFunction if none exists yet.
Definition at line 283 of file MachineModuleInfo.cpp.
References F(), llvm::TargetMachine::getSubtargetImpl(), and I.
Referenced by INITIALIZE_PASS(), and llvm::MIRParserImpl::parseMachineFunction().
Return array of personality functions ever seen.
Definition at line 257 of file MachineModuleInfo.h.
Referenced by llvm::DwarfCFIException::endModule().
|
inline |
Definition at line 159 of file MachineModuleInfo.h.
References llvm::SystemZISD::TM.
Referenced by llvm::MIRParserImpl::parseMachineFunction().
|
inline |
Returns true if valid debug info is present.
Definition at line 193 of file MachineModuleInfo.h.
Referenced by llvm::DebugHandlerBase::beginInstruction(), llvm::DwarfDebug::beginModule(), llvm::NVPTXAsmPrinter::doFinalization(), llvm::NVPTXAsmPrinter::doInitialization(), llvm::AsmPrinter::EmitFunctionBody(), llvm::DebugHandlerBase::endInstruction(), llvm::CodeViewDebug::endModule(), llvm::DwarfDebug::endModule(), hasDebugInfo(), needFuncLabelsForEHOrDebugInfo(), llvm::AsmPrinter::needsCFIMoves(), llvm::MachineFunction::needsFrameMoves(), and VisitGlobalVariableForEmission().
|
inline |
Definition at line 216 of file MachineModuleInfo.h.
Referenced by llvm::AsmPrinter::doFinalization().
|
inline |
Definition at line 208 of file MachineModuleInfo.h.
Referenced by llvm::AsmPrinter::doFinalization().
| void MachineModuleInfo::initialize | ( | ) |
Definition at line 203 of file MachineModuleInfo.cpp.
Referenced by MachineModuleInfo(), and llvm::MachineModuleInfoWrapperPass::MachineModuleInfoWrapperPass().
|
inline |
Set the call site currently being processed.
Definition at line 247 of file MachineModuleInfo.h.
Referenced by FixedPointIntrinsicToOpcode(), and llvm::SelectionDAGBuilder::lowerInvokable().
|
inline |
Definition at line 194 of file MachineModuleInfo.h.
Referenced by llvm::DwarfDebug::beginModule(), and llvm::CodeViewDebug::CodeViewDebug().
|
inline |
Definition at line 220 of file MachineModuleInfo.h.
Referenced by llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::X86FrameLowering::adjustForSegmentedStacks(), and AssignProtectedObjSet().
|
inline |
Definition at line 212 of file MachineModuleInfo.h.
Referenced by AssignProtectedObjSet().
|
inline |
Definition at line 204 of file MachineModuleInfo.h.
Referenced by llvm::X86FrameLowering::adjustForSegmentedStacks().
|
inline |
Definition at line 198 of file MachineModuleInfo.h.
Referenced by computeUsesMSVCFloatingPoint().
| void MachineModuleInfo::takeDeletedSymbolsForFunction | ( | const Function * | F, |
| std::vector< MCSymbol *> & | Result | ||
| ) |
If the specified function has had any references to address-taken blocks generated, but the block got deleted, return the symbol now so we can emit it.
This prevents emitting a reference to a symbol that has no definition.
Definition at line 256 of file MachineModuleInfo.cpp.
Referenced by llvm::AsmPrinter::EmitDebugValue(), and getAddrLabelSymbolToEmit().
|
inline |
Definition at line 200 of file MachineModuleInfo.h.
Referenced by llvm::AsmPrinter::doFinalization().
|
inline |
Definition at line 196 of file MachineModuleInfo.h.
Referenced by computeUsesMSVCFloatingPoint(), and llvm::X86AsmPrinter::EmitEndOfAsmFile().
|
friend |
Definition at line 80 of file MachineModuleInfo.h.
|
friend |
Definition at line 79 of file MachineModuleInfo.h.
1.8.13