LLVM API Documentation
#include <GlobalStatus.h>
Public Types | |
enum | StoredType { NotStored, InitializerStored, StoredOnce, Stored } |
Keep track of what stores to the global look like. More... | |
Public Member Functions | |
GlobalStatus () | |
Static Public Member Functions | |
static bool | analyzeGlobal (const Value *V, GlobalStatus &GS) |
Public Attributes | |
bool | IsCompared |
True if the global's address is used in a comparison. | |
bool | IsLoaded |
enum llvm::GlobalStatus::StoredType | StoredType |
Value * | StoredOnceValue |
const Function * | AccessingFunction |
bool | HasMultipleAccessingFunctions |
bool | HasNonInstructionUser |
AtomicOrdering | Ordering |
Set to the strongest atomic ordering requirement. |
As we analyze each global, keep track of some information about it. If we find out that the address of the global is taken, none of this info will be accurate.
Definition at line 28 of file GlobalStatus.h.
Keep track of what stores to the global look like.
Definition at line 37 of file GlobalStatus.h.
Definition at line 180 of file GlobalStatus.cpp.
bool GlobalStatus::analyzeGlobal | ( | const Value * | V, |
GlobalStatus & | GS | ||
) | [static] |
Look at all uses of the global and fill in the GlobalStatus structure. If the global has its address taken, return true to indicate we can't do anything with it.
Definition at line 175 of file GlobalStatus.cpp.
References analyzeGlobalAux().
Referenced by llvm::canBeOmittedFromSymbolTable().
These start out null/false. When the first accessing function is noticed, it is recorded. When a second different accessing function is noticed, HasMultipleAccessingFunctions is set to true.
Definition at line 63 of file GlobalStatus.h.
Referenced by analyzeGlobalAux().
Definition at line 64 of file GlobalStatus.h.
Referenced by analyzeGlobalAux().
Set to true if this global has a user that is not an instruction (e.g. a constant expr or GV initializer).
Definition at line 68 of file GlobalStatus.h.
Referenced by analyzeGlobalAux().
True if the global's address is used in a comparison.
Definition at line 30 of file GlobalStatus.h.
Referenced by analyzeGlobalAux(), and llvm::canBeOmittedFromSymbolTable().
True if the global is ever loaded. If the global isn't ever loaded it can be deleted.
Definition at line 34 of file GlobalStatus.h.
Referenced by analyzeGlobalAux().
Set to the strongest atomic ordering requirement.
Definition at line 71 of file GlobalStatus.h.
Referenced by analyzeGlobalAux().
If only one value (besides the initializer constant) is ever stored to this global, keep track of what value it is.
Definition at line 58 of file GlobalStatus.h.
Referenced by analyzeGlobalAux().