LLVM: include/llvm/Transforms/Utils/GlobalStatus.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9#ifndef LLVM_TRANSFORMS_UTILS_GLOBALSTATUS_H
10#define LLVM_TRANSFORMS_UTILS_GLOBALSTATUS_H
11
14
15namespace llvm {
16
20
21
22
23
24
26
27
28
29
31
33
34
35
37
38
40
41
43
45
46
47
49
50
51
52
53
55
56
57
60
61
62
64
65
66
72
73
74
75
78
79
81
83
84
85
86
88};
89
90}
91
92#endif
Atomic ordering constants.
This is an important base class in LLVM.
An instruction for storing to memory.
LLVM Value Representation.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
bool isSafeToDestroyConstant(const Constant *C)
It is safe to destroy a constant iff it is only used by constants itself.
AtomicOrdering
Atomic ordering for LLVM's memory model.
bool IsLoaded
True if the global is ever loaded.
Definition GlobalStatus.h:36
AtomicOrdering Ordering
Set to the strongest atomic ordering requirement.
Definition GlobalStatus.h:80
bool HasMultipleAccessingFunctions
Definition GlobalStatus.h:77
unsigned NumStores
Number of stores to the global.
Definition GlobalStatus.h:39
const StoreInst * StoredOnceStore
If only one value (besides the initializer constant) is ever stored to this global,...
Definition GlobalStatus.h:63
bool IsCompared
True if the global's address is used in a comparison.
Definition GlobalStatus.h:32
Value * getStoredOnceValue() const
If only one value (besides the initializer constant) is ever stored to this global return the stored ...
Definition GlobalStatus.h:67
const Function * AccessingFunction
These start out null/false.
Definition GlobalStatus.h:76
StoredType
Keep track of what stores to the global look like.
Definition GlobalStatus.h:42
@ Stored
This global is stored to by multiple values or something else that we cannot track.
Definition GlobalStatus.h:58
@ InitializerStored
This global is stored to, but the only thing stored is the constant it was initialized with.
Definition GlobalStatus.h:48
@ NotStored
There is no store to this global. It can thus be marked constant.
Definition GlobalStatus.h:44
@ StoredOnce
This global is stored to, but only its initializer and one other value is ever stored to it.
Definition GlobalStatus.h:54
static bool analyzeGlobal(const Value *V, GlobalStatus &GS)
Look at all uses of the global and fill in the GlobalStatus structure.