class SlotTracker
Declaration
class SlotTracker { /* full declaration omitted */ };
Description
This class provides computation of slot numbers for LLVM Assembly writing.
Declared at: llvm/lib/IR/AsmWriter.cpp:673
Method Overview
- public SlotTracker(const llvm::Function * F, bool ShouldInitializeAllMetadata = false)
- public SlotTracker(const llvm::ModuleSummaryIndex * Index)
- public SlotTracker(const llvm::SlotTracker &)
- public SlotTracker(const llvm::Module * M, bool ShouldInitializeAllMetadata = false)
- public llvm::SlotTracker::as_iterator as_begin()
- public bool as_empty() const
- public llvm::SlotTracker::as_iterator as_end()
- public unsigned int as_size() const
- public int getAttributeGroupSlot(llvm::AttributeSet AS)
- public const llvm::Function * getFunction() const
- public int getGUIDSlot(GlobalValue::GUID GUID)
- public int getGlobalSlot(const llvm::GlobalValue * V)
- public int getLocalSlot(const llvm::Value * V)
- public int getMetadataSlot(const llvm::MDNode * N)
- public int getModulePathSlot(llvm::StringRef Path)
- public int getTypeIdSlot(llvm::StringRef Id)
- public void incorporateFunction(const llvm::Function * F)
- public inline void initializeIfNeeded()
- public void initializeIndexIfNeeded()
- public llvm::SlotTracker::mdn_iterator mdn_begin()
- public bool mdn_empty() const
- public llvm::SlotTracker::mdn_iterator mdn_end()
- public unsigned int mdn_size() const
- public void purgeFunction()
Methods
¶SlotTracker(
const llvm::Function* F,
bool ShouldInitializeAllMetadata = false)
SlotTracker(
const llvm::Function* F,
bool ShouldInitializeAllMetadata = false)
Description
Construct from a function, starting out in incorp state. If \c ShouldInitializeAllMetadata, initializes all metadata in all functions, giving correct numbering for metadata referenced only from within a function (even if no functions have been initialized).
Declared at: llvm/lib/IR/AsmWriter.cpp:732
Parameters
- const llvm::Function* F
- bool ShouldInitializeAllMetadata = false
¶SlotTracker(const llvm::ModuleSummaryIndex* Index)
SlotTracker(const llvm::ModuleSummaryIndex* Index)
Description
Construct from a module summary index.
Declared at: llvm/lib/IR/AsmWriter.cpp:736
Parameters
- const llvm::ModuleSummaryIndex* Index
¶SlotTracker(const llvm::SlotTracker&)
SlotTracker(const llvm::SlotTracker&)
Declared at: llvm/lib/IR/AsmWriter.cpp:738
Parameters
- const llvm::SlotTracker&
¶SlotTracker(
const llvm::Module* M,
bool ShouldInitializeAllMetadata = false)
SlotTracker(
const llvm::Module* M,
bool ShouldInitializeAllMetadata = false)
Description
Construct from a module. If \c ShouldInitializeAllMetadata, initializes all metadata in all functions, giving correct numbering for metadata referenced only from within a function (even if no functions have been initialized).
Declared at: llvm/lib/IR/AsmWriter.cpp:724
Parameters
- const llvm::Module* M
- bool ShouldInitializeAllMetadata = false
¶llvm::SlotTracker::as_iterator as_begin()
llvm::SlotTracker::as_iterator as_begin()
Declared at: llvm/lib/IR/AsmWriter.cpp:776
¶bool as_empty() const
bool as_empty() const
Declared at: llvm/lib/IR/AsmWriter.cpp:779
¶llvm::SlotTracker::as_iterator as_end()
llvm::SlotTracker::as_iterator as_end()
Declared at: llvm/lib/IR/AsmWriter.cpp:777
¶unsigned int as_size() const
unsigned int as_size() const
Declared at: llvm/lib/IR/AsmWriter.cpp:778
¶int getAttributeGroupSlot(llvm::AttributeSet AS)
int getAttributeGroupSlot(llvm::AttributeSet AS)
Declared at: llvm/lib/IR/AsmWriter.cpp:746
Parameters
¶const llvm::Function* getFunction() const
const llvm::Function* getFunction() const
Declared at: llvm/lib/IR/AsmWriter.cpp:758
¶int getGUIDSlot(GlobalValue::GUID GUID)
int getGUIDSlot(GlobalValue::GUID GUID)
Declared at: llvm/lib/IR/AsmWriter.cpp:748
Parameters
- GlobalValue::GUID GUID
¶int getGlobalSlot(const llvm::GlobalValue* V)
int getGlobalSlot(const llvm::GlobalValue* V)
Description
getGlobalSlot - Get the slot number of a global value.
Declared at: llvm/lib/IR/AsmWriter.cpp:744
Parameters
- const llvm::GlobalValue* V
¶int getLocalSlot(const llvm::Value* V)
int getLocalSlot(const llvm::Value* V)
Description
Return the slot number of the specified value in it's type plane. If something is not in the SlotTracker, return -1.
Declared at: llvm/lib/IR/AsmWriter.cpp:743
Parameters
- const llvm::Value* V
¶int getMetadataSlot(const llvm::MDNode* N)
int getMetadataSlot(const llvm::MDNode* N)
Description
getMetadataSlot - Get the slot number of a MDNode.
Declared at: llvm/lib/IR/AsmWriter.cpp:745
Parameters
- const llvm::MDNode* N
¶int getModulePathSlot(llvm::StringRef Path)
int getModulePathSlot(llvm::StringRef Path)
Declared at: llvm/lib/IR/AsmWriter.cpp:747
Parameters
- llvm::StringRef Path
¶int getTypeIdSlot(llvm::StringRef Id)
int getTypeIdSlot(llvm::StringRef Id)
Declared at: llvm/lib/IR/AsmWriter.cpp:749
Parameters
¶void incorporateFunction(const llvm::Function* F)
void incorporateFunction(const llvm::Function* F)
Description
If you'd like to deal with a function instead of just a module, use this method to get its data into the SlotTracker.
Declared at: llvm/lib/IR/AsmWriter.cpp:753
Parameters
- const llvm::Function* F
¶inline void initializeIfNeeded()
inline void initializeIfNeeded()
Description
These functions do the actual initialization.
Declared at: llvm/lib/IR/AsmWriter.cpp:785
¶void initializeIndexIfNeeded()
void initializeIndexIfNeeded()
Declared at: llvm/lib/IR/AsmWriter.cpp:786
¶llvm::SlotTracker::mdn_iterator mdn_begin()
llvm::SlotTracker::mdn_iterator mdn_begin()
Declared at: llvm/lib/IR/AsmWriter.cpp:768
¶bool mdn_empty() const
bool mdn_empty() const
Declared at: llvm/lib/IR/AsmWriter.cpp:771
¶llvm::SlotTracker::mdn_iterator mdn_end()
llvm::SlotTracker::mdn_iterator mdn_end()
Declared at: llvm/lib/IR/AsmWriter.cpp:769
¶unsigned int mdn_size() const
unsigned int mdn_size() const
Declared at: llvm/lib/IR/AsmWriter.cpp:770
¶void purgeFunction()
void purgeFunction()
Description
After calling incorporateFunction, use this method to remove the most recently incorporated function from the SlotTracker. This will reset the state of the machine back to just the module contents.
Declared at: llvm/lib/IR/AsmWriter.cpp:763