LLVM
8.0.1
|
As we analyze each global, keep track of some information about it. More...
#include "llvm/Transforms/Utils/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) |
Look at all uses of the global and fill in the GlobalStatus structure. More... | |
Public Attributes | |
bool | IsCompared = false |
True if the global's address is used in a comparison. More... | |
bool | IsLoaded = false |
True if the global is ever loaded. More... | |
enum llvm::GlobalStatus::StoredType | StoredType = NotStored |
Value * | StoredOnceValue = nullptr |
If only one value (besides the initializer constant) is ever stored to this global, keep track of what value it is. More... | |
const Function * | AccessingFunction = nullptr |
These start out null/false. More... | |
bool | HasMultipleAccessingFunctions = false |
bool | HasNonInstructionUser = false |
Set to true if this global has a user that is not an instruction (e.g. More... | |
AtomicOrdering | Ordering = AtomicOrdering::NotAtomic |
Set to the strongest atomic ordering requirement. More... | |
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 30 of file GlobalStatus.h.
Keep track of what stores to the global look like.
Definition at line 39 of file GlobalStatus.h.
|
default |
Referenced by analyzeGlobalAux().
|
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 192 of file GlobalStatus.cpp.
References analyzeGlobalAux().
Referenced by processGlobal().
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 65 of file GlobalStatus.h.
Referenced by analyzeGlobalAux(), and processInternalGlobal().
Definition at line 66 of file GlobalStatus.h.
Referenced by analyzeGlobalAux(), and processInternalGlobal().
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 70 of file GlobalStatus.h.
Referenced by analyzeGlobalAux().
True if the global's address is used in a comparison.
Definition at line 32 of file GlobalStatus.h.
Referenced by analyzeGlobalAux(), and processGlobal().
True if the global is ever loaded.
If the global isn't ever loaded it can be deleted.
Definition at line 36 of file GlobalStatus.h.
Referenced by analyzeGlobalAux(), and processInternalGlobal().
AtomicOrdering llvm::GlobalStatus::Ordering = AtomicOrdering::NotAtomic |
Set to the strongest atomic ordering requirement.
Definition at line 73 of file GlobalStatus.h.
Referenced by analyzeGlobalAux(), and processInternalGlobal().
Value* llvm::GlobalStatus::StoredOnceValue = nullptr |
If only one value (besides the initializer constant) is ever stored to this global, keep track of what value it is.
Definition at line 60 of file GlobalStatus.h.
Referenced by analyzeGlobalAux(), and processInternalGlobal().