class MachineModuleInfo
Declaration
class MachineModuleInfo { /* full declaration omitted */ };
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.
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:74
Member Variables
- private const llvm::LLVMTargetMachine& TM
- private llvm::MCContext Context
- This is the MCContext used for the entire code generator.
- private llvm::MCContext* ExternalContext = nullptr
- private const llvm::Module* TheModule
- This is the LLVM Module being worked on.
- private llvm::MachineModuleInfoImpl* ObjFileMMI
- This is the object-file-format-specific implementation of MachineModuleInfoImpl, which lets targets accumulate whatever info they want.
- private std::vector<const Function*> Personalities
- Vector of all personality functions ever seen. Used to emit common EH frames.
- private unsigned int CurCallSite
- The current call site index being processed, if any. 0 if none.
- private bool DbgInfoAvailable
- True if debugging information is available in this module.
- private bool UsesMSVCFloatingPoint
- True if this module is being built for windows/msvc, and uses floating point. This is used to emit an undefined reference to _fltused.
- private DenseMap<const llvm::Function*, std::unique_ptr<MachineFunction>> MachineFunctions
- Maps IR Functions to their corresponding MachineFunctions.
- private unsigned int NextFnNum = 0
- Next unique number available for a MachineFunction.
- private const llvm::Function* LastRequest = nullptr
- Used for shortcut/cache.
- private llvm::MachineFunction* LastResult = nullptr
- Used for shortcut/cache.
Method Overview
- public MachineModuleInfo(const llvm::LLVMTargetMachine * TM, llvm::MCContext * ExtContext)
- public MachineModuleInfo(llvm::MachineModuleInfo && MMII)
- public MachineModuleInfo(const llvm::LLVMTargetMachine * TM = nullptr)
- public void addPersonality(const llvm::Function * Personality)
- public void deleteMachineFunctionFor(llvm::Function & F)
- public void finalize()
- public const llvm::MCContext & getContext() const
- public llvm::MCContext & getContext()
- public unsigned int getCurrentCallSite()
- public llvm::MachineFunction * getMachineFunction(const llvm::Function & F) const
- public const llvm::Module * getModule() const
- public template <typename Ty>const Ty & getObjFileInfo() const
- public template <typename Ty>Ty & getObjFileInfo()
- public llvm::MachineFunction & getOrCreateMachineFunction(llvm::Function & F)
- public const std::vector<const Function *> & getPersonalities() const
- public const llvm::LLVMTargetMachine & getTarget() const
- public bool hasDebugInfo() const
- public void initialize()
- public void insertFunction(const llvm::Function & F, std::unique_ptr<MachineFunction> && MF)
- public bool invalidate(llvm::Module &, const llvm::PreservedAnalyses &, ModuleAnalysisManager::Invalidator &)
- public void setCurrentCallSite(unsigned int Site)
- public void setUsesMSVCFloatingPoint(bool b)
- public bool usesMSVCFloatingPoint() const
- public ~MachineModuleInfo()
Methods
¶MachineModuleInfo(
const llvm::LLVMTargetMachine* TM,
llvm::MCContext* ExtContext)
MachineModuleInfo(
const llvm::LLVMTargetMachine* TM,
llvm::MCContext* ExtContext)
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:131
Parameters
- const llvm::LLVMTargetMachine* TM
- llvm::MCContext* ExtContext
¶MachineModuleInfo(llvm::MachineModuleInfo&& MMII)
MachineModuleInfo(llvm::MachineModuleInfo&& MMII)
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:134
Parameters
- llvm::MachineModuleInfo&& MMII
¶MachineModuleInfo(
const llvm::LLVMTargetMachine* TM = nullptr)
MachineModuleInfo(
const llvm::LLVMTargetMachine* TM = nullptr)
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:129
Parameters
- const llvm::LLVMTargetMachine* TM = nullptr
¶void addPersonality(
const llvm::Function* Personality)
void addPersonality(
const llvm::Function* Personality)
Description
Provide the personality function for the exception information.
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:199
Parameters
- const llvm::Function* Personality
¶void deleteMachineFunctionFor(llvm::Function& F)
void deleteMachineFunctionFor(llvm::Function& F)
Description
Delete the MachineFunction \p MF and reset the link in the IR Function to Machine Function map.
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:162
Parameters
¶void finalize()
void finalize()
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:139
¶const llvm::MCContext& getContext() const
const llvm::MCContext& getContext() const
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:143
¶llvm::MCContext& getContext()
llvm::MCContext& getContext()
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:146
¶unsigned int getCurrentCallSite()
unsigned int getCurrentCallSite()
Description
Get the call site currently being processed, if any. return zero if none.
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:196
¶llvm::MachineFunction* getMachineFunction(
const llvm::Function& F) const
llvm::MachineFunction* getMachineFunction(
const llvm::Function& F) const
Description
Returns the MachineFunction associated to IR function \p F if there is one, otherwise nullptr.
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:158
Parameters
- const llvm::Function& F
¶const llvm::Module* getModule() const
const llvm::Module* getModule() const
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:150
¶template <typename Ty>
const Ty& getObjFileInfo() const
template <typename Ty>
const Ty& getObjFileInfo() const
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:177
Templates
- Ty
¶template <typename Ty>
Ty& getObjFileInfo()
template <typename Ty>
Ty& getObjFileInfo()
Description
Keep track of various per-module pieces of information for backends that would like to do so.
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:170
Templates
- Ty
¶llvm::MachineFunction& getOrCreateMachineFunction(
llvm::Function& F)
llvm::MachineFunction& getOrCreateMachineFunction(
llvm::Function& F)
Description
Returns the MachineFunction constructed for the IR function \p F. Creates a new MachineFunction if none exists yet.
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:154
Parameters
¶const std::vector<const Function*>&
getPersonalities() const
const std::vector<const Function*>&
getPersonalities() const
Description
Return array of personality functions ever seen.
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:202
¶const llvm::LLVMTargetMachine& getTarget() const
const llvm::LLVMTargetMachine& getTarget() const
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:141
¶bool hasDebugInfo() const
bool hasDebugInfo() const
Description
Returns true if valid debug info is present.
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:182
¶void initialize()
void initialize()
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:138
¶void insertFunction(
const llvm::Function& F,
std::unique_ptr<MachineFunction>&& MF)
void insertFunction(
const llvm::Function& F,
std::unique_ptr<MachineFunction>&& MF)
Description
Add an externally created MachineFunction \p MF for \p F.
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:165
Parameters
- const llvm::Function& F
- std::unique_ptr<MachineFunction>&& MF
¶bool invalidate(
llvm::Module&,
const llvm::PreservedAnalyses&,
ModuleAnalysisManager::Invalidator&)
bool invalidate(
llvm::Module&,
const llvm::PreservedAnalyses&,
ModuleAnalysisManager::Invalidator&)
Description
\ }
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:208
Parameters
- llvm::Module&
- const llvm::PreservedAnalyses&
- ModuleAnalysisManager::Invalidator&
¶void setCurrentCallSite(unsigned int Site)
void setCurrentCallSite(unsigned int Site)
Description
Set the call site currently being processed.
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:192
Parameters
- unsigned int Site
¶void setUsesMSVCFloatingPoint(bool b)
void setUsesMSVCFloatingPoint(bool b)
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:186
Parameters
- bool b
¶bool usesMSVCFloatingPoint() const
bool usesMSVCFloatingPoint() const
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:184
¶~MachineModuleInfo()
~MachineModuleInfo()
Declared at: llvm/include/llvm/CodeGen/MachineModuleInfo.h:136