|
LLVM
4.0.0
|
This class contains meta information specific to a module. More...
#include <MachineModuleInfo.h>
Public Member Functions | |
| MachineModuleInfo (const TargetMachine *TM=nullptr) | |
| ~MachineModuleInfo () override | |
| bool | doInitialization (Module &) override |
| doInitialization - Virtual method overridden by subclasses to do any necessary initialization before any pass is run. More... | |
| bool | doFinalization (Module &) override |
| doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes have run. More... | |
| const MCContext & | getContext () const |
| MCContext & | getContext () |
| void | setModule (const Module *M) |
| const Module * | getModule () const |
| void | setMachineFunctionInitializer (MachineFunctionInitializer *MFInit) |
| MachineFunction & | getMachineFunction (const Function &F) |
Returns the MachineFunction constructed for the IR function F. 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 | usesVAFloatArgument () const |
| void | setUsesVAFloatArgument (bool b) |
| bool | usesMorestackAddr () const |
| void | setUsesMorestackAddr (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... | |
Public Member Functions inherited from llvm::ImmutablePass | |
| virtual void | initializePass () |
| initializePass - This method may be overriden by immutable passes to allow them to perform various initialization actions they require. More... | |
| ImmutablePass * | getAsImmutablePass () override |
| bool | runOnModule (Module &) override |
| ImmutablePasses are never run. More... | |
| ImmutablePass (char &pid) | |
| ~ImmutablePass () override | |
Public Member Functions inherited from llvm::ModulePass | |
| Pass * | createPrinterPass (raw_ostream &O, const std::string &Banner) const override |
| createPrinterPass - Get a module printer pass. More... | |
| void | assignPassManager (PMStack &PMS, PassManagerType T) override |
| Find appropriate Module Pass Manager in the PM Stack and add self into that manager. More... | |
| PassManagerType | getPotentialPassManagerType () const override |
| Return what kind of Pass Manager can manage this pass. More... | |
| ModulePass (char &pid) | |
| ~ModulePass () override | |
Public Member Functions inherited from llvm::Pass | |
| Pass (PassKind K, char &pid) | |
| virtual | ~Pass () |
| PassKind | getPassKind () const |
| virtual StringRef | getPassName () const |
| getPassName - Return a nice clean name for a pass. More... | |
| AnalysisID | getPassID () const |
| getPassID - Return the PassID number that corresponds to this pass. More... | |
| virtual void | print (raw_ostream &O, const Module *M) const |
| print - Print out the internal state of the pass. More... | |
| void | dump () const |
| virtual void | preparePassManager (PMStack &) |
| Check if available pass managers are suitable for this pass or not. More... | |
| void | setResolver (AnalysisResolver *AR) |
| AnalysisResolver * | getResolver () const |
| virtual void | getAnalysisUsage (AnalysisUsage &) const |
| getAnalysisUsage - This function should be overriden by passes that need analysis information to do their job. More... | |
| virtual void | releaseMemory () |
| releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. More... | |
| virtual void * | getAdjustedAnalysisPointer (AnalysisID ID) |
| getAdjustedAnalysisPointer - This method is used when a pass implements an analysis interface through multiple inheritance. More... | |
| virtual PMDataManager * | getAsPMDataManager () |
| virtual void | verifyAnalysis () const |
| verifyAnalysis() - This member can be implemented by a analysis pass to check state of analysis information. More... | |
| virtual void | dumpPassStructure (unsigned Offset=0) |
| template<typename AnalysisType > | |
| AnalysisType * | getAnalysisIfAvailable () const |
| getAnalysisIfAvailable<AnalysisType>() - Subclasses use this function to get analysis information that might be around, for example to update it. More... | |
| bool | mustPreserveAnalysisID (char &AID) const |
| mustPreserveAnalysisID - This method serves the same function as getAnalysisIfAvailable, but works if you just have an AnalysisID. More... | |
| template<typename AnalysisType > | |
| AnalysisType & | getAnalysis () const |
| getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information that they claim to use by overriding the getAnalysisUsage function. More... | |
| template<typename AnalysisType > | |
| AnalysisType & | getAnalysis (Function &F) |
| getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information that they claim to use by overriding the getAnalysisUsage function. More... | |
| template<typename AnalysisType > | |
| AnalysisType & | getAnalysisID (AnalysisID PI) const |
| template<typename AnalysisType > | |
| AnalysisType & | getAnalysisID (AnalysisID PI, Function &F) |
Static Public Attributes | |
| static char | ID |
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... | |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::Pass | |
| static const PassInfo * | lookupPassInfo (const void *TI) |
| static const PassInfo * | lookupPassInfo (StringRef Arg) |
| static Pass * | createPass (AnalysisID ID) |
Protected Member Functions inherited from llvm::ModulePass | |
| bool | skipModule (Module &M) const |
| Optional passes call this function to check whether the pass should be skipped. 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 87 of file MachineModuleInfo.h.
|
explicit |
Definition at line 192 of file MachineModuleInfo.cpp.
References llvm::PassRegistry::getPassRegistry(), and llvm::initializeMachineModuleInfoPass().
|
override |
Definition at line 199 of file MachineModuleInfo.cpp.
Provide the personality function for the exception information.
Definition at line 250 of file MachineModuleInfo.cpp.
References i.
Referenced by llvm::addLandingPadInfo(), 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 286 of file MachineModuleInfo.cpp.
doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes have run.
Reimplemented from llvm::Pass.
Definition at line 213 of file MachineModuleInfo.cpp.
References llvm::MCContext::reset().
doInitialization - Virtual method overridden by subclasses to do any necessary initialization before any pass is run.
Reimplemented from llvm::Pass.
Definition at line 202 of file MachineModuleInfo.cpp.
|
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 211 of file MachineModuleInfo.h.
References getAddrLabelSymbolToEmit().
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 231 of file MachineModuleInfo.cpp.
References llvm::MMIAddrLabelMap::getAddrLabelSymbolToEmit().
Referenced by llvm::AsmPrinter::EmitBasicBlockStart(), and getAddrLabelSymbol().
Definition at line 155 of file MachineModuleInfo.h.
Referenced by addPassesToGenerateCode(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::DwarfCFIException::beginFunction(), llvm::DebugHandlerBase::beginInstruction(), llvm::X86FrameLowering::emitCalleeSavedFrameMoves(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::Mips16FrameLowering::emitPrologue(), llvm::MipsSEFrameLowering::emitPrologue(), llvm::XCoreFrameLowering::emitPrologue(), llvm::AArch64FrameLowering::emitPrologue(), llvm::SystemZFrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), llvm::DebugHandlerBase::endInstruction(), LowerINTRINSIC_WO_CHAIN(), llvm::SelectionDAGBuilder::lowerInvokable(), and recoverFramePointer().
|
inline |
Definition at line 156 of file MachineModuleInfo.h.
|
inline |
Get the call site currently being processed, if any.
return zero if none.
Definition at line 235 of file MachineModuleInfo.h.
Referenced by llvm::SelectionDAGBuilder::lowerInvokable().
| MachineFunction & MachineModuleInfo::getMachineFunction | ( | const Function & | F | ) |
Returns the MachineFunction constructed for the IR function F.
Creates a new MachineFunction and runs the MachineFunctionInitializer if none exists yet.
Definition at line 259 of file MachineModuleInfo.cpp.
References F, I, llvm::MachineFunctionInitializer::initializeMachineFunction(), and llvm::report_fatal_error().
Definition at line 159 of file MachineModuleInfo.h.
Referenced by llvm::X86FrameLowering::adjustForHiPEPrologue(), llvm::DwarfDebug::beginModule(), llvm::CodeViewDebug::CodeViewDebug(), llvm::AsmPrinter::doInitialization(), llvm::DwarfDebug::DwarfDebug(), EmitGCCInlineAsmStr(), EmitMSInlineAsmStr(), llvm::WinException::endModule(), llvm::AsmPrinter::getDataLayout(), and llvm::TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel().
|
inline |
Keep track of various per-function pieces of information for backends that would like to do so.
Definition at line 177 of file MachineModuleInfo.h.
Referenced by llvm::AsmPrinter::doFinalization(), llvm::ARMAsmPrinter::EmitEndOfAsmFile(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::TargetLoweringObjectFileMachO::getCFIPersonalitySymbol(), llvm::TargetLoweringObjectFileMachO::getIndirectSymViaGOTPCRel(), getMachOMMI(), llvm::SparcELFTargetObjectFile::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileELF::getTTypeGlobalReference(), llvm::TargetLoweringObjectFileMachO::getTTypeGlobalReference(), and printSymbolOperand().
|
inline |
Definition at line 184 of file MachineModuleInfo.h.
Return array of personality functions ever seen.
Definition at line 241 of file MachineModuleInfo.h.
Referenced by llvm::DwarfCFIException::endModule().
|
inline |
Returns true if valid debug info is present.
Definition at line 189 of file MachineModuleInfo.h.
Referenced by llvm::CodeViewDebug::beginFunction(), llvm::DwarfDebug::beginFunction(), llvm::DebugHandlerBase::beginInstruction(), llvm::X86FrameLowering::eliminateCallFramePseudoInstr(), llvm::AsmPrinter::EmitFunctionBody(), llvm::AArch64FrameLowering::emitPrologue(), llvm::X86FrameLowering::emitPrologue(), llvm::PPCFrameLowering::emitPrologue(), llvm::DwarfDebug::endFunction(), llvm::DebugHandlerBase::endInstruction(), llvm::CodeViewDebug::endModule(), llvm::DwarfDebug::endModule(), ExpandMOVImmSExti8(), llvm::AsmPrinter::needsCFIMoves(), llvm::XCoreRegisterInfo::needsFrameMoves(), llvm::FastISel::selectIntrinsicCall(), llvm::FunctionLoweringInfo::set(), and llvm::AsmPrinter::SetupMachineFunction().
|
inline |
Set the call site currently being processed.
Definition at line 231 of file MachineModuleInfo.h.
Referenced by llvm::SelectionDAGBuilder::lowerInvokable().
|
inline |
Definition at line 190 of file MachineModuleInfo.h.
Referenced by llvm::DwarfDebug::beginModule(), and llvm::CodeViewDebug::CodeViewDebug().
|
inline |
Definition at line 161 of file MachineModuleInfo.h.
Referenced by addPassesToGenerateCode().
Definition at line 158 of file MachineModuleInfo.h.
|
inline |
Definition at line 204 of file MachineModuleInfo.h.
Referenced by llvm::X86FrameLowering::adjustForSegmentedStacks().
|
inline |
Definition at line 196 of file MachineModuleInfo.h.
Referenced by llvm::computeUsesVAFloatArgument().
| 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 239 of file MachineModuleInfo.cpp.
|
inline |
Definition at line 200 of file MachineModuleInfo.h.
Referenced by llvm::AsmPrinter::doFinalization().
|
inline |
Definition at line 192 of file MachineModuleInfo.h.
Referenced by llvm::computeUsesVAFloatArgument(), and llvm::X86AsmPrinter::EmitEndOfAsmFile().
|
static |
Definition at line 146 of file MachineModuleInfo.h.
1.8.6