LLVM  17.0.0git
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 (const LLVMTargetMachine *TM, MCContext *ExtContext)
 
 MachineModuleInfo (MachineModuleInfo &&MMII)
 
 ~MachineModuleInfo ()
 
void initialize ()
 
void finalize ()
 
const LLVMTargetMachinegetTarget () const
 
const MCContextgetContext () const
 
MCContextgetContext ()
 
const ModulegetModule () const
 
MachineFunctiongetOrCreateMachineFunction (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...
 
void insertFunction (const Function &F, std::unique_ptr< MachineFunction > &&MF)
 Add an externally created MachineFunction MF for F. More...
 
template<typename Ty >
Ty & getObjFileInfo ()
 Keep track of various per-module 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...
 
bool usesMSVCFloatingPoint () const
 
void setUsesMSVCFloatingPoint (bool b)
 
bool invalidate (Module &, const PreservedAnalyses &, ModuleAnalysisManager::Invalidator &)
 

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

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 74 of file MachineModuleInfo.h.

Constructor & Destructor Documentation

◆ MachineModuleInfo() [1/3]

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

Definition at line 70 of file MachineModuleInfo.cpp.

References initialize(), llvm::MCContext::setObjectFileInfo(), and TM.

◆ MachineModuleInfo() [2/3]

MachineModuleInfo::MachineModuleInfo ( const LLVMTargetMachine TM,
MCContext ExtContext 
)
explicit

Definition at line 78 of file MachineModuleInfo.cpp.

References initialize(), llvm::MCContext::setObjectFileInfo(), and TM.

◆ MachineModuleInfo() [3/3]

MachineModuleInfo::MachineModuleInfo ( MachineModuleInfo &&  MMII)

Definition at line 57 of file MachineModuleInfo.cpp.

References llvm::MCContext::setObjectFileInfo().

◆ ~MachineModuleInfo()

MachineModuleInfo::~MachineModuleInfo ( )

Definition at line 88 of file MachineModuleInfo.cpp.

References finalize().

Member Function Documentation

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

References F.

◆ finalize()

void MachineModuleInfo::finalize ( )

◆ getContext() [1/2]

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

Definition at line 142 of file MachineModuleInfo.h.

References Context.

◆ getContext() [2/2]

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

◆ getCurrentCallSite()

unsigned llvm::MachineModuleInfo::getCurrentCallSite ( )
inline

Get the call site currently being processed, if any.

return zero if none.

Definition at line 192 of file MachineModuleInfo.h.

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

References F, and I.

Referenced by llvm::AArch64InstrInfo::getOutliningType(), llvm::ARMBaseInstrInfo::getOutliningType(), 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 173 of file MachineModuleInfo.h.

◆ getOrCreateMachineFunction()

MachineFunction & MachineModuleInfo::getOrCreateMachineFunction ( Function F)

Returns the MachineFunction constructed for the IR function F.

Creates a new MachineFunction if none exists yet.

Definition at line 96 of file MachineModuleInfo.cpp.

References F, llvm::TargetMachine::getSubtargetImpl(), I, and llvm::MachineFunction::initTargetMachineFunctionInfo().

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

◆ getTarget()

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

◆ hasDebugInfo()

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

◆ initialize()

void MachineModuleInfo::initialize ( )

◆ insertFunction()

void MachineModuleInfo::insertFunction ( const Function F,
std::unique_ptr< MachineFunction > &&  MF 
)

Add an externally created MachineFunction MF for F.

Definition at line 127 of file MachineModuleInfo.cpp.

References assert(), F, I, and move.

◆ invalidate()

bool llvm::MachineModuleInfo::invalidate ( Module ,
const PreservedAnalyses ,
ModuleAnalysisManager::Invalidator  
)
inline

Definition at line 197 of file MachineModuleInfo.h.

◆ setCurrentCallSite()

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

Set the call site currently being processed.

Definition at line 188 of file MachineModuleInfo.h.

◆ setUsesMSVCFloatingPoint()

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

Definition at line 182 of file MachineModuleInfo.h.

References b.

Referenced by computeUsesMSVCFloatingPoint().

◆ usesMSVCFloatingPoint()

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

Friends And Related Function Documentation

◆ MachineModuleAnalysis

friend class MachineModuleAnalysis
friend

Definition at line 76 of file MachineModuleInfo.h.

◆ MachineModuleInfoWrapperPass

friend class MachineModuleInfoWrapperPass
friend

Definition at line 75 of file MachineModuleInfo.h.


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