LLVM API Documentation

Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends
llvm::Value Class Reference

LLVM Value Representation. More...

#include <Value.h>

Inheritance diagram for llvm::Value:
Inheritance graph
[legend]
Collaboration diagram for llvm::Value:
Collaboration graph
[legend]

List of all members.

Public Types

enum  ValueTy {
  ArgumentVal, BasicBlockVal, FunctionVal, GlobalAliasVal,
  GlobalVariableVal, UndefValueVal, BlockAddressVal, ConstantExprVal,
  ConstantAggregateZeroVal, ConstantDataArrayVal, ConstantDataVectorVal, ConstantIntVal,
  ConstantFPVal, ConstantArrayVal, ConstantStructVal, ConstantVectorVal,
  ConstantPointerNullVal, MDNodeVal, MDStringVal, InlineAsmVal,
  PseudoSourceValueVal, FixedStackPseudoSourceValueVal, InstructionVal, ConstantFirstVal = FunctionVal,
  ConstantLastVal = ConstantPointerNullVal
}
typedef value_use_iterator< Useruse_iterator
typedef value_use_iterator
< const User
const_use_iterator

Public Member Functions

virtual ~Value ()
void dump () const
 dump - Support for debugging, callable in GDB: V->dump()
void print (raw_ostream &O, AssemblyAnnotationWriter *AAW=0) const
TypegetType () const
LLVMContextgetContext () const
 All values hold a context through their type.
bool hasName () const
ValueNamegetValueName () const
void setValueName (ValueName *VN)
StringRef getName () const
void setName (const Twine &Name)
void takeName (Value *V)
void replaceAllUsesWith (Value *V)
bool use_empty () const
use_iterator use_begin ()
const_use_iterator use_begin () const
use_iterator use_end ()
const_use_iterator use_end () const
Useruse_back ()
const Useruse_back () const
bool hasOneUse () const
bool hasNUses (unsigned N) const
bool hasNUsesOrMore (unsigned N) const
bool isUsedInBasicBlock (const BasicBlock *BB) const
unsigned getNumUses () const
void addUse (Use &U)
unsigned getValueID () const
unsigned getRawSubclassOptionalData () const
void clearSubclassOptionalData ()
bool hasSameSubclassOptionalData (const Value *V) const
void intersectOptionalDataWith (const Value *V)
bool hasValueHandle () const
ValuestripPointerCasts ()
 This method strips off any unneeded pointer casts, all-zero GEPs and aliases from the specified value, returning the original uncasted value. If this is called on a non-pointer value, it returns 'this'.
const ValuestripPointerCasts () const
ValuestripPointerCastsNoFollowAliases ()
 This method strips off any unneeded pointer casts and all-zero GEPs from the specified value, returning the original uncasted value. If this is called on a non-pointer value, it returns 'this'.
const ValuestripPointerCastsNoFollowAliases () const
ValuestripInBoundsConstantOffsets ()
const ValuestripInBoundsConstantOffsets () const
ValuestripInBoundsOffsets ()
const ValuestripInBoundsOffsets () const
bool isDereferenceablePointer () const
ValueDoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB)
const ValueDoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const
void mutateType (Type *Ty)

Static Public Attributes

static const unsigned MaximumAlignment = 1u << 29

Protected Member Functions

virtual void printCustom (raw_ostream &O) const
 Value (Type *Ty, unsigned scid)
unsigned short getSubclassDataFromValue () const
void setValueSubclassData (unsigned short D)

Protected Attributes

unsigned char SubclassOptionalData: 7

Friends

class ValueSymbolTable
class ValueHandleBase

Detailed Description

LLVM Value Representation.

This is a very important LLVM class. It is the base class of all values computed by a program that may be used as operands to other values. Value is the super class of other important classes such as Instruction and Function. All Values have a Type. Type is not a subclass of Value. Some values can have a name and they belong to some Module. Setting the name on the Value automatically updates the module's symbol table.

Every value has a "use list" that keeps track of which other Values are using this Value. A Value can also have an arbitrary number of ValueHandle objects that watch it and listen to RAUW and Destroy events. See llvm/Support/ValueHandle.h for details.

Definition at line 63 of file Value.h.


Member Typedef Documentation

Definition at line 144 of file Value.h.

Definition at line 143 of file Value.h.


Member Enumeration Documentation

An enumeration for keeping track of the concrete subclass of Value that is actually instantiated. Values of this enumeration are kept in the Value classes SubclassID field. They are used for concrete type identification.

Enumerator:
ArgumentVal 
BasicBlockVal 
FunctionVal 
GlobalAliasVal 
GlobalVariableVal 
UndefValueVal 
BlockAddressVal 
ConstantExprVal 
ConstantAggregateZeroVal 
ConstantDataArrayVal 
ConstantDataVectorVal 
ConstantIntVal 
ConstantFPVal 
ConstantArrayVal 
ConstantStructVal 
ConstantVectorVal 
ConstantPointerNullVal 
MDNodeVal 
MDStringVal 
InlineAsmVal 
PseudoSourceValueVal 
FixedStackPseudoSourceValueVal 
InstructionVal 
ConstantFirstVal 
ConstantLastVal 

Definition at line 188 of file Value.h.


Constructor & Destructor Documentation

Value::Value ( Type Ty,
unsigned  scid 
) [protected]
Value::~Value ( ) [virtual]

Member Function Documentation

void llvm::Value::addUse ( Use U) [inline]

addUse - This method should only be used by the Use class.

Definition at line 182 of file Value.h.

Referenced by llvm::Use::set(), and llvm::Use::swap().

void llvm::Value::clearSubclassOptionalData ( ) [inline]

clearSubclassOptionalData - Clear the optional flags contained in this value.

Definition at line 243 of file Value.h.

References SubclassOptionalData.

Referenced by ClearSubclassDataAfterReassociation().

Value * Value::DoPHITranslation ( const BasicBlock CurBB,
const BasicBlock PredBB 
)

DoPHITranslation - If this value is a PHI node with CurBB as its parent, return the value in the PHI node corresponding to PredBB. If not, return ourself. This is useful if you want to know the value something has in a predecessor block.

Definition at line 472 of file Value.cpp.

References llvm::dyn_cast(), llvm::PHINode::getIncomingValueForBlock(), and llvm::Instruction::getParent().

Referenced by DoPHITranslation().

const Value* llvm::Value::DoPHITranslation ( const BasicBlock CurBB,
const BasicBlock PredBB 
) const [inline]

Definition at line 309 of file Value.h.

References DoPHITranslation().

void Value::dump ( ) const
LLVMContext & Value::getContext ( ) const

All values hold a context through their type.

Reimplemented in llvm::Function, and llvm::BasicBlock.

Definition at line 480 of file Value.cpp.

References llvm::Type::getContext().

Referenced by llvm::CallInst::addAttribute(), llvm::InvokeInst::addAttribute(), AddOne(), AddWithOverflow(), AppendMDNodeToInstForPtr(), AppendMDNodeToSourcePtr(), llvm::SelectInst::areInvalidOperands(), BitCastConstantVector(), CanShareConstantPoolEntry(), changeToUnreachable(), llvm::FenceInst::clone_impl(), llvm::UnreachableInst::clone_impl(), CollectInsertionElements(), CollectShuffleElements(), CollectSingleShuffleElements(), llvm::ComputeMultiple(), llvm::FunctionLoweringInfo::ComputePHILiveOutRegInfo(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldInsertElementInstruction(), llvm::ConstantFoldLoadFromConstPtr(), llvm::ConstantFoldShuffleVectorInstruction(), llvm::SelectionDAGBuilder::CopyValueToVirtualRegister(), llvm::ARMConstantPoolConstant::Create(), decomposeBitTestICmp(), llvm::MDNode::deleteTemporary(), llvm::ConstantAggregateZero::destroyConstant(), llvm::ConstantPointerNull::destroyConstant(), llvm::ConstantDataSequential::destroyConstant(), llvm::UndefValue::destroyConstant(), llvm::EmitGEPOffset(), EvaluateGEPOffsetExpression(), ExtractConstantBytes(), llvm::FindAllocaDbgDeclare(), FitsInFPType(), llvm::InstCombiner::FoldAndOfFCmps(), FoldBitCast(), llvm::FoldBranchToCommonDest(), llvm::InstCombiner::FoldCmpLoadFromIndexedGlobal(), llvm::InstCombiner::FoldFCmp_IntToFP_Cst(), llvm::InstCombiner::FoldGEPICmp(), llvm::InstCombiner::FoldICmpAddOpCst(), llvm::InstCombiner::FoldICmpDivCst(), llvm::InstCombiner::FoldICmpShrCst(), llvm::InstCombiner::FoldOrOfFCmps(), llvm::InstCombiner::FoldOrOfICmps(), FoldReinterpretLoadFromConstPtr(), llvm::InstCombiner::FoldShiftByConstant(), GatherConstantCompares(), llvm::DebugLoc::get(), llvm::ConstantArray::get(), llvm::ConstantVector::get(), llvm::ConstantExpr::get(), llvm::DebugLoc::getAsMDNode(), llvm::LazyValueInfo::getConstant(), llvm::LazyValueInfo::getConstantOnEdge(), getEdgeValueLocal(), llvm::ConstantDataSequential::getElementAsConstant(), llvm::ConstantExpr::getExtractElement(), llvm::ConstantExpr::getFCmp(), getFCmpValue(), llvm::ConstantExpr::getGetElementPtr(), llvm::ConstantExpr::getICmp(), llvm::ConstantExpr::getInsertElement(), llvm::MDNode::getMostGenericRange(), llvm::MDNode::getMostGenericTBAA(), llvm::getObjectSize(), llvm::FastISel::getRegForValue(), llvm::ConstantExpr::getSelect(), GetShiftedValue(), llvm::ConstantDataVector::getSplat(), llvm::ConstantStruct::getTypeForElements(), HandleByValArgument(), IdxCompare(), llvm::InlineFunction(), llvm::DIBuilder::insertDbgValueIntrinsic(), llvm::DIBuilder::insertDeclare(), InstallGlobalCtors(), InstCombineLoadCast(), InstCombineStoreToCast(), llvm::isAllocaPromotable(), llvm::isBytewiseValue(), LLVMAddAttribute(), LLVMRemoveAttribute(), LLVMSetParamAlignment(), LookThroughFPExtensions(), nvptx::LowerConstant(), lowerConstant(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::MapValue(), llvm::MergeBasicBlockIntoOnlyPred(), llvm::IntItem::operator<<=(), OptimizeGlobalAddressOfMalloc(), OptimizeNoopCopyExpression(), OptimizeVectorResize(), PerformHeapAllocSRoA(), llvm::DIVariable::printExtendedName(), ProcessUGT_ADDCST_ADD(), ReadDataFromGlobal(), llvm::CallInst::removeAttribute(), llvm::InvokeInst::removeAttribute(), llvm::replaceDbgDeclareForAlloca(), ReplaceFPIntrinsicWithCall(), llvm::ConstantStruct::replaceUsesOfWithOnConstant(), llvm::BlockAddress::replaceUsesOfWithOnConstant(), llvm::Instruction::setMetadata(), setName(), SimplifyBranchOnICmpChain(), SimplifyCondBranchToCondBranch(), SimplifyICmpInst(), SimplifyTerminatorOnSelect(), llvm::SplitCriticalEdge(), SRAGlobal(), stripAndComputeConstantOffsets(), SubOne(), SubWithOverflow(), SymbolicallyEvaluateGEP(), TryToOptimizeStoreOfMallocToGlobal(), TryToShrinkGlobalToBoolean(), TryToSimplifyUncondBranchWithICmpInIt(), TurnSwitchRangeIntoICmp(), llvm::UpgradeIntrinsicCall(), llvm::ValueHandleBase::ValueIsDeleted(), llvm::ValueHandleBase::ValueIsRAUWd(), llvm::InstCombiner::visitAllocaInst(), llvm::InstCombiner::visitAllocSite(), llvm::InstCombiner::visitBitCast(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitExtractElementInst(), llvm::InstCombiner::visitFree(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), llvm::InstCombiner::visitIntToPtr(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitPtrToInt(), llvm::Interpreter::visitReturnInst(), llvm::InstCombiner::visitShuffleVectorInst(), llvm::InstCombiner::visitXor(), llvm::IntItem::withImplLikeThis(), and WriteMDNode().

StringRef Value::getName ( ) const

getName() - Return a constant reference to the value's name. This is cheap and guaranteed to return the same reference as long as the value is not modified.

Definition at line 167 of file Value.cpp.

References llvm::StringMapEntry< ValueTy >::getKey().

Referenced by llvm::ProfileInfoT< FType, BType >::addExecutionCount(), llvm::ExecutionEngine::addGlobalMapping(), llvm::X86FrameLowering::adjustForHiPEPrologue(), AppendMDNodeToSourcePtr(), assureFPCallStub(), llvm::MDString::begin(), llvm::Interpreter::callExternalFunction(), llvm::canConstantFoldCallTo(), CanPropagatePredecessorsForPHIs(), llvm::CloneBasicBlock(), llvm::CloneFunction(), llvm::InstCombiner::commonShiftTransforms(), ConnectProlog(), llvm::ConstantFoldCall(), ConstructSSAForLoadSet(), copyGVAttributes(), createFPFnStub(), llvm::DemotePHIToStack(), llvm::DemoteRegToStack(), llvm::DISubprogram::describes(), llvm::InstCombiner::DoOneIteration(), llvm::dumpBlock(), llvm::ARMJITInfo::emitFunctionStub(), llvm::EmitGEPOffset(), llvm::ExecutionEngine::emitGlobals(), llvm::AsmPrinter::EmitSpecialLLVMGlobal(), llvm::MDString::end(), EvaluateStaticConstructor(), llvm::ExtractTypeInfo(), llvm::SimplifyFortifiedLibCalls::fold(), llvm::InstCombiner::FoldAndOfICmps(), FoldBlockIntoPredecessor(), llvm::FoldBranchToCommonDest(), FoldCondBranchOnPHI(), llvm::InstCombiner::FoldICmpShrCst(), FoldOperationIntoSelectOperand(), llvm::InstCombiner::FoldOrOfICmps(), llvm::InstCombiner::FoldSelectOpOp(), llvm::InstCombiner::FoldShiftByConstant(), FoldTwoEntryPHINode(), forceRenaming(), GenerateARCAnnotation(), GenerateARCBBEntranceAnnotation(), GenerateARCBBTerminatorAnnotation(), getAllocationData(), llvm::DOTGraphTraits< const Function * >::getCompleteNodeLabel(), llvm::TargetLoweringObjectFileMachO::getExplicitSectionGlobal(), getFirst(), llvm::getFnSpecificMDNode(), llvm::MachineBasicBlock::getFullName(), llvm::objcarc::GetFunctionClass(), llvm::LibCallInfo::getFunctionInfo(), llvm::DOTGraphTraits< const Function * >::getGraphName(), llvm::InlineCostAnalysis::getInlineCost(), llvm::getInst(), getIntrinsicIDForCall(), llvm::MDString::getLength(), llvm::MachineFunction::getName(), llvm::Region::getNameStr(), llvm::Mangler::getNameWithPrefix(), llvm::JIT::getOrEmitGlobalVariable(), llvm::getOrInsertFnSpecificMDNode(), llvm::MCJIT::getPointerToFunction(), llvm::JIT::getPointerToFunction(), llvm::getSamplerName(), llvm::DOTGraphTraits< const Function * >::getSimpleNodeLabel(), llvm::MDString::getString(), llvm::getSurfaceName(), llvm::getTextureName(), GlobalWasGeneratedByAsan(), HandleByValArgument(), HandleCallsInBlockInlinedThroughInvoke(), hasMemoryWrite(), HoistThenElseCodeToIf(), INITIALIZE_PASS(), llvm::InlineFunction(), llvm::InsertPreheaderForLoop(), InstCombineLoadCast(), InstCombineStoreToCast(), llvm::isFreeCall(), llvm::BlackList::isIn(), llvm::BlackList::isInInit(), llvm::Function::isIntrinsic(), llvm::LoadAndStorePromoter::LoadAndStorePromoter(), lookupFunction(), llvm::LibCallSimplifierImpl::lookupOptimization(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::IntrinsicLowering::LowerToByteSwap(), NegateValue(), llvm::operator<<(), OptimizeGlobalAddressOfMalloc(), PerformHeapAllocSRoA(), llvm::ValueEnumerator::print(), llvm::Trace::print(), llvm::SparseSolver::Print(), llvm::ARMConstantPoolConstant::print(), llvm::CallGraphNode::print(), llvm::AssemblyWriter::printBasicBlock(), llvm::BranchProbabilityInfo::printEdgeProbability(), PrintLLVMName(), ProcessUGT_ADDCST_ADD(), RecognizePersonality(), llvm::ProfileInfoT< FType, BType >::removeBlock(), llvm::ProfileInfoT< FType, BType >::repair(), llvm::ProfileInfoT< FType, BType >::replaceAllUses(), ReplaceCallWith(), ReplaceUsesOfMallocWithGlobal(), RewriteHeapSROALoadUser(), RewriteUsesOfClonedInstructions(), llvm::DOTGraphTraitsViewer< Analysis, Simple >::runOnFunction(), llvm::DOTGraphTraitsPrinter< Analysis, Simple >::runOnFunction(), llvm::LPPassManager::runOnFunction(), llvm::RGPassManager::runOnFunction(), llvm::FPPassManager::runOnFunction(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::Inliner::runOnSCC(), llvm::VLIWMachineScheduler::schedule(), llvm::FastISel::SelectInstruction(), llvm::BranchProbabilityInfo::setEdgeWeight(), llvm::ProfileInfoT< FType, BType >::setExecutionCount(), setName(), SimplifyCondBranchToCondBranch(), SinkThenElseCodeToEnd(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), SpeculativelyExecuteBB(), llvm::SplitBlock(), llvm::ProfileInfoT< FType, BType >::splitBlock(), llvm::SplitBlockPredecessors(), llvm::SplitCriticalEdge(), llvm::SplitLandingPadPredecessors(), SRAGlobal(), StripSymtab(), llvm::ProfileInfoT< FType, BType >::transfer(), tryToMakeAllocaBePromotable(), TryToOptimizeStoreOfMallocToGlobal(), TryToShrinkGlobalToBoolean(), TurnSwitchRangeIntoICmp(), llvm::UnrollLoop(), UpdatePHINodes(), llvm::UpgradeIntrinsicCall(), UpgradeIntrinsicFunction1(), UpgradeSSE41Function(), usedInGlobalVarDef(), llvm::ValueHandleBase::ValueIsDeleted(), llvm::ValueHandleBase::ValueIsRAUWd(), llvm::Function::viewCFGOnly(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAllocaInst(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitExtractElementInst(), llvm::InstCombiner::visitFCmpInst(), llvm::InstCombiner::visitFPTrunc(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitICmpInstWithCastAndCast(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitSDiv(), llvm::InstCombiner::visitSelectInst(), llvm::InstCombiner::visitSExt(), llvm::InstCombiner::visitSRem(), llvm::InstCombiner::visitTrunc(), llvm::InstCombiner::visitXor(), llvm::InstCombiner::visitZExt(), and ~Value().

unsigned Value::getNumUses ( ) const

getNumUses - This method computes the number of uses of this Value. This is a linear time operation. Use hasOneUse, hasNUses, or hasNUsesOrMore to check for specific values.

getNumUses - This method computes the number of uses of this Value. This is a linear time operation. Use hasOneUse or hasNUses to check for specific values.

Definition at line 139 of file Value.cpp.

References use_begin(), and use_end().

unsigned llvm::Value::getRawSubclassOptionalData ( ) const [inline]

getRawSubclassOptionalData - Return the raw optional flags value contained in this value. This should only be used when testing two Values for equivalence.

Definition at line 237 of file Value.h.

References SubclassOptionalData.

Referenced by llvm::ConstantKeyData< ConstantExpr >::getValType().

unsigned short llvm::Value::getSubclassDataFromValue ( ) const [inline, protected]
Type* llvm::Value::getType ( ) const [inline]

All values are typed, get the type of this value.

Reimplemented in llvm::ShuffleVectorInst, llvm::InsertElementInst, llvm::GetElementPtrInst, llvm::ConstantDataVector, llvm::ConstantDataArray, llvm::ConstantDataSequential, llvm::ConstantPointerNull, llvm::ConstantVector, llvm::ConstantStruct, llvm::ConstantArray, llvm::ConstantInt, llvm::GlobalValue, llvm::AllocaInst, and llvm::InlineAsm.

Definition at line 108 of file Value.h.

Referenced by llvm::AliasSetTracker::add(), llvm::SSAUpdater::AddAvailableValue(), llvm::PHINode::addIncoming(), AddOne(), llvm::IVUsers::AddUsersImpl(), AddWithOverflow(), AnalyzeLoadFromClobberingLoad(), AnalyzeLoadFromClobberingStore(), llvm::SelectInst::areInvalidOperands(), BitCastConstantVector(), BreakUpSubtract(), BuildConstantFromSCEV(), BuildSubAggregate(), CanCoerceMustAliasedValueToLoad(), CanEvaluateSExtd(), CanEvaluateShifted(), CanEvaluateTruncated(), CanEvaluateZExtd(), CanShareConstantPoolEntry(), canTrapImpl(), llvm::CastInst::castIsValid(), CheapToScalarize(), llvm::FPMathOperator::classof(), llvm::VAArgInst::clone_impl(), llvm::TruncInst::clone_impl(), llvm::ZExtInst::clone_impl(), llvm::SExtInst::clone_impl(), llvm::FPTruncInst::clone_impl(), llvm::FPExtInst::clone_impl(), llvm::UIToFPInst::clone_impl(), llvm::SIToFPInst::clone_impl(), llvm::FPToUIInst::clone_impl(), llvm::FPToSIInst::clone_impl(), llvm::IntToPtrInst::clone_impl(), llvm::PtrToIntInst::clone_impl(), llvm::BitCastInst::clone_impl(), llvm::CloneAndPruneFunctionInto(), CoerceAvailableValueToLoadType(), CollectBSwapParts(), CollectInsertionElements(), CollectShuffleElements(), CollectSingleShuffleElements(), llvm::InstCombiner::commonCastTransforms(), llvm::InstCombiner::commonIDivTransforms(), llvm::InstCombiner::commonPointerCastTransforms(), llvm::InstCombiner::commonShiftTransforms(), llvm::ComputeMaskedBits(), llvm::ComputeMultiple(), llvm::ComputeNumSignBits(), llvm::FunctionLoweringInfo::ComputePHILiveOutRegInfo(), computePointerICmp(), llvm::ComputeSignBit(), llvm::ComputeUsesVAFloatArgument(), ConnectProlog(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldCompareInstOperands(), llvm::ConstantFoldCompareInstruction(), ConstantFoldConstantExpressionImpl(), llvm::ConstantFoldExtractElementInstruction(), ConstantFoldGetElementPtrImpl(), llvm::ConstantFoldInsertElementInstruction(), llvm::ConstantFoldInsertValueInstruction(), llvm::ConstantFoldInstOperands(), llvm::ConstantFoldInstruction(), llvm::ConstantFoldLoadFromConstPtr(), llvm::ConstantFoldSelectInstruction(), llvm::ConstantFoldShuffleVectorInstruction(), ConstructSSAForLoadSet(), convertMemSetToLoop(), ConvertShiftToMul(), convertTransferToLoop(), convertValue(), llvm::SelectionDAGBuilder::CopyToExportRegsIfNeeded(), llvm::SelectionDAGBuilder::CopyValueToVirtualRegister(), llvm::BinaryOperator::Create(), llvm::IRBuilder< true, TargetFolder >::CreateAnd(), createAndInstr(), llvm::IRBuilder< true, TargetFolder >::CreateAShr(), llvm::TargetFolder::CreateCast(), llvm::IRBuilder< true, TargetFolder >::CreateCast(), llvm::BinaryOperator::CreateFNeg(), llvm::TargetFolder::CreateFPCast(), llvm::CastInst::CreateFPCast(), createFree(), llvm::IRBuilderBase::CreateGlobalString(), llvm::CompileUnit::createGlobalVariableDIE(), llvm::TargetFolder::CreateIntCast(), llvm::IRBuilder< true, TargetFolder >::CreateIntCast(), llvm::CastInst::CreateIntegerCast(), llvm::IRBuilder< true, TargetFolder >::CreateIsNotNull(), llvm::IRBuilder< true, TargetFolder >::CreateIsNull(), llvm::IRBuilderBase::CreateLifetimeEnd(), llvm::IRBuilderBase::CreateLifetimeStart(), llvm::IRBuilder< true, TargetFolder >::CreateLShr(), createMalloc(), llvm::IRBuilderBase::CreateMemCpy(), llvm::IRBuilderBase::CreateMemMove(), llvm::IRBuilderBase::CreateMemSet(), llvm::BinaryOperator::CreateNeg(), llvm::BinaryOperator::CreateNot(), llvm::BinaryOperator::CreateNSWNeg(), llvm::BinaryOperator::CreateNUWNeg(), llvm::IRBuilder< true, TargetFolder >::CreateOr(), createPHIsForSplitLoopExit(), llvm::TargetFolder::CreatePointerCast(), llvm::CastInst::CreatePointerCast(), llvm::IRBuilder< true, TargetFolder >::CreatePointerCast(), createPrivateGlobalForString(), createPrivateNonConstGlobalForString(), llvm::IRBuilder< true, TargetFolder >::CreatePtrDiff(), llvm::TargetFolder::CreateSExtOrBitCast(), llvm::CastInst::CreateSExtOrBitCast(), llvm::IRBuilder< true, TargetFolder >::CreateSExtOrBitCast(), llvm::IRBuilder< true, TargetFolder >::CreateSExtOrTrunc(), llvm::IRBuilder< true, TargetFolder >::CreateShl(), llvm::TargetFolder::CreateTruncOrBitCast(), llvm::CastInst::CreateTruncOrBitCast(), llvm::IRBuilder< true, TargetFolder >::CreateTruncOrBitCast(), llvm::IRBuilder< true, TargetFolder >::CreateVectorSplat(), llvm::IRBuilder< true, TargetFolder >::CreateXor(), llvm::TargetFolder::CreateZExtOrBitCast(), llvm::CastInst::CreateZExtOrBitCast(), llvm::IRBuilder< true, TargetFolder >::CreateZExtOrBitCast(), llvm::IRBuilder< true, TargetFolder >::CreateZExtOrTrunc(), CvtFDivConstToReciprocal(), decomposeBitTestICmp(), DecomposeGEPExpression(), DecomposeSimpleLinearExpr(), llvm::DeleteDeadBlock(), DeleteInstructionInBlock(), llvm::DemotePHIToStack(), llvm::DemoteRegToStack(), llvm::ConstantAggregateZero::destroyConstant(), llvm::ConstantExpr::destroyConstant(), llvm::UndefValue::destroyConstant(), llvm::InstCombiner::DoOneIteration(), dyn_castFoldableMul(), EliminateDeadSwitchCases(), emitDebugValueComment(), llvm::EmitFPutC(), llvm::EmitFPutS(), llvm::EmitFWrite(), llvm::EmitGEPOffset(), llvm::AsmPrinter::EmitGlobalConstant(), emitGlobalConstantFP(), emitGlobalConstantImpl(), emitGlobalConstantStruct(), llvm::EmitStrNCpy(), llvm::EmitUnaryFloatFnCall(), llvm::ARMAsmPrinter::EmitXXStructor(), EvaluateExpression(), evaluateFCmpRelation(), EvaluateGEPOffsetExpression(), evaluateICmpRelation(), EvaluateStoreInto(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::ARMTargetLowering::ExpandInlineAsm(), llvm::X86TargetLowering::ExpandInlineAsm(), llvm::expandRemainderUpTo32Bits(), ExtractConstantBytes(), extractInteger(), extractVector(), llvm::FCmpInst::FCmpInst(), llvm::FindAvailableLoadedValue(), llvm::FindInsertedValue(), FindLIVLoopCondition(), FindLoopCounter(), FindScalarElement(), fixupFPReturnAndCall(), llvm::InstCombiner::FoldAndOfFCmps(), llvm::InstCombiner::FoldAndOfICmps(), FoldBitCast(), llvm::InstCombiner::FoldCmpLoadFromIndexedGlobal(), foldConstantCastPair(), llvm::InstCombiner::FoldFCmp_IntToFP_Cst(), llvm::InstCombiner::FoldGEPICmp(), llvm::InstCombiner::FoldICmpAddOpCst(), llvm::InstCombiner::FoldICmpShrCst(), foldLogOpOfMaskedICmps(), foldLogOpOfMaskedICmpsHelper(), FoldOperationIntoSelectOperand(), llvm::InstCombiner::FoldOrOfFCmps(), FoldReinterpretLoadFromConstPtr(), foldSelectICmpAnd(), foldSelectICmpAndOr(), llvm::InstCombiner::FoldSelectOpOp(), llvm::InstCombiner::FoldShiftByConstant(), FoldTwoEntryPHINode(), genLoopLimit(), llvm::gep_type_begin(), llvm::ConstantArray::get(), llvm::ConstantVector::get(), llvm::ConstantExpr::get(), getAccessType(), llvm::IntToPtrInst::getAddressSpace(), getAdjustedPtr(), llvm::Constant::getAggregateElement(), getAISize(), llvm::MemIntrinsic::getAlignmentType(), getArrayElements(), llvm::ConstantExpr::getAsInstruction(), llvm::ConstantExpr::getBitCast(), llvm::CastInst::getCastOpcode(), getCodeAddrSpace(), llvm::ConstantExpr::getCompare(), GetCompareTy(), GetConstantInt(), llvm::SelectionDAG::getConstantPool(), llvm::ExecutionEngine::getConstantValue(), llvm::BasicBlock::getContext(), llvm::MemIntrinsic::getDestAddressSpace(), getEdgeValueLocal(), llvm::ConstantAggregateZero::getElementValue(), llvm::UndefValue::getElementValue(), llvm::ConstantExpr::getExtractElement(), llvm::ConstantExpr::getExtractValue(), llvm::ConstantExpr::getFCmp(), llvm::ConstantExpr::getFNeg(), llvm::ConstantExpr::getFPCast(), llvm::ConstantExpr::getFPExtend(), llvm::ConstantExpr::getFPToSI(), llvm::ConstantExpr::getFPToUI(), llvm::ConstantExpr::getFPTrunc(), llvm::objcarc::GetFunctionClass(), llvm::GetElementPtrInst::getGEPReturnType(), llvm::ConstantExpr::getGetElementPtr(), llvm::ConstantExpr::getICmp(), llvm::getICmpValue(), llvm::ConstantExpr::getInsertElement(), llvm::ConstantExpr::getInsertValue(), llvm::ConstantExpr::getIntegerCast(), llvm::ConstantExpr::getIntToPtr(), llvm::SCEVExpander::getIVIncOperand(), llvm::TargetLoweringObjectFile::getKindForGlobal(), GetLinearExpression(), llvm::MemoryDependenceAnalysis::getLoadLoadClobberFullWidthSize(), GetLoadValueForLoad(), llvm::AliasAnalysis::getLocation(), llvm::getMallocType(), getMemSetPatternValue(), getMergedGlobalExpr(), llvm::AliasAnalysis::getModRefInfo(), getNaturalGEPWithOffset(), llvm::ConstantExpr::getNeg(), llvm::MemoryDependenceAnalysis::getNonLocalPointerDependency(), llvm::ConstantExpr::getNot(), getOne(), llvm::getOrEnforceKnownAlignment(), llvm::Argument::getParamAlignment(), llvm::LoadInst::getPointerAddressSpace(), llvm::StoreInst::getPointerAddressSpace(), llvm::AtomicCmpXchgInst::getPointerAddressSpace(), llvm::AtomicRMWInst::getPointerAddressSpace(), llvm::PtrToIntInst::getPointerAddressSpace(), llvm::GetPointerBaseWithConstantOffset(), llvm::ConstantExpr::getPointerCast(), llvm::GEPOperator::getPointerOperandType(), llvm::GetElementPtrInst::getPointerOperandType(), llvm::ConstantExpr::getPtrToInt(), llvm::FastISel::getRegForGEPIndex(), llvm::FastISel::getRegForValue(), llvm::ScalarEvolution::getSCEV(), llvm::ConstantExpr::getSelect(), GetSelectFoldableConstant(), llvm::ConstantAggregateZero::getSequentialElement(), llvm::UndefValue::getSequentialElement(), llvm::ConstantExpr::getSExt(), llvm::ConstantExpr::getSExtOrBitCast(), GetShiftedValue(), llvm::ShuffleVectorInst::getShuffleMask(), llvm::ConstantExpr::getShuffleVector(), llvm::SystemZTargetLowering::getSingleConstraintMatchWeight(), llvm::ARMTargetLowering::getSingleConstraintMatchWeight(), llvm::PPCTargetLowering::getSingleConstraintMatchWeight(), llvm::X86TargetLowering::getSingleConstraintMatchWeight(), llvm::TargetLowering::getSingleConstraintMatchWeight(), llvm::ConstantExpr::getSIToFP(), llvm::MemTransferInst::getSourceAddressSpace(), llvm::ConstantVector::getSplat(), llvm::ConstantDataVector::getSplat(), llvm::Constant::getSplatValue(), llvm::SelectionDAG::getSrcValue(), GetStoreValueForLoad(), llvm::GetStringLength(), llvm::ConstantAggregateZero::getStructElement(), llvm::UndefValue::getStructElement(), llvm::ARMTargetLowering::getTgtMemIntrinsic(), llvm::ConstantExpr::getTrunc(), llvm::ConstantExpr::getTruncOrBitCast(), llvm::ConstantStruct::getType(), llvm::SCEVUnknown::getType(), llvm::ConstantVector::getType(), llvm::ConstantPointerNull::getType(), llvm::InsertElementInst::getType(), llvm::ShuffleVectorInst::getType(), llvm::ConstantExpr::getUIToFP(), llvm::GetUnderlyingObject(), getUnderlyingObjectFromInt(), getUnderlyingObjects(), llvm::SelectionDAGBuilder::getValue(), llvm::SelectionDAGBuilder::getValueImpl(), llvm::ExtractElementInst::getVectorOperandType(), llvm::ConstantExpr::getWithOperandReplaced(), llvm::ConstantExpr::getWithOperands(), llvm::ConstantExpr::getZExt(), llvm::ConstantExpr::getZExtOrBitCast(), llvm::GlobalAlias::GlobalAlias(), llvm::GlobalVariable::GlobalVariable(), HandleByValArgument(), llvm::Argument::hasByValAttr(), llvm::PHINode::hasConstantValue(), llvm::Argument::hasNestAttr(), llvm::Argument::hasNoAliasAttr(), llvm::Argument::hasNoCaptureAttr(), llvm::Argument::hasStructRetAttr(), HoistThenElseCodeToIf(), IdxCompare(), llvm::CompositeType::indexValid(), llvm::BinaryOperator::init(), INITIALIZE_PASS(), llvm::ExecutionEngine::InitializeMemory(), llvm::FunctionLoweringInfo::InitializeRegForValue(), llvm::InlineFunction(), insertFastDiv(), insertInteger(), insertVector(), InstallGlobalCtors(), InstCombineLoadCast(), InstCombineStoreToCast(), llvm::MemoryDependenceAnalysis::invalidateCachedPointerInfo(), llvm::isBytewiseValue(), isCompatibleIVType(), llvm::BoUpSLP::isConsecutiveAccess(), isEliminableCastPair(), isExistingPhi(), isGEPKnownNonNull(), isHighCostExpansion(), llvm::Instruction::isIdenticalToWhenDefined(), llvm::isImageOrSamplerVal(), llvm::CastInst::isIntegerCast(), isIntegerWideningViable(), isInterestingPointer(), llvm::isKnownNonZero(), llvm::CastInst::isLosslessCast(), llvm::Constant::isNegativeZeroValue(), llvm::CastInst::isNoopCast(), IsNullTerminatedString(), isOverwrite(), llvm::objcarc::IsPotentialRetainableObjPtr(), isRepeatedByteSequence(), isSafeToEliminateVarargsCast(), llvm::isSafeToLoadUnconditionally(), llvm::isSafeToSpeculativelyExecute(), llvm::Instruction::isSameOperationAs(), isSimpleEnoughPointerToCommit(), isSimpleEnoughValueToCommitHelper(), isSimpleIVUser(), llvm::ExtractElementInst::isValidOperands(), llvm::InsertElementInst::isValidOperands(), llvm::ShuffleVectorInst::isValidOperands(), isVectorPromotionViable(), isZero(), LinearizeExprTree(), llvm::LoadAndStorePromoter::LoadAndStorePromoter(), LowerBSWAP(), llvm::SelectionDAGBuilder::LowerCallTo(), nvptx::LowerConstant(), lowerConstant(), LowerCTLZ(), LowerCTPOP(), llvm::IntrinsicLowering::LowerIntrinsicCall(), LowerNegateToMultiply(), llvm::IntrinsicLowering::LowerToByteSwap(), llvm::MapValue(), MatchSelectFromAndOr(), llvm::MergeBasicBlockIntoOnlyPred(), mergeEmptyReturnBlocks(), OptimizeAndOrXor(), OptimizeAwayTrappingUsesOfValue(), OptimizeGlobalAddressOfMalloc(), OptimizeIntegerToVectorInsertions(), OptimizeIntToFloatBitCast(), OptimizeNoopCopyExpression(), OptimizeOnceStoredGlobal(), OptimizeVectorResize(), llvm::TargetLowering::ParseConstraints(), PerformHeapAllocSRoA(), llvm::PointerMayBeCaptured(), llvm::AssemblyWriter::printArgument(), llvm::AssemblyWriter::printInstruction(), ProcessUAddIdiom(), ProcessUGT_ADDCST_ADD(), PushValueAndType(), ReadDataFromGlobal(), llvm::RemapInstruction(), llvm::AliasSetTracker::remove(), RemoveDeadConstant(), llvm::PHINode::removeIncomingValue(), llvm::MemoryDependenceAnalysis::removeInstruction(), removeLifetimeIntrinsicUsers(), replaceAllUsesWith(), llvm::SCEVExpander::replaceCongruentIVs(), ReplaceFPIntrinsicWithCall(), llvm::InstCombiner::ReplaceInstUsesWith(), RewriteHeapSROALoadUser(), RewriteUsesOfClonedInstructions(), llvm::TypeFinder::run(), llvm::LoadAndStorePromoter::run(), llvm::Interpreter::run(), llvm::JIT::runFunction(), llvm::NVPTXLowerAggrCopies::runOnFunction(), llvm::FindUsedTypes::runOnModule(), sameNoopInput(), llvm::FastISel::SelectOperator(), llvm::FunctionLoweringInfo::set(), llvm::GlobalAlias::setAliasee(), llvm::MemIntrinsic::setDest(), llvm::GlobalVariable::setInitializer(), llvm::MemIntrinsic::setLength(), setName(), llvm::MemTransferInst::setSource(), llvm::MemSetInst::setValue(), shorter_filter(), SimplifyAddInst(), SimplifyAndInst(), SimplifyAShrInst(), SimplifyBinOp(), SimplifyBranchOnICmpChain(), SimplifyCall(), SimplifyDiv(), SimplifyFAddInst(), SimplifyFSubInst(), SimplifyICmpInst(), SimplifyInsertValueInst(), llvm::SimplifyInstruction(), SimplifyLShrInst(), SimplifyMulInst(), SimplifyOrInst(), SimplifyPHINode(), SimplifyRem(), SimplifyShift(), SimplifyShlInst(), SimplifySubInst(), SimplifyWithOpReplaced(), SimplifyXorInst(), SinkThenElseCodeToEnd(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), llvm::SplitLandingPadPredecessors(), stripAndComputeConstantOffsets(), StripPtrCastKeepAS(), SubOne(), SubWithOverflow(), SwitchToLookupTable(), SymbolicallyEvaluateBinop(), SymbolicallyEvaluateGEP(), ThreadCmpOverSelect(), tryToMakeAllocaBePromotable(), TryToOptimizeStoreOfMallocToGlobal(), TryToShrinkGlobalToBoolean(), TurnSwitchRangeIntoICmp(), underlyingObjectsAlias(), llvm::UnrollRuntimeLoopProlog(), UpdatePHINodes(), llvm::UpgradeIntrinsicCall(), llvm::ValueHandleBase::ValueIsDeleted(), llvm::ValueHandleBase::ValueIsRAUWd(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAllocaInst(), llvm::InstCombiner::visitAllocSite(), llvm::InstCombiner::visitAnd(), llvm::ObjectSizeOffsetVisitor::visitArgument(), llvm::InstCombiner::visitAShr(), llvm::Interpreter::visitBinaryOperator(), llvm::InstCombiner::visitBitCast(), llvm::Interpreter::visitBitCastInst(), llvm::InstCombiner::visitCallInst(), llvm::Interpreter::visitExtractElementInst(), llvm::InstCombiner::visitExtractElementInst(), llvm::InstCombiner::visitFAdd(), llvm::Interpreter::visitFCmpInst(), llvm::InstCombiner::visitFCmpInst(), llvm::Interpreter::visitFPExtInst(), llvm::InstCombiner::visitFPToSI(), llvm::Interpreter::visitFPToSIInst(), llvm::InstCombiner::visitFPToUI(), llvm::Interpreter::visitFPToUIInst(), llvm::InstCombiner::visitFPTrunc(), llvm::Interpreter::visitFPTruncInst(), llvm::InstCombiner::visitGetElementPtrInst(), llvm::Interpreter::visitICmpInst(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitICmpInstWithCastAndCast(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), llvm::InstCombiner::visitInsertElementInst(), llvm::InstCombiner::visitIntToPtr(), llvm::Interpreter::visitIntToPtrInst(), llvm::InstCombiner::visitLandingPadInst(), llvm::Interpreter::visitLoadInst(), llvm::InstCombiner::visitLoadInst(), llvm::InstCombiner::visitLShr(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitPHINode(), llvm::PtrUseVisitor< PartitionBuilder >::visitPtr(), llvm::InstCombiner::visitPtrToInt(), llvm::Interpreter::visitPtrToIntInst(), llvm::Interpreter::visitReturnInst(), llvm::InstCombiner::visitSDiv(), llvm::InstCombiner::visitSelectInst(), llvm::InstCombiner::visitSelectInstWithICmp(), llvm::InstCombiner::visitSExt(), llvm::Interpreter::visitSExtInst(), llvm::InstCombiner::visitShuffleVectorInst(), llvm::Interpreter::visitSIToFPInst(), llvm::InstCombiner::visitSRem(), llvm::Interpreter::visitStoreInst(), llvm::InstCombiner::visitStoreInst(), llvm::InstCombiner::visitSub(), llvm::Interpreter::visitSwitchInst(), llvm::InstCombiner::visitTrunc(), llvm::Interpreter::visitTruncInst(), llvm::InstCombiner::visitUDiv(), llvm::Interpreter::visitUIToFPInst(), llvm::InstCombiner::visitURem(), llvm::Interpreter::visitVAArgInst(), llvm::InstCombiner::visitXor(), llvm::InstCombiner::visitZExt(), llvm::Interpreter::visitZExtInst(), width_descending(), llvm::WriteAsOperand(), llvm::WriteConstantInternal(), WriteConstants(), WriteInstruction(), WriteMDNode(), llvm::AssemblyWriter::writeOperand(), llvm::AssemblyWriter::writeParamOperand(), and llvm::BasicBlock::~BasicBlock().

unsigned llvm::Value::getValueID ( ) const [inline]

getValueID - 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 for instructions, the Instruction's opcode is added to InstructionVal. So this means three things: # there is no value with code InstructionVal (no opcode==0). # there are more possible values for the value type than in ValueTy enum. # the InstructionVal enumerator must be the highest valued enumerator in the ValueTy enum.

Definition at line 230 of file Value.h.

Referenced by llvm::PseudoSourceValue::classof(), llvm::MDString::classof(), llvm::GlobalAlias::classof(), llvm::FixedStackPseudoSourceValue::classof(), llvm::Argument::classof(), llvm::Constant::classof(), llvm::MDNode::classof(), llvm::InlineAsm::classof(), llvm::GlobalVariable::classof(), llvm::ConstantInt::classof(), llvm::BasicBlock::classof(), llvm::ConstantFP::classof(), llvm::GlobalValue::classof(), llvm::ConstantAggregateZero::classof(), llvm::ConstantArray::classof(), llvm::Instruction::classof(), llvm::Function::classof(), llvm::ConstantStruct::classof(), llvm::ConstantVector::classof(), llvm::ConstantPointerNull::classof(), llvm::ConstantDataSequential::classof(), llvm::ConstantDataArray::classof(), llvm::ConstantDataVector::classof(), llvm::BlockAddress::classof(), llvm::ConstantExpr::classof(), llvm::UndefValue::classof(), llvm::isa_impl< Constant, Value >::doit(), llvm::isa_impl< Argument, Value >::doit(), llvm::isa_impl< InlineAsm, Value >::doit(), llvm::isa_impl< Instruction, Value >::doit(), llvm::isa_impl< BasicBlock, Value >::doit(), llvm::isa_impl< Function, Value >::doit(), llvm::isa_impl< GlobalVariable, Value >::doit(), llvm::isa_impl< GlobalAlias, Value >::doit(), llvm::isa_impl< MDNode, Value >::doit(), and llvm::Instruction::getOpcode().

ValueName* llvm::Value::getValueName ( ) const [inline]
bool llvm::Value::hasName ( ) const [inline]
bool Value::hasNUses ( unsigned  N) const

hasNUses - Return true if this Value has exactly N users.

Definition at line 92 of file Value.cpp.

References use_begin(), and use_end().

Referenced by WriteUseList().

bool Value::hasNUsesOrMore ( unsigned  N) const

hasNUsesOrMore - Return true if this value has N users or more. This is logically equivalent to getNumUses() >= N.

Definition at line 103 of file Value.cpp.

References use_begin(), and use_end().

Referenced by llvm::BasicBlock::removePredecessor(), and SRAGlobal().

bool llvm::Value::hasOneUse ( ) const [inline]

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 158 of file Value.h.

References I, use_begin(), and use_end().

Referenced by CanEvaluateSExtd(), CanEvaluateShifted(), CanEvaluateTruncated(), CanEvaluateZExtd(), CheapToScalarize(), CollectInsertionElements(), DeadPHICycle(), detectLog2OfHalf(), llvm::InstCombiner::DoOneIteration(), dyn_castFoldableMul(), FindInitTrampolineFromAlloca(), llvm::SelectionDAGBuilder::FindMergedConditions(), FindSingleUseIdentifiedObject(), llvm::InstCombiner::FoldAndOfICmps(), llvm::FoldBranchToCommonDest(), FoldCondBranchOnPHI(), llvm::InstCombiner::FoldGEPICmp(), llvm::InstCombiner::FoldICmpShrCst(), llvm::InstCombiner::FoldShiftByConstant(), isFormingBranchFromSelectProfitable(), isReassociableOp(), IsSafeComputationToRemove(), LinearizeExprTree(), ProcessUGT_ADDCST_ADD(), ShouldBreakUpSubtract(), shouldMergeGEPs(), llvm::InstCombiner::SimplifyDivRemOfSelect(), simplifyValueKnownNonZero(), SinkThenElseCodeToEnd(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), llvm::FastISel::tryToFoldLoad(), TryToSimplifyUncondBranchWithICmpInIt(), TryToSinkInstruction(), llvm::InstCombiner::visitAdd(), llvm::InstCombiner::visitAnd(), llvm::InstCombiner::visitBranchInst(), llvm::InstCombiner::visitExtractElementInst(), llvm::InstCombiner::visitFDiv(), llvm::InstCombiner::visitFMul(), llvm::InstCombiner::visitFPTrunc(), llvm::InstCombiner::visitICmpInst(), llvm::InstCombiner::visitICmpInstWithInstAndIntCst(), llvm::InstCombiner::visitInsertElementInst(), llvm::InstCombiner::visitLoadInst(), llvm::InstCombiner::visitMul(), llvm::InstCombiner::visitOr(), llvm::InstCombiner::visitPHINode(), llvm::InstCombiner::visitSelectInstWithICmp(), llvm::InstCombiner::visitSExt(), llvm::InstCombiner::visitStoreInst(), llvm::InstCombiner::visitTrunc(), llvm::InstCombiner::visitXor(), and llvm::InstCombiner::visitZExt().

bool llvm::Value::hasSameSubclassOptionalData ( const Value V) const [inline]

hasSameSubclassOptionalData - Test whether the optional flags contained in this value are equal to the optional flags in the given value.

Definition at line 249 of file Value.h.

References SubclassOptionalData.

bool llvm::Value::hasValueHandle ( ) const [inline]

hasValueHandle - Return true if there is a value handle associated with this value.

Definition at line 261 of file Value.h.

void llvm::Value::intersectOptionalDataWith ( const Value V) [inline]

intersectOptionalDataWith - Clear any optional flags in this value that are not also set in the given value.

Definition at line 255 of file Value.h.

References SubclassOptionalData.

Referenced by HoistThenElseCodeToIf(), and SinkThenElseCodeToEnd().

bool Value::isDereferenceablePointer ( ) const

isDereferenceablePointer - Test if this value is always a pointer to allocated and suitably aligned memory for a simple load or store.

Definition at line 463 of file Value.cpp.

Referenced by AllCallersPassInValidPointerForArgument(), isSafePHIToSpeculate(), isSafeSelectToSpeculate(), and llvm::isSafeToSpeculativelyExecute().

bool Value::isUsedInBasicBlock ( const BasicBlock BB) const

isUsedInBasicBlock - Return true if this value is used in the specified basic block.

Definition at line 114 of file Value.cpp.

References llvm::BasicBlock::begin(), llvm::dyn_cast(), llvm::BasicBlock::end(), llvm::Instruction::getParent(), use_begin(), and use_end().

void llvm::Value::mutateType ( Type Ty) [inline]

mutateType - Mutate the type of this Value to be of the specified type. Note that this is an extremely dangerous operation which can create completely invalid IR very easily. It is strongly recommended that you recreate IR objects with the right types instead of mutating them in place.

Definition at line 323 of file Value.h.

Referenced by llvm::RemapInstruction().

void Value::print ( raw_ostream O,
AssemblyAnnotationWriter AAW = 0 
) const
void Value::printCustom ( raw_ostream O) const [protected, virtual]

printCustom - Value subclasses can override this to implement custom printing behavior.

Reimplemented in llvm::FixedStackPseudoSourceValue.

Definition at line 2202 of file AsmWriter.cpp.

References llvm_unreachable.

Referenced by print().

void Value::replaceAllUsesWith ( Value V)

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 303 of file Value.cpp.

References llvm::CallingConv::C, getType(), llvm::Use::getUser(), llvm::Use::set(), use_empty(), and llvm::ValueHandleBase::ValueIsRAUWd().

Referenced by AddReachableCodeToWorklist(), BreakUpSubtract(), changeToCall(), checkCSEInPredecessor(), llvm::CloneAndPruneFunctionInto(), ConvertShiftToMul(), llvm::DeleteDeadBlock(), DeleteInstructionInBlock(), llvm::DemotePHIToStack(), llvm::InstCombiner::DoOneIteration(), llvm::EliminateDuplicatePHINodes(), llvm::objcarc::EraseInstruction(), llvm::expandDivision(), llvm::expandDivisionUpTo32Bits(), llvm::expandRemainder(), llvm::expandRemainderUpTo32Bits(), FindPHIToPartitionLoops(), FoldBlockIntoPredecessor(), FoldTwoEntryPHINode(), GetLoadValueForLoad(), HandleCallsInBlockInlinedThroughInvoke(), HoistThenElseCodeToIf(), INITIALIZE_PASS(), InlineCallIfPossible(), llvm::InlineFunction(), insertFastDiv(), InstallGlobalCtors(), LowerAtomicCmpXchgInst(), LowerAtomicRMWInst(), llvm::IntrinsicLowering::LowerIntrinsicCall(), LowerNegateToMultiply(), llvm::IntrinsicLowering::LowerToByteSwap(), llvm::MapValue(), llvm::BitcodeReader::MaterializeModule(), llvm::MergeBasicBlockIntoOnlyPred(), llvm::MergeBlockIntoPredecessor(), mergeEmptyReturnBlocks(), OptimizeGlobalAddressOfMalloc(), patchAndReplaceAllUsesWith(), llvm::PHINode::removeIncomingValue(), llvm::BasicBlock::removePredecessor(), llvm::LibCallSimplifier::replaceAllUsesWith(), llvm::DIType::replaceAllUsesWith(), replaceAndRecursivelySimplifyImpl(), ReplaceCallWith(), llvm::SCEVExpander::replaceCongruentIVs(), llvm::InstCombiner::ReplaceInstUsesWith(), llvm::ReplaceInstWithValue(), ReplaceUsesOfWith(), llvm::ConstantArray::replaceUsesOfWithOnConstant(), llvm::ConstantStruct::replaceUsesOfWithOnConstant(), llvm::ConstantVector::replaceUsesOfWithOnConstant(), llvm::BlockAddress::replaceUsesOfWithOnConstant(), llvm::ConstantExpr::replaceUsesOfWithOnConstant(), llvm::BitcodeReaderValueList::ResolveConstantForwardRefs(), RewriteHeapSROALoadUser(), llvm::LoadAndStorePromoter::run(), SinkThenElseCodeToEnd(), llvm::SplitLandingPadPredecessors(), SRAGlobal(), tryToMakeAllocaBePromotable(), TryToOptimizeStoreOfMallocToGlobal(), TryToShrinkGlobalToBoolean(), llvm::TryToSimplifyUncondBranchFromEmptyBlock(), TryToSimplifyUncondBranchWithICmpInIt(), llvm::UnrollLoop(), llvm::UpgradeIntrinsicCall(), llvm::ObjectSizeOffsetEvaluator::visitPHINode(), and llvm::BasicBlock::~BasicBlock().

void Value::setName ( const Twine Name)
void llvm::Value::setValueName ( ValueName VN) [inline]

Definition at line 116 of file Value.h.

Referenced by llvm::MDString::get().

void llvm::Value::setValueSubclassData ( unsigned short  D) [inline, protected]

Definition at line 329 of file Value.h.

Value * Value::stripInBoundsConstantOffsets ( )

stripInBoundsConstantOffsets - This method strips off unneeded pointer casts and all-constant GEPs from the specified value, returning the original pointer value. If this is called on a non-pointer value, it returns 'this'.

Definition at line 392 of file Value.cpp.

Referenced by stripInBoundsConstantOffsets().

const Value* llvm::Value::stripInBoundsConstantOffsets ( ) const [inline]

Definition at line 286 of file Value.h.

References stripInBoundsConstantOffsets().

Value * Value::stripInBoundsOffsets ( )

stripInBoundsOffsets - This method strips off unneeded pointer casts and any in-bounds Offsets from the specified value, returning the original pointer value. If this is called on a non-pointer value, it returns 'this'.

Definition at line 396 of file Value.cpp.

Referenced by stripInBoundsOffsets().

const Value* llvm::Value::stripInBoundsOffsets ( ) const [inline]

Definition at line 295 of file Value.h.

References stripInBoundsOffsets().

Value * Value::stripPointerCasts ( )
const Value* llvm::Value::stripPointerCasts ( ) const [inline]

Definition at line 268 of file Value.h.

References stripPointerCasts().

Value * Value::stripPointerCastsNoFollowAliases ( )

This method strips off any unneeded pointer casts and all-zero GEPs from the specified value, returning the original uncasted value. If this is called on a non-pointer value, it returns 'this'.

Definition at line 388 of file Value.cpp.

Referenced by FindUsedValues(), and stripPointerCastsNoFollowAliases().

const Value* llvm::Value::stripPointerCastsNoFollowAliases ( ) const [inline]

Definition at line 277 of file Value.h.

References stripPointerCastsNoFollowAliases().

void Value::takeName ( Value V)
User* llvm::Value::use_back ( ) [inline]
const User* llvm::Value::use_back ( ) const [inline]

Reimplemented in llvm::Instruction.

Definition at line 152 of file Value.h.

References use_begin().

use_iterator llvm::Value::use_begin ( ) [inline]

Definition at line 147 of file Value.h.

Referenced by AddressIsTaken(), llvm::IVUsers::AddUsersImpl(), llvm::InstCombineWorklist::AddUsersToWorkList(), AllCallersPassInValidPointerForArgument(), AllGlobalLoadUsesSimpleEnoughForHeapSRA(), AllUsesOfLoadedValueWillTrapIfNull(), AllUsesOfValueWillTrapIfNull(), AlmostDeadIV(), AnalyzeGlobal(), areAllUsesEqual(), ChangeCalleesToFastCall(), llvm::GraphTraits< const Value * >::child_begin(), llvm::GraphTraits< Value * >::child_begin(), CleanupConstantGlobalUsers(), CleanupPointerRootUsers(), ConstantPropUsersOf(), DoesRetainableObjPtrEscape(), llvm::InstCombiner::DoOneIteration(), llvm::detail::PtrUseVisitorBase::enqueueUsers(), FindInitTrampolineFromAlloca(), FindPhiPredForUseInBlock(), FindSingleUseIdentifiedObject(), getFirst(), llvm::getMallocType(), getNumUses(), GlobalUsersSafeToSRA(), llvm::Function::hasAddressTaken(), hasLifetimeMarkers(), hasNonInstructionUse(), hasNUses(), hasNUsesOrMore(), hasOneUse(), INITIALIZE_PASS(), llvm::isAllocaPromotable(), isAllocSiteRemovable(), llvm::Constant::isConstantUsed(), llvm::Function::isDefTriviallyDead(), isHighCostExpansion(), isOnlyCopiedFromConstantGlobal(), isOnlyUsedInEntryBlock(), IsOnlyUsedInZeroEqualityComparison(), isSafePHIToSpeculate(), isSafeSelectToSpeculate(), isSafeSROAElementUse(), IsStoredObjCPointer(), isUsedByLifetimeMarker(), isUsedInBasicBlock(), llvm::Instruction::isUsedOutsideOfBlock(), isUsedOutsideOfDefiningBlock(), IsUserOfGlobalSafeForSRA(), LLVMGetFirstUse(), LoadUsesSimpleEnoughForHeapSRA(), llvm::BitcodeReader::Materialize(), llvm::BitcodeReader::MaterializeModule(), NegateValue(), OnlyUsedBy(), llvm::onlyUsedByLifetimeMarkers(), OptimizeAwayTrappingUsesOfLoads(), OptimizeAwayTrappingUsesOfValue(), OptimizeCmpExpression(), OptimizeGlobalAddressOfMalloc(), OptimizeNoopCopyExpression(), passingValueIsAlwaysUndefined(), PerformHeapAllocSRoA(), llvm::PointerMayBeCaptured(), llvm::ValueEnumerator::print(), ProcessUGT_ADDCST_ADD(), PushDefUseChildren(), pushIVUsers(), llvm::Constant::removeDeadConstantUsers(), removeLifetimeIntrinsicUsers(), RemoveNestAttribute(), replaceAndRecursivelySimplifyImpl(), ReplaceUsesOfMallocWithGlobal(), ReplaceUsesOfWith(), RewriteHeapSROALoadUser(), RewriteUsesOfClonedInstructions(), RewriteUsesOfLoadForHeapSRoA(), llvm::NVPTXLowerAggrCopies::runOnFunction(), SafeToDestroyConstant(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), llvm::SparseSolver::Solve(), tryToMakeAllocaBePromotable(), TryToShrinkGlobalToBoolean(), llvm::UpgradeCallsToIntrinsic(), llvm::Instruction::use_back(), use_back(), usedInGlobalVarDef(), usedInOneFunc(), useFuncSeen(), ValueIsOnlyUsedLocallyOrStoredToOneGlobal(), llvm::InstCombiner::visitICmpInst(), WriteUseList(), and ~Value().

const_use_iterator llvm::Value::use_begin ( ) const [inline]

Definition at line 148 of file Value.h.

bool llvm::Value::use_empty ( ) const [inline]

Definition at line 146 of file Value.h.

Referenced by AddReachableCodeToWorklist(), llvm::SelectionDAGBuilder::CopyToExportRegsIfNeeded(), DeadPHICycle(), llvm::DeleteDeadBlock(), DeleteDeadInstruction(), deleteDeadInstruction(), DeleteInstructionInBlock(), llvm::MDNode::deleteTemporary(), llvm::DemotePHIToStack(), llvm::DemoteRegToStack(), llvm::Constant::destroyConstantImpl(), llvm::AsmPrinter::doFinalization(), llvm::InstCombiner::DoOneIteration(), llvm::InstCombiner::EraseInstFromFunction(), llvm::objcarc::EraseInstruction(), FindSingleUseIdentifiedObject(), getAdjustedPtr(), hasAddressTakenAndUsed(), INITIALIZE_PASS(), llvm::InlineFunction(), InstallGlobalCtors(), llvm::isInstructionTriviallyDead(), isOnlyUsedInEntryBlock(), isUsedOutsideOfDefiningBlock(), LinearizeExprTree(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::BitcodeReader::MaterializeModule(), OptimizeAwayTrappingUsesOfLoads(), OptimizeCmpExpression(), OptimizeGlobalAddressOfMalloc(), OptimizeNoopCopyExpression(), passingValueIsAlwaysUndefined(), llvm::AssemblyWriter::printBasicBlock(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), RemoveDeadConstant(), removeDeadUsersOfConstant(), replaceAllUsesWith(), ReplaceCallWith(), ReplaceUsesOfMallocWithGlobal(), replaceUsesOfWithOnConstant(), RewriteUsesOfClonedInstructions(), RewriteUsesOfLoadForHeapSRoA(), llvm::LoadAndStorePromoter::run(), llvm::Inliner::runOnSCC(), llvm::FunctionLoweringInfo::set(), llvm::InstCombiner::SimplifyDivRemOfSelect(), SinkThenElseCodeToEnd(), SRAGlobal(), tryToMakeAllocaBePromotable(), TryToShrinkGlobalToBoolean(), llvm::PtrUseVisitor< PartitionBuilder >::visitGetElementPtrInst(), WriteUseList(), llvm::BasicBlock::~BasicBlock(), and ~Value().

use_iterator llvm::Value::use_end ( ) [inline]

Definition at line 149 of file Value.h.

Referenced by AddressIsTaken(), llvm::IVUsers::AddUsersImpl(), llvm::InstCombineWorklist::AddUsersToWorkList(), AllCallersPassInValidPointerForArgument(), AllGlobalLoadUsesSimpleEnoughForHeapSRA(), AllUsesOfLoadedValueWillTrapIfNull(), AllUsesOfValueWillTrapIfNull(), AlmostDeadIV(), AnalyzeGlobal(), areAllUsesEqual(), ChangeCalleesToFastCall(), llvm::GraphTraits< const Value * >::child_end(), llvm::GraphTraits< Value * >::child_end(), CleanupConstantGlobalUsers(), CleanupPointerRootUsers(), ConstantPropUsersOf(), DoesRetainableObjPtrEscape(), llvm::detail::PtrUseVisitorBase::enqueueUsers(), FindInitTrampolineFromAlloca(), FindPhiPredForUseInBlock(), FindSingleUseIdentifiedObject(), getFirst(), llvm::getMallocType(), getNumUses(), GlobalUsersSafeToSRA(), llvm::Function::hasAddressTaken(), hasLifetimeMarkers(), hasNonInstructionUse(), hasNUses(), hasNUsesOrMore(), hasOneUse(), INITIALIZE_PASS(), llvm::isAllocaPromotable(), isAllocSiteRemovable(), llvm::Constant::isConstantUsed(), llvm::Function::isDefTriviallyDead(), isHighCostExpansion(), isOnlyCopiedFromConstantGlobal(), isOnlyUsedInEntryBlock(), IsOnlyUsedInZeroEqualityComparison(), isSafePHIToSpeculate(), isSafeSelectToSpeculate(), isSafeSROAElementUse(), IsStoredObjCPointer(), isUsedByLifetimeMarker(), isUsedInBasicBlock(), llvm::Instruction::isUsedOutsideOfBlock(), isUsedOutsideOfDefiningBlock(), IsUserOfGlobalSafeForSRA(), LLVMGetFirstUse(), LoadUsesSimpleEnoughForHeapSRA(), llvm::BitcodeReader::Materialize(), llvm::BitcodeReader::MaterializeModule(), NegateValue(), OnlyUsedBy(), llvm::onlyUsedByLifetimeMarkers(), OptimizeAwayTrappingUsesOfLoads(), OptimizeAwayTrappingUsesOfValue(), OptimizeCmpExpression(), OptimizeNoopCopyExpression(), PerformHeapAllocSRoA(), llvm::PointerMayBeCaptured(), llvm::ValueEnumerator::print(), ProcessUGT_ADDCST_ADD(), PushDefUseChildren(), pushIVUsers(), llvm::Constant::removeDeadConstantUsers(), removeLifetimeIntrinsicUsers(), RemoveNestAttribute(), replaceAllNonLLVMUsedUsesWith(), replaceAndRecursivelySimplifyImpl(), ReplaceUsesOfWith(), RewriteHeapSROALoadUser(), RewriteUsesOfClonedInstructions(), RewriteUsesOfLoadForHeapSRoA(), SafeToDestroyConstant(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), llvm::SparseSolver::Solve(), tryToMakeAllocaBePromotable(), TryToShrinkGlobalToBoolean(), llvm::UpgradeCallsToIntrinsic(), usedInGlobalVarDef(), usedInOneFunc(), useFuncSeen(), ValueIsOnlyUsedLocallyOrStoredToOneGlobal(), WriteUseList(), and ~Value().

const_use_iterator llvm::Value::use_end ( ) const [inline]

Definition at line 150 of file Value.h.


Friends And Related Function Documentation

friend class ValueHandleBase [friend]

Definition at line 83 of file Value.h.

friend class ValueSymbolTable [friend]

Definition at line 82 of file Value.h.


Member Data Documentation

const unsigned llvm::Value::MaximumAlignment = 1u << 29 [static]

MaximumAlignment - This is the greatest alignment value supported by load, store, and alloca instructions, and global values.

Definition at line 316 of file Value.h.

Referenced by llvm::getOrEnforceKnownAlignment().


The documentation for this class was generated from the following files: