LLVM API Documentation
#include <GlobalValue.h>
Inheritance diagram for llvm::GlobalValue:
Public Types | |
enum | LinkageTypes { ExternalLinkage, LinkOnceLinkage, WeakLinkage, AppendingLinkage, InternalLinkage, GhostLinkage } |
Public Member Functions | |
~GlobalValue () | |
bool | use_empty_except_constants () |
Determine if the usage of this global value is empty except for transitively dead constants. | |
const PointerType * | getType () const |
getType - Global values are always pointers. | |
bool | hasExternalLinkage () const |
bool | hasLinkOnceLinkage () const |
bool | hasWeakLinkage () const |
bool | hasAppendingLinkage () const |
bool | hasInternalLinkage () const |
void | setLinkage (LinkageTypes LT) |
LinkageTypes | getLinkage () const |
bool | hasNotBeenReadFromBytecode () const |
virtual bool | isNullValue () const |
virtual void | destroyConstant () |
Override from Constant class. | |
virtual bool | isExternal () const =0 |
Module * | getParent () |
const Module * | getParent () const |
void | removeDeadConstantUsers () |
Static Public Member Functions | |
static bool | classof (const GlobalValue *T) |
static bool | classof (const Value *V) |
Protected Member Functions | |
GlobalValue (const Type *Ty, ValueTy vty, LinkageTypes linkage, const std::string &name="") | |
Protected Attributes | |
LinkageTypes | Linkage |
Module * | Parent |
Definition at line 27 of file GlobalValue.h.
|
Definition at line 30 of file GlobalValue.h. |
|
Definition at line 39 of file GlobalValue.h. |
|
Definition at line 46 of file GlobalValue.h. References removeDeadConstantUsers(). |
|
Reimplemented from llvm::Constant. Reimplemented in llvm::Function, and llvm::GlobalVariable. Definition at line 105 of file GlobalValue.h. References llvm::Value::FunctionVal, llvm::Value::getValueType(), and llvm::Value::GlobalVariableVal. |
|
Reimplemented from llvm::Constant. Definition at line 104 of file GlobalValue.h. |
|
Override from Constant class. Override destroyConstant to make sure it doesn't get called on GlobalValue's because they shouldn't be treated like other constants. Reimplemented from llvm::Constant. Definition at line 66 of file Globals.cpp. References abort(). |
|
Definition at line 68 of file GlobalValue.h. References Linkage. Referenced by llvm::CloneFunction(), getEncodedLinkage(), GetLinkageResult(), LinkAppendingVars(), LinkFunctionProtos(), and LinkGlobals(). |
|
Definition at line 91 of file GlobalValue.h. References Parent. |
|
|
getType - Global values are always pointers.
Reimplemented from llvm::Value. Definition at line 58 of file GlobalValue.h. References llvm::Value::getType(). Referenced by llvm::Interpreter::callExternalFunction(), llvm::SparcV9RegInfo::colorMethodArgs(), llvm::ExecutionEngine::EmitGlobalVariable(), ForceRenaming(), llvm::Function::getFunctionType(), llvm::JIT::getOrEmitGlobalVariable(), llvm::InsertProfilingInitCall(), LinkAppendingVars(), LinkFunctionProtos(), LinkGlobalInits(), LinkGlobals(), OptimizeGlobalAddressOfMalloc(), llvm::BytecodeReader::ParseFunction(), llvm::BytecodeReader::ParseModule(), ProcessGlobalsWithSameName(), ResolveFunctions(), and llvm::SparcV9RegInfo::suggestRegs4MethodArgs(). |
|
Definition at line 65 of file GlobalValue.h. References AppendingLinkage, and Linkage. Referenced by GetLinkageResult(), LinkGlobalInits(), and LinkGlobals(). |
|
Definition at line 62 of file GlobalValue.h. References ExternalLinkage, and Linkage. Referenced by GetLinkageResult(), LinkFunctionProtos(), LinkGlobalInits(), and LinkGlobals(). |
|
Definition at line 66 of file GlobalValue.h. References InternalLinkage, and Linkage. Referenced by ForceRenaming(), llvm::Module::getGlobalVariable(), GetLinkageResult(), InlineCallIfPossible(), LinkFunctionProtos(), LinkGlobals(), maybeAddInternalValueToVector(), and SRAGlobal(). |
|
Definition at line 63 of file GlobalValue.h. References Linkage, and LinkOnceLinkage. Referenced by GetLinkageResult(), LinkFunctionProtos(), and LinkGlobalInits(). |
|
hasNotBeenReadFromBytecode - If a module provider is being used to lazily stream in functions from disk, this method can be used to check to see if the function has been read in yet or not. Unless you are working on the JIT or something else that streams stuff in lazily, you don't need to worry about this. Definition at line 75 of file GlobalValue.h. References GhostLinkage, and Linkage. Referenced by llvm::JIT::getPointerToFunction(). |
|
Definition at line 64 of file GlobalValue.h. References Linkage, and WeakLinkage. Referenced by GetLinkageResult(), LinkFunctionProtos(), and LinkGlobalInits(). |
|
isExternal - Return true if the primary definition of this global value is outside of the current translation unit... Implemented in llvm::Function, and llvm::GlobalVariable. Referenced by GetLinkageResult(), and ProcessGlobalsWithSameName(). |
|
Override from Constant class. No GlobalValue's are null values so this always returns false. Implements llvm::Constant. Definition at line 79 of file GlobalValue.h. |
|
removeDeadConstantUsers - If there are any dead constant users dangling off of this global value, remove them. This method is useful for clients that want to check to see if a global is unused, but don't want to deal with potentially dead constants hanging off of the globals. This method tries to make the global dead. If it detects a user that would prevent it from becoming completely dead, it gives up early, potentially leaving some dead constant users around. Definition at line 53 of file Globals.cpp. References llvm::Value::use_back(), and llvm::Value::use_empty(). Referenced by ~GlobalValue(). |
|
Definition at line 67 of file GlobalValue.h. References Linkage. Referenced by llvm::CloneModule(), llvm::Function::deleteBody(), LinkFunctionProtos(), LinkGlobals(), llvm::BytecodeReader::ParseFunctionBody(), llvm::BytecodeReader::ParseFunctionLazily(), and ParseGlobalVariable(). |
|
Determine if the usage of this global value is empty except for transitively dead constants. If the usage is empty (except transitively dead constants), then this global value can can be safely deleted since the destructor will delete the dead constants as well. |
|
Definition at line 43 of file GlobalValue.h. Referenced by getLinkage(), hasAppendingLinkage(), hasExternalLinkage(), hasInternalLinkage(), hasLinkOnceLinkage(), hasNotBeenReadFromBytecode(), hasWeakLinkage(), and setLinkage(). |
|
Definition at line 44 of file GlobalValue.h. Referenced by getParent(). |