LLVM  6.0.0svn
Public Member Functions | Static Public Attributes | List of all members
llvm::MachineModuleInfo Class Reference

This class contains meta information specific to a module. More...

#include "llvm/CodeGen/MachineModuleInfo.h"

Inheritance diagram for llvm::MachineModuleInfo:
Inheritance graph
[legend]
Collaboration diagram for llvm::MachineModuleInfo:
Collaboration graph
[legend]

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 MCContextgetContext () const
 
MCContextgetContext ()
 
void setModule (const Module *M)
 
const ModulegetModule () const
 
MachineFunctiongetOrCreateMachineFunction (const Function &F)
 Returns the MachineFunction constructed for the IR function F. More...
 
MachineFunctiongetMachineFunction (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 usesVAFloatArgument () const
 
void setUsesVAFloatArgument (bool b)
 
bool usesMorestackAddr () const
 
void setUsesMorestackAddr (bool b)
 
bool hasSplitStack () const
 
void setHasSplitStack (bool b)
 
bool hasNosplitStack () const
 
void setHasNosplitStack (bool b)
 
MCSymbolgetAddrLabelSymbol (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
 ImmutablePass (char &pid)
 
 ~ImmutablePass () override
 
virtual void initializePass ()
 initializePass - This method may be overriden by immutable passes to allow them to perform various initialization actions they require. More...
 
ImmutablePassgetAsImmutablePass () override
 
bool runOnModule (Module &) override
 ImmutablePasses are never run. More...
 
- Public Member Functions inherited from llvm::ModulePass
 ModulePass (char &pid)
 
 ~ModulePass () override
 
PasscreatePrinterPass (raw_ostream &OS, 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...
 
- Public Member Functions inherited from llvm::Pass
 Pass (PassKind K, char &pid)
 
 Pass (const Pass &)=delete
 
Passoperator= (const Pass &)=delete
 
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 &OS, 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)
 
AnalysisResolvergetResolver () 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 PMDataManagergetAsPMDataManager ()
 
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 PassInfolookupPassInfo (const void *TI)
 
static const PassInfolookupPassInfo (StringRef Arg)
 
static PasscreatePass (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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ MachineModuleInfo()

MachineModuleInfo::MachineModuleInfo ( const TargetMachine TM = nullptr)
explicit

◆ ~MachineModuleInfo()

MachineModuleInfo::~MachineModuleInfo ( )
overridedefault

Referenced by MachineModuleInfo().

Member Function Documentation

◆ addPersonality()

void MachineModuleInfo::addPersonality ( const Function Personality)

Provide the personality function for the exception information.

Definition at line 253 of file MachineModuleInfo.cpp.

Referenced by llvm::addLandingPadInfo(), and llvm::DwarfCFIException::beginFragment().

◆ deleteMachineFunctionFor()

void MachineModuleInfo::deleteMachineFunctionFor ( Function F)

◆ doFinalization()

bool MachineModuleInfo::doFinalization ( Module )
overridevirtual

doFinalization - Virtual method overriden by subclasses to do any necessary clean up after all passes have run.

Reimplemented from llvm::Pass.

Definition at line 217 of file MachineModuleInfo.cpp.

References llvm::MCContext::reset().

◆ doInitialization()

bool MachineModuleInfo::doInitialization ( Module )
overridevirtual

doInitialization - Virtual method overridden by subclasses to do any necessary initialization before any pass is run.

Reimplemented from llvm::Pass.

Definition at line 207 of file MachineModuleInfo.cpp.

◆ getAddrLabelSymbol()

MCSymbol* llvm::MachineModuleInfo::getAddrLabelSymbol ( const BasicBlock BB)
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 226 of file MachineModuleInfo.h.

Referenced by llvm::AsmPrinter::GetBlockAddressSymbol().

◆ getAddrLabelSymbolToEmit()

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 234 of file MachineModuleInfo.cpp.

References llvm::MMIAddrLabelMap::getAddrLabelSymbolToEmit(), and takeDeletedSymbolsForFunction().

Referenced by llvm::AsmPrinter::EmitBasicBlockStart().

◆ getContext() [1/2]

const MCContext& llvm::MachineModuleInfo::getContext ( ) const
inline

◆ getContext() [2/2]

MCContext& llvm::MachineModuleInfo::getContext ( )
inline

Definition at line 156 of file MachineModuleInfo.h.

References Context.

◆ getCurrentCallSite()

unsigned llvm::MachineModuleInfo::getCurrentCallSite ( )
inline

Get the call site currently being processed, if any.

return zero if none.

Definition at line 250 of file MachineModuleInfo.h.

Referenced by getUnderlyingArgReg(), and llvm::SelectionDAGBuilder::lowerInvokable().

◆ getMachineFunction()

MachineFunction * MachineModuleInfo::getMachineFunction ( const Function F) const

Returns the MachineFunction associated to IR function F if there is one, otherwise nullptr.

Definition at line 263 of file MachineModuleInfo.cpp.

References I.

Referenced by llvm::MIRParserImpl::parseMachineFunction().

◆ getModule()

const Module* llvm::MachineModuleInfo::getModule ( ) const
inline

◆ getObjFileInfo() [1/2]

template<typename Ty >
Ty& llvm::MachineModuleInfo::getObjFileInfo ( )
inline

◆ getObjFileInfo() [2/2]

template<typename Ty >
const Ty& llvm::MachineModuleInfo::getObjFileInfo ( ) const
inline

Definition at line 183 of file MachineModuleInfo.h.

◆ getOrCreateMachineFunction()

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 269 of file MachineModuleInfo.cpp.

References F(), and I.

Referenced by INITIALIZE_PASS(), and llvm::MIRParserImpl::parseMachineFunction().

◆ getPersonalities()

const std::vector<const Function *>& llvm::MachineModuleInfo::getPersonalities ( ) const
inline

Return array of personality functions ever seen.

Definition at line 256 of file MachineModuleInfo.h.

References llvm::computeUsesVAFloatArgument(), and I.

Referenced by llvm::DwarfCFIException::endModule().

◆ hasDebugInfo()

bool llvm::MachineModuleInfo::hasDebugInfo ( ) const
inline

◆ hasNosplitStack()

bool llvm::MachineModuleInfo::hasNosplitStack ( ) const
inline

Definition at line 215 of file MachineModuleInfo.h.

Referenced by llvm::AsmPrinter::doFinalization().

◆ hasSplitStack()

bool llvm::MachineModuleInfo::hasSplitStack ( ) const
inline

Definition at line 207 of file MachineModuleInfo.h.

Referenced by llvm::AsmPrinter::doFinalization().

◆ setCurrentCallSite()

void llvm::MachineModuleInfo::setCurrentCallSite ( unsigned  Site)
inline

Set the call site currently being processed.

Definition at line 246 of file MachineModuleInfo.h.

Referenced by getUnderlyingArgReg(), and llvm::SelectionDAGBuilder::lowerInvokable().

◆ setDebugInfoAvailability()

void llvm::MachineModuleInfo::setDebugInfoAvailability ( bool  avail)
inline

◆ setHasNosplitStack()

void llvm::MachineModuleInfo::setHasNosplitStack ( bool  b)
inline

Definition at line 219 of file MachineModuleInfo.h.

Referenced by AssignProtectedObjSet().

◆ setHasSplitStack()

void llvm::MachineModuleInfo::setHasSplitStack ( bool  b)
inline

Definition at line 211 of file MachineModuleInfo.h.

Referenced by AssignProtectedObjSet().

◆ setModule()

void llvm::MachineModuleInfo::setModule ( const Module M)
inline

Definition at line 158 of file MachineModuleInfo.h.

◆ setUsesMorestackAddr()

void llvm::MachineModuleInfo::setUsesMorestackAddr ( bool  b)
inline

◆ setUsesVAFloatArgument()

void llvm::MachineModuleInfo::setUsesVAFloatArgument ( bool  b)
inline

Definition at line 195 of file MachineModuleInfo.h.

Referenced by llvm::computeUsesVAFloatArgument().

◆ takeDeletedSymbolsForFunction()

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 242 of file MachineModuleInfo.cpp.

Referenced by llvm::AsmPrinter::EmitDebugThreadLocal(), and getAddrLabelSymbolToEmit().

◆ usesMorestackAddr()

bool llvm::MachineModuleInfo::usesMorestackAddr ( ) const
inline

Definition at line 199 of file MachineModuleInfo.h.

Referenced by llvm::AsmPrinter::doFinalization().

◆ usesVAFloatArgument()

bool llvm::MachineModuleInfo::usesVAFloatArgument ( ) const
inline

Member Data Documentation

◆ ID

char llvm::MachineModuleInfo::ID
static

Definition at line 146 of file MachineModuleInfo.h.

Referenced by deleteMachineFunctionFor().


The documentation for this class was generated from the following files: