LLVM API Documentation

GlobalStatus Struct Reference

Collaboration diagram for GlobalStatus:

Collaboration graph
[legend]
List of all members.

Public Types

enum  StoredType { NotStored, isInitializerStored, isStoredOnce, isStored }

Public Member Functions

 GlobalStatus ()

Public Attributes

bool isLoaded
enum GlobalStatus::StoredType StoredType
ValueStoredOnceValue
FunctionAccessingFunction
bool HasMultipleAccessingFunctions
bool HasNonInstructionUser
bool isNotSuitableForSRA

Detailed Description

GlobalStatus - 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 74 of file GlobalOpt.cpp.


Member Enumeration Documentation

enum GlobalStatus::StoredType

StoredType - Keep track of what stores to the global look like.

Enumerator:
NotStored  NotStored - There is no store to this global. It can thus be marked constant.
isInitializerStored  isInitializerStored - This global is stored to, but the only thing stored is the constant it was initialized with. This is only tracked for scalar globals.
isStoredOnce  isStoredOnce - This global is stored to, but only its initializer and one other value is ever stored to it. If this global isStoredOnce, we track the value stored to it in StoredOnceValue below. This is only tracked for scalar globals.
isStored  isStored - This global is stored to by multiple values or something else that we cannot track.

Definition at line 81 of file GlobalOpt.cpp.


Constructor & Destructor Documentation

GlobalStatus::GlobalStatus (  )  [inline]

Definition at line 122 of file GlobalOpt.cpp.


Member Data Documentation

bool GlobalStatus::isLoaded

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

Definition at line 77 of file GlobalOpt.cpp.

enum GlobalStatus::StoredType GlobalStatus::StoredType

StoredType - Keep track of what stores to the global look like.

Value* GlobalStatus::StoredOnceValue

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

Definition at line 104 of file GlobalOpt.cpp.

Function* GlobalStatus::AccessingFunction

Definition at line 110 of file GlobalOpt.cpp.

bool GlobalStatus::HasMultipleAccessingFunctions

Definition at line 111 of file GlobalOpt.cpp.

bool GlobalStatus::HasNonInstructionUser

Definition at line 115 of file GlobalOpt.cpp.

Referenced by AnalyzeGlobal().

bool GlobalStatus::isNotSuitableForSRA

isNotSuitableForSRA - Keep track of whether any SRA preventing users of the global exist. Such users include GEP instruction with variable indexes, and non-gep/load/store users like constant expr casts.

Definition at line 120 of file GlobalOpt.cpp.

Referenced by AnalyzeGlobal().


The documentation for this struct was generated from the following file: