LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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
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 61 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 68 of file GlobalOpt.cpp.


Constructor & Destructor Documentation

GlobalStatus::GlobalStatus  )  [inline]
 

Definition at line 98 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 64 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 96 of file GlobalOpt.cpp.

Referenced by AnalyzeGlobal().

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

Referenced by AnalyzeGlobal().

enum GlobalStatus::StoredType GlobalStatus::StoredType
 

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

Referenced by AnalyzeGlobal().


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