LLVM API Documentation
#include <Value.h>
Inheritance diagram for llvm::Value:
Public Types | |
typedef UseListIteratorWrapper | use_iterator |
typedef UseListConstIteratorWrapper | use_const_iterator |
enum | ValueTy { ArgumentVal, BasicBlockVal, FunctionVal, GlobalVariableVal, UndefValueVal, ConstantExprVal, ConstantAggregateZeroVal, SimpleConstantVal, InstructionVal, ValueListVal } |
Public Member Functions | |
Value (const Type *Ty, unsigned scid, const std::string &name="") | |
virtual | ~Value () |
virtual void | dump () const |
dump - Support for debugging, callable in GDB: V->dump() | |
virtual void | print (std::ostream &O) const =0 |
const Type * | getType () const |
bool | hasName () const |
const std::string & | getName () const |
virtual void | setName (const std::string &name, SymbolTable *=0) |
void | replaceAllUsesWith (Value *V) |
void | uncheckedReplaceAllUsesWith (Value *V) |
unsigned | use_size () const |
bool | use_empty () const |
use_iterator | use_begin () |
use_const_iterator | use_begin () const |
use_iterator | use_end () |
use_const_iterator | use_end () const |
User * | use_back () |
const User * | use_back () const |
bool | hasOneUse () const |
void | addUse (Use &U) |
void | killUse (Use &U) |
unsigned | getValueType () const |
const Type * | getRawType () const |
Static Public Member Functions | |
static bool | classof (const Value *V) |
Friends | |
class | Instruction |
Definition at line 43 of file Value.h.
|
|
|
|
|
getValueType - Return an ID for the concrete type of this object. This is used to implement the classof checks. This should not be used for any other purpose, as the values may change as LLVM evolves. Also, note that starting with the InstructionVal value, the value stored is actually the Instruction opcode, so there are more than just these values possible here (and Instruction must be last). |
|
Definition at line 33 of file Value.cpp. References llvm::Type::VoidTy. |
|
Definition at line 43 of file Value.cpp. References E, I, and llvm::LeakDetector::removeGarbageObject(). |
|
addUse/killUse - These two methods should only be used by the Use class. Definition at line 114 of file Value.h. Referenced by llvm::Use::set(), and llvm::Use::Use(). |
|
|
dump - Support for debugging, callable in GDB: V->dump()
Definition at line 1245 of file AsmWriter.cpp. References print(). |
|
|
getRawType - This should only be used to implement the vmcore library. |
|
|
|
|
hasOneUse - Return true if there is exactly one user of this value. This is specialized because it is a common request and does not require traversing the whole use list. Definition at line 106 of file Value.h. Referenced by AssociativeOpt(), dyn_castFoldableMul(), FoldBinOpIntoSelect(), isBlockSimpleEnough(), isInsertAndHalf(), isInsertShiftHalf(), isOnlyUse(), NegateValue(), RemoveDeadConstant(), llvm::SimplifyCFG(), and llvm::ValueHandle::~ValueHandle(). |
|
Definition at line 115 of file Value.h. Referenced by llvm::Use::set(), and llvm::Use::~Use(). |
|
print - Implement operator<< on Value... Implemented in llvm::Argument, llvm::BasicBlock, llvm::Constant, llvm::Function, llvm::GlobalVariable, llvm::Instruction, and llvm::BytecodeReader::ValueList. Referenced by dump(), llvm::operator<<(), and llvm::BytecodeReader::ValueList::print(). |
|
replaceAllUsesWith - Go through the uses list for this definition and make each use point to "V" instead of "this". After this completes, 'this's use list is guaranteed to be empty. Definition at line 87 of file Value.cpp. References getType(), and uncheckedReplaceAllUsesWith(). Referenced by AssociativeOpt(), llvm::DecomposeArrayRef(), FindPHIToPartitionLoops(), HoistThenElseCodeToIf(), llvm::InlineFunction(), LinkAppendingVars(), LinkGlobals(), llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(), OptimizeGlobalAddressOfMalloc(), llvm::PHINode::removeIncomingValue(), llvm::BasicBlock::removePredecessor(), ReplaceCallWith(), llvm::ReplaceInstWithValue(), llvm::ConstantExpr::replaceUsesOfWithOnConstant(), llvm::ConstantPacked::replaceUsesOfWithOnConstant(), llvm::ConstantStruct::replaceUsesOfWithOnConstant(), llvm::ConstantArray::replaceUsesOfWithOnConstant(), ResolveDefinitions(), ResolveFunctions(), llvm::SimplifyCFG(), and SRAGlobal(). |
|
Reimplemented in llvm::Argument, llvm::BasicBlock, llvm::Constant, llvm::Function, llvm::GlobalVariable, and llvm::Instruction. Definition at line 73 of file Value.h. Referenced by llvm::BytecodeReader::ParseSymbolTable(), llvm::Function::renameLocalSymbols(), llvm::ReplaceInstWithValue(), llvm::Instruction::setName(), llvm::GlobalVariable::setName(), llvm::Function::setName(), llvm::Argument::setName(), llvm::BasicBlock::setName(), setValueName(), and llvm::SymbolTable::strip(). |
|
|
|
|
Definition at line 99 of file Value.h. Referenced by llvm::DemoteRegToStack(), llvm::Constant::destroyConstantImpl(), OptimizeGlobalAddressOfMalloc(), llvm::GlobalValue::removeDeadConstantUsers(), and SRAGlobal(). |
|
|
|
|
|
|
|
|
Definition at line 93 of file Value.h. Referenced by llvm::ConvertExpressionToType(), llvm::ConvertValueToNewType(), ResolveFunctions(), and SRAGlobal(). |
|
Reimplemented in llvm::Instruction. |