LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | List of all members
llvm::SlotTracker Class Reference

Public Types

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

Public Member Functions

 SlotTracker (const Module *M)
 Construct from a module. More...
 
 SlotTracker (const Function *F)
 Construct from a function, starting out in incorp state. More...
 
int getLocalSlot (const Value *V)
 getLocalSlot - Get the slot number for a value that is local to a function. More...
 
int getGlobalSlot (const GlobalValue *V)
 getGlobalSlot - Get the slot number of a global value. More...
 
int getMetadataSlot (const MDNode *N)
 getMetadataSlot - Get the slot number of a MDNode. More...
 
int getAttributeGroupSlot (AttributeSet AS)
 
void incorporateFunction (const Function *F)
 
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. More...
 

Detailed Description

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

Definition at line 301 of file AsmWriter.cpp.

Member Typedef Documentation

AttributeSet map iterators.

Definition at line 362 of file AsmWriter.cpp.

MDNode map iterators.

Definition at line 355 of file AsmWriter.cpp.

ValueMap - A mapping of Values to slot numbers.

Definition at line 304 of file AsmWriter.cpp.

Constructor & Destructor Documentation

llvm::SlotTracker::SlotTracker ( const Module M)
explicit

Construct from a module.

Definition at line 438 of file AsmWriter.cpp.

llvm::SlotTracker::SlotTracker ( const Function F)
explicit

Construct from a function, starting out in incorp state.

Definition at line 445 of file AsmWriter.cpp.

Member Function Documentation

as_iterator llvm::SlotTracker::as_begin ( )
inline

Definition at line 363 of file AsmWriter.cpp.

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

Definition at line 366 of file AsmWriter.cpp.

as_iterator llvm::SlotTracker::as_end ( )
inline

Definition at line 364 of file AsmWriter.cpp.

unsigned llvm::SlotTracker::as_size ( ) const
inline

Definition at line 365 of file AsmWriter.cpp.

int llvm::SlotTracker::getAttributeGroupSlot ( AttributeSet  AS)

Definition at line 600 of file AsmWriter.cpp.

References initialize().

int llvm::SlotTracker::getGlobalSlot ( const GlobalValue V)

getGlobalSlot - Get the slot number of a global value.

Definition at line 569 of file AsmWriter.cpp.

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

int llvm::SlotTracker::getLocalSlot ( const Value V)

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 590 of file AsmWriter.cpp.

References initialize().

int llvm::SlotTracker::getMetadataSlot ( const MDNode N)

getMetadataSlot - Get the slot number of a MDNode.

Definition at line 579 of file AsmWriter.cpp.

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

void llvm::SlotTracker::incorporateFunction ( const Function F)
inline

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 344 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 450 of file AsmWriter.cpp.

mdn_iterator llvm::SlotTracker::mdn_begin ( )
inline

Definition at line 356 of file AsmWriter.cpp.

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

Definition at line 359 of file AsmWriter.cpp.

mdn_iterator llvm::SlotTracker::mdn_end ( )
inline

Definition at line 357 of file AsmWriter.cpp.

unsigned llvm::SlotTracker::mdn_size ( ) const
inline

Definition at line 358 of file AsmWriter.cpp.

void llvm::SlotTracker::purgeFunction ( )

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 560 of file AsmWriter.cpp.

References ST_DEBUG.


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