LLVM API Documentation

Public Types | Public Member Functions
llvm::SlotTracker Class Reference

List of all members.

Public Types

typedef DenseMap< const Value
*, unsigned
ValueMap
 ValueMap - A mapping of Values to slot numbers.
typedef DenseMap< const MDNode
*, unsigned >::iterator 
mdn_iterator
 MDNode map iterators.
typedef DenseMap< AttributeSet,
unsigned >::iterator 
as_iterator
 AttributeSet map iterators.

Public Member Functions

 SlotTracker (const Module *M)
 Construct from a module.
 SlotTracker (const Function *F)
 Construct from a function, starting out in incorp state.
int getLocalSlot (const Value *V)
 getLocalSlot - Get the slot number for a value that is local to a function.
int getGlobalSlot (const GlobalValue *V)
 getGlobalSlot - Get the slot number of a global value.
int getMetadataSlot (const MDNode *N)
 getMetadataSlot - Get the slot number of a MDNode.
int getAttributeGroupSlot (AttributeSet AS)
void incorporateFunction (const Function *F)
const FunctiongetFunction () const
void purgeFunction ()
mdn_iterator mdn_begin ()
mdn_iterator mdn_end ()
unsigned mdn_size () const
bool mdn_empty () const
as_iterator as_begin ()
as_iterator as_end ()
unsigned as_size () const
bool as_empty () const
void initialize ()
 This function does the actual initialization.

Detailed Description

This class provides computation of slot numbers for LLVM Assembly writing.

Definition at line 509 of file AsmWriter.cpp.


Member Typedef Documentation

AttributeSet map iterators.

Definition at line 572 of file AsmWriter.cpp.

MDNode map iterators.

Definition at line 565 of file AsmWriter.cpp.

ValueMap - A mapping of Values to slot numbers.

Definition at line 512 of file AsmWriter.cpp.


Constructor & Destructor Documentation

Construct from a module.

Definition at line 648 of file AsmWriter.cpp.

Construct from a function, starting out in incorp state.

Definition at line 655 of file AsmWriter.cpp.


Member Function Documentation

Definition at line 573 of file AsmWriter.cpp.

bool llvm::SlotTracker::as_empty ( ) const [inline]

Definition at line 576 of file AsmWriter.cpp.

Definition at line 574 of file AsmWriter.cpp.

Definition at line 575 of file AsmWriter.cpp.

Definition at line 810 of file AsmWriter.cpp.

References initialize().

Definition at line 557 of file AsmWriter.cpp.

getGlobalSlot - Get the slot number of a global value.

Definition at line 779 of file AsmWriter.cpp.

References initialize(), and llvm::AArch64CC::MI.

getLocalSlot - Get the slot number for a value that is local to a function.

Return the slot number of the specified value in it's type plane. If something is not in the SlotTracker, return -1.

Definition at line 800 of file AsmWriter.cpp.

References initialize().

getMetadataSlot - Get the slot number of a MDNode.

Definition at line 789 of file AsmWriter.cpp.

References initialize(), and llvm::AArch64CC::MI.

If you'd like to deal with a function instead of just a module, use this method to get its data into the SlotTracker.

Definition at line 552 of file AsmWriter.cpp.

void llvm::SlotTracker::initialize ( ) [inline]

This function does the actual initialization.

< Prevent re-processing next time we're called.

Definition at line 660 of file AsmWriter.cpp.

Definition at line 566 of file AsmWriter.cpp.

bool llvm::SlotTracker::mdn_empty ( ) const [inline]

Definition at line 569 of file AsmWriter.cpp.

Definition at line 567 of file AsmWriter.cpp.

Definition at line 568 of file AsmWriter.cpp.

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.

Clean up after incorporating a function. This is the only way to get out of the function incorporation state that affects get*Slot/Create*Slot. Function incorporation state is indicated by TheFunction != 0.

Definition at line 770 of file AsmWriter.cpp.

References ST_DEBUG.


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