LLVM API Documentation
Collaboration diagram for llvm::SlotMachine:
Public Types | |
Types | |
typedef std::map< const Value *, unsigned > | ValueMap |
A mapping of Values to slot numbers. | |
typedef std::map< const Type *, unsigned > | TypeMap |
typedef std::map< const Type *, ValuePlane > | TypedPlanes |
The map of planes by Type. | |
Public Member Functions | |
Constructors | |
SlotMachine (const Module *M) | |
Construct from a module. | |
SlotMachine (const Function *F) | |
Construct from a function, starting out in incorp state. | |
Accessors | |
int | getSlot (const Value *V) |
int | getSlot (const Type *Ty) |
bool | hasSlot (const Value *V) |
Determine if a Value has a slot or not. | |
bool | hasSlot (const Type *Ty) |
Mutators | |
void | incorporateFunction (const Function *F) |
void | purgeFunction () |
Public Attributes | |
Data | |
const Module * | TheModule |
The module for which we are holding slot numbers. | |
const Function * | TheFunction |
The function for which we are holding slot numbers. | |
bool | FunctionProcessed |
TypedPlanes | mMap |
The TypePlanes map for the module level data. | |
TypePlane | mTypes |
TypedPlanes | fMap |
The TypePlanes map for the function level data. | |
TypePlane | fTypes |
Classes | |
struct | TypePlane |
struct | ValuePlane |
A plane with next slot number and ValueMap. More... |
This class provides computation of slot numbers for LLVM Assembly writing.
Definition at line 38 of file AsmWriter.cpp.
|
The map of planes by Type.
Definition at line 63 of file AsmWriter.cpp. |
|
Definition at line 46 of file AsmWriter.cpp. |
|
A mapping of Values to slot numbers.
Definition at line 45 of file AsmWriter.cpp. |
|
Construct from a module.
Definition at line 1307 of file AsmWriter.cpp. |
|
Construct from a function, starting out in incorp state.
Definition at line 1320 of file AsmWriter.cpp. |
|
Get the slot number for a value. This function will assert if you ask for a Value that hasn't previously been inserted with createSlot. Types are forbidden because Type does not inherit from Value (any more). Definition at line 1462 of file AsmWriter.cpp. References fTypes, llvm::SlotMachine::TypePlane::map, mTypes, llvm::SlotMachine::TypePlane::next_slot, and TheFunction. |
|
Return the slot number of the specified value in it's type plane. Its an error to ask for something not in the SlotMachine. Its an error to ask for a Type* Definition at line 1401 of file AsmWriter.cpp. References fMap, mMap, and TheFunction. Referenced by WriteAsOperandInternal(). |
|
|
|
Determine if a Value has a slot or not.
|
|
If you'd like to deal with a function instead of just a module, use this method to get its data into the SlotMachine. Definition at line 95 of file AsmWriter.cpp. References FunctionProcessed, and TheFunction. |
|
After calling incorporateFunction, use this method to remove the most recently incorporated function from the SlotMachine. This will reset the state of the machine back to just the module contents. Definition at line 1389 of file AsmWriter.cpp. References llvm::SlotMachine::TypePlane::clear(), fMap, fTypes, FunctionProcessed, SC_DEBUG, and TheFunction. |
|
The TypePlanes map for the function level data.
Definition at line 151 of file AsmWriter.cpp. Referenced by getSlot(), and purgeFunction(). |
|
Definition at line 152 of file AsmWriter.cpp. Referenced by getSlot(), and purgeFunction(). |
|
Definition at line 144 of file AsmWriter.cpp. Referenced by incorporateFunction(), and purgeFunction(). |
|
The TypePlanes map for the module level data.
Definition at line 147 of file AsmWriter.cpp. Referenced by getSlot(). |
|
Definition at line 148 of file AsmWriter.cpp. Referenced by getSlot(). |
|
The function for which we are holding slot numbers.
Definition at line 143 of file AsmWriter.cpp. Referenced by getSlot(), incorporateFunction(), and purgeFunction(). |
|
The module for which we are holding slot numbers.
Definition at line 140 of file AsmWriter.cpp. |