10 #ifndef LLVM_TRANSFORMS_UTILS_GLOBALSTATUS_H 11 #define LLVM_TRANSFORMS_UTILS_GLOBALSTATUS_H 85 #endif // LLVM_TRANSFORMS_UTILS_GLOBALSTATUS_H
bool IsLoaded
True if the global is ever loaded.
Value * StoredOnceValue
If only one value (besides the initializer constant) is ever stored to this global, keep track of what value it is.
const Function * AccessingFunction
These start out null/false.
Atomic ordering constants.
This class represents lattice values for constants.
bool HasMultipleAccessingFunctions
This global is stored to, but the only thing stored is the constant it was initialized with...
StoredType
Keep track of what stores to the global look like.
bool HasNonInstructionUser
Set to true if this global has a user that is not an instruction (e.g.
AtomicOrdering
Atomic ordering for LLVM's memory model.
This global is stored to, but only its initializer and one other value is ever stored to it...
As we analyze each global, keep track of some information about it.
static bool analyzeGlobal(const Value *V, GlobalStatus &GS)
Look at all uses of the global and fill in the GlobalStatus structure.
bool isSafeToDestroyConstant(const Constant *C)
It is safe to destroy a constant iff it is only used by constants itself.
This global is stored to by multiple values or something else that we cannot track.
bool IsCompared
True if the global's address is used in a comparison.
AtomicOrdering Ordering
Set to the strongest atomic ordering requirement.
LLVM Value Representation.
There is no store to this global. It can thus be marked constant.