LLVM  10.0.0svn
Public Member Functions | Friends | List of all members
llvm::MachineModuleInfo Class Reference

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 LLVMTargetMachinegetTarget () const
 
const MCContextgetContext () const
 
MCContextgetContext ()
 
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 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)
 
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...
 

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...
 

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() [1/2]

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

Definition at line 225 of file MachineModuleInfo.cpp.

References initialize().

◆ MachineModuleInfo() [2/2]

MachineModuleInfo::MachineModuleInfo ( MachineModuleInfo &&  MMII)

Definition at line 211 of file MachineModuleInfo.cpp.

◆ ~MachineModuleInfo()

MachineModuleInfo::~MachineModuleInfo ( )

Definition at line 231 of file MachineModuleInfo.cpp.

References finalize().

Member Function Documentation

◆ addPersonality()

void MachineModuleInfo::addPersonality ( const Function Personality)

Provide the personality function for the exception information.

Definition at line 255 of file MachineModuleInfo.cpp.

Referenced by llvm::MachineFunction::addLandingPad(), and llvm::DwarfCFIException::beginFragment().

◆ deleteMachineFunctionFor()

void MachineModuleInfo::deleteMachineFunctionFor ( Function F)

Delete the MachineFunction MF and reset the link in the IR Function to Machine Function map.

Definition at line 295 of file MachineModuleInfo.cpp.

References llvm::AnalysisUsage::addPreserved(), llvm::AnalysisUsage::addRequired(), deleteMachineFunctionFor(), F(), and runOnFunction().

Referenced by deleteMachineFunctionFor().

◆ finalize()

void MachineModuleInfo::finalize ( )

◆ 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 227 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 236 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 162 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 251 of file MachineModuleInfo.h.

Referenced by FixedPointIntrinsicToOpcode(), 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 265 of file MachineModuleInfo.cpp.

References I.

Referenced by llvm::AArch64InstrInfo::getOutliningType(), INITIALIZE_PASS(), and 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 188 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 271 of file MachineModuleInfo.cpp.

References F(), llvm::TargetMachine::getSubtargetImpl(), 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 257 of file MachineModuleInfo.h.

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

◆ getTarget()

const LLVMTargetMachine& llvm::MachineModuleInfo::getTarget ( ) const
inline

Definition at line 159 of file MachineModuleInfo.h.

References llvm::SystemZISD::TM.

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

◆ hasDebugInfo()

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

◆ hasNosplitStack()

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

Definition at line 216 of file MachineModuleInfo.h.

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

◆ hasSplitStack()

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

Definition at line 208 of file MachineModuleInfo.h.

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

◆ initialize()

void MachineModuleInfo::initialize ( )

◆ setCurrentCallSite()

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

Set the call site currently being processed.

Definition at line 247 of file MachineModuleInfo.h.

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

◆ setDebugInfoAvailability()

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

◆ setHasNosplitStack()

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

◆ setHasSplitStack()

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

Definition at line 212 of file MachineModuleInfo.h.

Referenced by AssignProtectedObjSet().

◆ setUsesMorestackAddr()

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

◆ setUsesMSVCFloatingPoint()

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

Definition at line 198 of file MachineModuleInfo.h.

Referenced by computeUsesMSVCFloatingPoint().

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

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

◆ usesMorestackAddr()

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

Definition at line 200 of file MachineModuleInfo.h.

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

◆ usesMSVCFloatingPoint()

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

Friends And Related Function Documentation

◆ MachineModuleAnalysis

friend class MachineModuleAnalysis
friend

Definition at line 80 of file MachineModuleInfo.h.

◆ MachineModuleInfoWrapperPass

friend class MachineModuleInfoWrapperPass
friend

Definition at line 79 of file MachineModuleInfo.h.


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