Status of how a global or thread‐local variable is used.

Synopsis

Declared in <llvm/Transforms/Utils/GlobalStatus.h>

struct GlobalStatus;

Description

As we analyze each global or thread‐local variable, 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.

Enums

Name

Description

StoredType

Keep track of what stores to the global look like.

Member Functions

Name

Description

GlobalStatus [constructor]

Construct a default‐initialized GlobalStatus.

getStoredOnceValue

If only one value (besides the initializer constant) is ever stored to this global, return the stored value.

Static Member Functions

Name

Description

analyzeGlobal

Fill in a GlobalStatus from all uses of a global.

Data Members

Name

Description

AccessingFunction

First function that loads or stores this global, or null.

HasMultipleAccessingFunctions

True if more than one function loads or stores this global.

IsCompared

True if the global's address is used in a comparison.

IsLoaded

True if the global is ever loaded. If the global isn't ever loaded it can be deleted.

NumStores

Number of stores to the global.

Ordering

Set to the strongest atomic ordering requirement.

StoredOnceStore

If only one value (besides the initializer constant) is ever stored to this global, keep track of what value it is via the store instruction.

StoredType

Keep track of what stores to the global look like.

Created with MrDocs