Go to the documentation of this file.
9 #ifndef LLVM_TRANSFORMS_UTILS_GLOBALSTATUS_H
10 #define LLVM_TRANSFORMS_UTILS_GLOBALSTATUS_H
89 #endif // LLVM_TRANSFORMS_UTILS_GLOBALSTATUS_H
This is an optimization pass for GlobalISel generic memory operations.
static bool analyzeGlobal(const Value *V, GlobalStatus &GS)
Look at all uses of the global and fill in the GlobalStatus structure.
const StoreInst * StoredOnceStore
If only one value (besides the initializer constant) is ever stored to this global,...
Value * getStoredOnceValue() const
If only one value (besides the initializer constant) is ever stored to this global return the stored ...
As we analyze each global, keep track of some information about it.
AtomicOrdering Ordering
Set to the strongest atomic ordering requirement.
(vector float) vec_cmpeq(*A, *B) C
bool IsLoaded
True if the global is ever loaded.
bool isSafeToDestroyConstant(const Constant *C)
It is safe to destroy a constant iff it is only used by constants itself.
bool IsCompared
True if the global's address is used in a comparison.
AtomicOrdering
Atomic ordering for LLVM's memory model.
An instruction for storing to memory.
@ Stored
This global is stored to by multiple values or something else that we cannot track.
bool HasMultipleAccessingFunctions
@ InitializerStored
This global is stored to, but the only thing stored is the constant it was initialized with.
const Function * AccessingFunction
These start out null/false.
StoredType
Keep track of what stores to the global look like.
@ StoredOnce
This global is stored to, but only its initializer and one other value is ever stored to it.
Value * getOperand(unsigned i) const
LLVM Value Representation.
@ NotStored
There is no store to this global. It can thus be marked constant.