LLVM API Documentation
#include <Value.h>


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. All types can have a name and they should 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.
Definition at line 55 of file Value.h.
| typedef value_use_iterator<const User> llvm::Value::use_const_iterator |
| enum llvm::Value::ValueTy |
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.
| Value::~Value | ( | ) | [virtual] |
Definition at line 48 of file Value.cpp.
References llvm::StringMapEntry< ValueTy >::Destroy(), DOUT, E, getNameStr(), I, llvm::LeakDetector::removeGarbageObject(), use_begin(), use_empty(), and use_end().
| void Value::dump | ( | ) | const [virtual] |
dump - Support for debugging, callable in GDB: V->dump()
Definition at line 1832 of file AsmWriter.cpp.
References llvm::errs(), llvm::raw_ostream::flush(), and print().
Referenced by llvm::ExecutionEngine::InitializeMemory().
| void Value::print | ( | std::ostream & | O, | |
| AssemblyAnnotationWriter * | AAW = 0 | |||
| ) | const |
print - Implement operator<< on Value.
Definition at line 1826 of file AsmWriter.cpp.
References OS.
Referenced by dump(), llvm::operator<<(), and llvm::MachineConstantPool::print().
| void Value::print | ( | raw_ostream & | O, | |
| AssemblyAnnotationWriter * | AAW = 0 | |||
| ) | const |
Definition at line 1791 of file AsmWriter.cpp.
References A, llvm::CallingConv::C, llvm::BasicBlock::getParent(), llvm::GlobalValue::getParent(), I, llvm::WriteAsOperand(), and WriteConstantInt().
| const Type* llvm::Value::getType | ( | ) | const [inline] |
All values are typed, get the type of this value.
Reimplemented in llvm::ConstantInt, llvm::ConstantArray, llvm::ConstantStruct, llvm::ConstantVector, llvm::ConstantPointerNull, llvm::GlobalValue, llvm::InlineAsm, llvm::AllocationInst, llvm::GetElementPtrInst, llvm::InsertElementInst, llvm::ShuffleVectorInst, llvm::ExtractValueInst, and llvm::InsertValueInst.
Definition at line 88 of file Value.h.
Referenced by llvm::AliasSetTracker::add(), llvm::PHINode::addIncoming(), AssociativeOpt(), BuildSubAggregate(), llvm::Constant::canTrap(), llvm::CastInst::castIsValid(), llvm::CloneAndPruneFunctionInto(), CollectBSwapParts(), CollectShuffleElements(), CollectSingleShuffleElements(), llvm::ComputeMaskedBits(), llvm::ComputeNumSignBits(), llvm::ConstantArray::ConstantArray(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldCompareInstOperands(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldConstantExpression(), llvm::ConstantFoldExtractElementInstruction(), llvm::ConstantFoldExtractValueInstruction(), llvm::ConstantFoldGetElementPtr(), llvm::ConstantFoldInsertElementInstruction(), llvm::ConstantFoldInsertValueInstruction(), llvm::ConstantFoldInstOperands(), llvm::ConstantFoldInstruction(), llvm::ConstantFoldLoadThroughGEPConstantExpr(), llvm::ConstantFoldShuffleVectorInstruction(), llvm::ConstantStruct::ConstantStruct(), llvm::ConstantVector::ConstantVector(), ConvertShiftToMul(), llvm::SelectionDAGLowering::CopyValueToVirtualRegister(), llvm::BinaryOperator::Create(), llvm::DebugInfoBuilder::createBasicTypeDescriptor(), llvm::TargetFolder::CreateCast(), llvm::IRBuilder< preserveNames, T >::CreateCast(), llvm::DebugInfoBuilder::createCharacterTypeDescriptor(), llvm::DebugInfoBuilder::createCompileUnitDescriptor(), llvm::DebugInfoBuilder::createFloatTypeDescriptor(), llvm::CastInst::CreateFPCast(), llvm::IRBuilder< preserveNames, T >::CreateGlobalString(), llvm::TargetFolder::CreateIntCast(), llvm::IRBuilder< preserveNames, T >::CreateIntCast(), llvm::CastInst::CreateIntegerCast(), llvm::DebugInfoBuilder::createIntegerTypeDescriptor(), llvm::IRBuilder< preserveNames, T >::CreateIsNotNull(), llvm::IRBuilder< preserveNames, T >::CreateIsNull(), llvm::BinaryOperator::CreateNeg(), llvm::BinaryOperator::CreateNot(), llvm::CastInst::CreatePointerCast(), llvm::DebugInfoBuilder::createPointerTypeDescriptor(), llvm::FunctionLoweringInfo::CreateRegForValue(), llvm::CastInst::CreateSExtOrBitCast(), llvm::DebugInfoBuilder::createSubProgramDescriptor(), llvm::TargetFolder::CreateTruncOrBitCast(), llvm::CastInst::CreateTruncOrBitCast(), llvm::CastInst::CreateZExtOrBitCast(), DecomposeSimpleLinearExpr(), llvm::DemotePHIToStack(), llvm::DemoteRegToStack(), DominatesMergePoint(), dyn_castFoldableMul(), dyn_castNegVal(), llvm::AsmPrinter::EmitConstantValueOnly(), EmitGEPOffset(), llvm::AsmPrinter::EmitGlobalConstant(), EvaluateExpression(), evaluateFCmpRelation(), EvaluateGEPOffsetExpression(), evaluateICmpRelation(), EvaluateStoreInto(), llvm::Interpreter::executeGEPOperation(), llvm::X86TargetAsmInfo< BaseTAI >::ExpandInlineAsm(), llvm::FindInsertedValue(), FindMaximalLegalAddressingMode(), FindScalarElement(), FoldBitCast(), FoldCondBranchOnPHI(), foldConstantCastPair(), FoldOperationIntoSelectOperand(), FoldOpIntoSelect(), FoldTwoEntryPHINode(), llvm::gep_type_begin(), llvm::ConstantExpr::get(), GetAddressedElementFromGlobal(), getAggregateConstantElement(), getAISize(), llvm::ConstantExpr::getBitCast(), llvm::CastInst::getCastOpcode(), llvm::ConstantExpr::getCompare(), llvm::ConstantExpr::getCompareTy(), llvm::SelectionDAG::getConstantPool(), GetConstantPoolSizeInBytes(), llvm::ExecutionEngine::getConstantValue(), llvm::ConstantExpr::getExtractElement(), llvm::ConstantExpr::getExtractValue(), llvm::ConstantExpr::getExtractValueTy(), llvm::ConstantExpr::getFCmp(), llvm::ConstantExpr::getFPCast(), llvm::ConstantExpr::getFPExtend(), llvm::ConstantExpr::getFPToSI(), llvm::ConstantExpr::getFPToUI(), llvm::ConstantExpr::getFPTrunc(), llvm::ConstantExpr::getGetElementPtr(), llvm::ConstantExpr::getGetElementPtrTy(), llvm::ConstantExpr::getICmp(), llvm::ConstantExpr::getInsertElement(), llvm::ConstantExpr::getInsertValue(), llvm::ConstantExpr::getInsertValueTy(), llvm::ConstantExpr::getIntegerCast(), llvm::ConstantExpr::getIntToPtr(), llvm::SelectionDAG::getMemOperand(), llvm::AliasAnalysis::getModRefInfo(), llvm::ConstantExpr::getNeg(), llvm::ConstantExpr::getNot(), llvm::ConstantExpr::getPointerCast(), llvm::ConstantExpr::getPtrToInt(), llvm::FastISel::getRegForValue(), llvm::ConstantExpr::getSelect(), GetSelectFoldableConstant(), llvm::ConstantExpr::getSelectTy(), llvm::ConstantExpr::getSExt(), llvm::ConstantExpr::getSExtOrBitCast(), llvm::ConstantExpr::getShuffleVector(), llvm::ConstantExpr::getSIToFP(), llvm::SelectionDAG::getSrcValue(), llvm::DISerializer::getString(), GetStringLength(), llvm::ConstantExpr::getTrunc(), llvm::ConstantExpr::getTruncOrBitCast(), llvm::ConstantExpr::getTy(), llvm::SCEVUDivExpr::getType(), llvm::CallSite::getType(), llvm::ConstantExpr::getUIToFP(), getUnderlyingObject(), llvm::SelectionDAGLowering::getValue(), llvm::Mangler::getValueName(), GetVectorElement(), llvm::Constant::getVectorElements(), llvm::ConstantExpr::getVFCmp(), llvm::ConstantExpr::getVICmp(), llvm::ConstantExpr::getWithOperandReplaced(), llvm::ConstantExpr::getWithOperands(), llvm::ConstantExpr::getZExt(), llvm::ConstantExpr::getZExtOrBitCast(), llvm::GlobalAlias::GlobalAlias(), llvm::GlobalVariable::GlobalVariable(), llvm::Argument::hasByValAttr(), llvm::PHINode::hasConstantValue(), llvm::Argument::hasNoAliasAttr(), llvm::Argument::hasStructRetAttr(), HoistThenElseCodeToIf(), IdxCompare(), IndexOperandsEqual(), llvm::SequentialType::indexValid(), llvm::StructType::indexValid(), llvm::BinaryOperator::init(), llvm::ExecutionEngine::InitializeMemory(), llvm::MachOWriter::InitMem(), llvm::InlineFunction(), InsertCastToIntPtrTy(), llvm::InsertProfilingInitCall(), InstallGlobalCtors(), InstCombineLoadCast(), InstCombineStoreToCast(), llvm::Instruction::isAssociative(), isBytewiseValue(), IsConstantOffsetFromGlobal(), isEliminableCastPair(), isFPCSafeToPrint(), isFPIntBitCast(), llvm::Instruction::isIdenticalTo(), llvm::CastInst::isIntegerCast(), llvm::CastInst::isLosslessCast(), llvm::CastInst::isNoopCast(), isSafeToEliminateVarargsCast(), llvm::Instruction::isSameOperationAs(), llvm::ShuffleVectorInst::isValidOperands(), llvm::InsertElementInst::isValidOperands(), llvm::ExtractElementInst::isValidOperands(), llvm::TargetLowering::LowerArguments(), LowerBSWAP(), llvm::SelectionDAGLowering::LowerCallTo(), LowerCTLZ(), LowerCTPOP(), llvm::IntrinsicLowering::LowerIntrinsicCall(), LowerNegateToMultiply(), LowerPartSelect(), LowerPartSet(), llvm::ELFTargetAsmInfo::MergeableConstSection(), llvm::DarwinTargetAsmInfo::MergeableConstSection(), MoveImmediateValues(), OptimizeNoopCopyExpression(), OptimizeOnceStoredGlobal(), PerformHeapAllocSRoA(), llvm::X86ATTAsmPrinter::printModuleLevelGV(), PushValueAndType(), llvm::AliasSetTracker::remove(), RemoveCommonExpressionsFromUseBases(), RemoveDeadConstant(), llvm::PHINode::removeIncomingValue(), replaceAllUsesWith(), ReplaceFPIntrinsicWithCall(), llvm::ConstantExpr::replaceUsesOfWithOnConstant(), retrieveAddrSpace(), RewriteHeapSROALoadUser(), llvm::JIT::runFunction(), llvm::FindUsedTypes::runOnModule(), llvm::FastISel::SelectOperator(), llvm::FunctionLoweringInfo::set(), llvm::GlobalAlias::setAliasee(), llvm::MemIntrinsic::setAlignment(), llvm::MemIntrinsic::setDest(), llvm::MemIntrinsic::setLength(), setName(), llvm::MemMoveInst::setSource(), llvm::MemCpyInst::setSource(), llvm::MemSetInst::setValue(), llvm::SimplifyCFG(), SpeculativelyExecuteBB(), llvm::SplitBlockPredecessors(), stripPointerCasts(), SymbolicallyEvaluateBinop(), SymbolicallyEvaluateGEP(), TryToShrinkGlobalToBoolean(), llvm::UpgradeIntrinsicCall(), ValueRequiresCast(), llvm::Interpreter::visitBinaryOperator(), llvm::Interpreter::visitBitCastInst(), llvm::Interpreter::visitCallSite(), llvm::Interpreter::visitFCmpInst(), llvm::Interpreter::visitFPExtInst(), llvm::Interpreter::visitFPToSIInst(), llvm::Interpreter::visitFPToUIInst(), llvm::Interpreter::visitFPTruncInst(), llvm::Interpreter::visitFreeInst(), llvm::Interpreter::visitICmpInst(), llvm::Interpreter::visitIntToPtrInst(), llvm::Interpreter::visitLoadInst(), llvm::SCEVExpander::visitMulExpr(), llvm::Interpreter::visitPtrToIntInst(), llvm::Interpreter::visitReturnInst(), llvm::Interpreter::visitSExtInst(), llvm::Interpreter::visitSIToFPInst(), llvm::Interpreter::visitStoreInst(), llvm::Interpreter::visitSwitchInst(), llvm::Interpreter::visitTruncInst(), llvm::Interpreter::visitUIToFPInst(), llvm::Interpreter::visitVAArgInst(), llvm::Interpreter::visitZExtInst(), llvm::WriteAsOperand(), WriteConstantInt(), WriteConstants(), and WriteInstruction().
| bool llvm::Value::hasName | ( | ) | const [inline] |
Definition at line 91 of file Value.h.
References Name.
Referenced by llvm::CloneBasicBlock(), llvm::ExecutionEngine::emitGlobals(), getSymbols(), llvm::Mangler::getValueName(), InsertName(), LinkFunctionProtos(), LinkGlobals(), llvm::MergeBlockIntoPredecessor(), llvm::SparseSolver::Print(), setName(), takeName(), TryToSimplifyUncondBranchFromEmptyBlock(), and WriteAsOperandInternal().
| ValueName* llvm::Value::getValueName | ( | ) | const [inline] |
Definition at line 92 of file Value.h.
References Name.
Referenced by llvm::canConstantFoldCallTo(), llvm::ConstantFoldCall(), and llvm::Function::getIntrinsicID().
| const char * Value::getNameStart | ( | ) | const |
getNameStart - Return a pointer to a null terminated string for this name. Note that names can have null characters within the string as well as at their end. This always returns a non-null pointer.
getNameStart - Return a pointer to a null terminated string for this name. Note that names can have null characters within the string as well as at their end. This always returns a non-null pointer.
Definition at line 140 of file Value.cpp.
References llvm::StringMapEntry< ValueTy >::getKeyData().
Referenced by CanPropagatePredecessorsForPHIs(), EvaluateGEPOffsetExpression(), llvm::LibCallInfo::getFunctionInfo(), getNameEnd(), llvm::Mangler::getValueName(), InsertName(), isName(), LinkFunctionProtos(), LinkGlobals(), llvm::AsmPrinter::printBasicBlockLabel(), PrintLLVMName(), PrintUnmangledNameSafely(), llvm::FPPassManager::runOnFunction(), llvm::UpgradeIntrinsicCall(), and llvm::PMDataManager::verifyDomInfo().
| const char* llvm::Value::getNameEnd | ( | ) | const [inline] |
getNameEnd - Return a pointer to the end of the name.
Definition at line 99 of file Value.h.
References getNameLen(), and getNameStart().
Referenced by LinkFunctionProtos(), and LinkGlobals().
| bool Value::isName | ( | const char * | N | ) | const |
isName - Return true if this value has the name specified by the provided nul terminated string.
isName - Return true if this value has the name specified by the provided nul terminated string.
Definition at line 153 of file Value.cpp.
References getNameLen(), and getNameStart().
| unsigned Value::getNameLen | ( | ) | const |
getNameLen - Return the length of the string, correctly handling nul characters embedded into them.
getNameLen - Return the length of the string, correctly handling nul characters embedded into them.
Definition at line 147 of file Value.cpp.
References llvm::StringMapEntryBase::getKeyLength().
Referenced by llvm::LibCallInfo::getFunctionInfo(), getNameEnd(), isName(), PrintLLVMName(), and PrintUnmangledNameSafely().
| std::string llvm::Value::getName | ( | ) | const [inline] |
getName()/getNameStr() - Return the name of the specified value, constructing a string* to hold it. Because these are guaranteed to construct a string, they are very expensive and should be avoided.
Definition at line 112 of file Value.h.
References getNameStr().
Referenced by llvm::Interpreter::callExternalFunction(), llvm::CloneBasicBlock(), llvm::CloneFunction(), llvm::DemotePHIToStack(), llvm::DemoteRegToStack(), llvm::PIC16RegisterInfo::eliminateFrameIndex(), llvm::MipsRegisterInfo::eliminateFrameIndex(), EmitGEPOffset(), llvm::ExecutionEngine::emitGlobals(), llvm::ExecutionEngine::EmitGlobalVariable(), llvm::AsmPrinter::EmitSpecialLLVMGlobal(), EvaluateFunction(), EvaluateStaticConstructor(), FoldBlockIntoPredecessor(), FoldBranchToCommonDest(), FoldCondBranchOnPHI(), FoldOperationIntoSelectOperand(), FoldTwoEntryPHINode(), ForceRenaming(), getBackEdges(), llvm::AsmPrinter::getCurrentFunctionEHName(), getGlobalVariableClass(), llvm::DOTGraphTraits< SelectionDAG * >::getGraphName(), llvm::DOTGraphTraits< const MachineFunction * >::getGraphName(), llvm::DOTGraphTraits< const Function * >::getGraphName(), GetHeapSROALoad(), GetLinkageResult(), llvm::DOTGraphTraits< const MachineFunction * >::getNodeLabel(), llvm::DOTGraphTraits< const Function * >::getNodeLabel(), llvm::JIT::getOrEmitGlobalVariable(), llvm::JIT::getPointerToFunction(), getSymbols(), llvm::Mangler::getValueName(), HandleInlinedInvoke(), HoistThenElseCodeToIf(), InlineCallIfPossible(), llvm::InlineFunction(), llvm::SCEVExpander::InsertCastOfTo(), InstCombineLoadCast(), InstCombineStoreToCast(), LinkAlias(), LinkFunctionProtos(), LinkGlobalInits(), LinkGlobals(), llvm::PIC16InstrInfo::loadRegFromStackSlot(), lookupFunction(), llvm::IntrinsicLowering::LowerIntrinsicCall(), LowerPartSelect(), LowerPartSet(), NegateValue(), OptimizeGlobalAddressOfMalloc(), PerformHeapAllocSRoA(), llvm::Trace::print(), llvm::ScalarEvolution::print(), llvm::PIC16ConstantPoolValue::print(), llvm::MachineInstr::print(), llvm::MachineFunction::print(), llvm::MachineBasicBlock::print(), llvm::CallGraphNode::print(), llvm::ARMConstantPoolValue::print(), llvm::X86ATTAsmPrinter::printModuleLevelGV(), ReplaceCallWith(), ReplaceUsesOfMallocWithGlobal(), RewriteHeapSROALoadUser(), llvm::SelectionDAGISel::runOnFunction(), llvm::X86ATTAsmPrinter::runOnMachineFunction(), llvm::Inliner::runOnSCC(), SimplifyCondBranchToCondBranch(), SpecializeFunction(), SpeculativelyExecuteBB(), llvm::SplitBlock(), llvm::SplitBlockPredecessors(), llvm::SplitCriticalEdge(), SRAGlobal(), llvm::PIC16InstrInfo::storeRegToStackSlot(), TryToShrinkGlobalToBoolean(), llvm::X86COFFTargetAsmInfo::UniqueSectionForGlobal(), llvm::TargetAsmInfo::UniqueSectionForGlobal(), llvm::UpgradeIntrinsicCall(), UpgradeIntrinsicFunction1(), llvm::Function::viewCFG(), and llvm::ScheduleDAG::viewGraph().
| std::string Value::getNameStr | ( | ) | const |
Definition at line 159 of file Value.cpp.
References llvm::StringMapEntry< ValueTy >::getKeyData(), and llvm::StringMapEntryBase::getKeyLength().
Referenced by getName(), llvm::SparseSolver::Print(), and ~Value().
| void Value::setName | ( | const std::string & | name | ) |
Definition at line 165 of file Value.cpp.
Referenced by llvm::AllocationInst::AllocationInst(), llvm::Argument::Argument(), llvm::BinaryOperator::BinaryOperator(), llvm::CloneBasicBlock(), llvm::CmpInst::CmpInst(), llvm::IRBuilder< preserveNames, T >::CreateGlobalString(), llvm::ExtractElementInst::ExtractElementInst(), FoldBranchToCommonDest(), FoldCondBranchOnPHI(), ForceRenaming(), llvm::Module::getOrInsertFunction(), llvm::GlobalValue::GlobalValue(), llvm::IRBuilder< preserveNames, T >::InsertHelper(), LinkAppendingVars(), llvm::LoadInst::LoadInst(), LowerPartSelect(), LowerPartSet(), NegateValue(), setName(), llvm::ShuffleVectorInst::ShuffleVectorInst(), StripSymtab(), takeName(), and UpgradeIntrinsicFunction1().
| void Value::setName | ( | const char * | Name, | |
| unsigned | NameLen | |||
| ) |
Definition at line 173 of file Value.cpp.
References llvm::StringMapEntry< ValueTy >::Create(), llvm::ValueSymbolTable::createValueName(), llvm::StringMapEntry< ValueTy >::Destroy(), llvm::StringMapEntry< ValueTy >::getKeyData(), llvm::StringMapEntryBase::getKeyLength(), getSymTab(), getType(), hasName(), llvm::ValueSymbolTable::removeValueName(), llvm::StringMapEntry< ValueTy >::setValue(), and llvm::Type::VoidTy.
| void Value::setName | ( | const char * | Name | ) |
| void Value::takeName | ( | Value * | V | ) |
takeName - transfer the name from V to this value, setting V's name to empty. It is an error to call V->takeName(V).
takeName - transfer the name from V to this value, setting V's name to empty. It is an error to call V->takeName(V).
Definition at line 231 of file Value.cpp.
References llvm::StringMapEntry< ValueTy >::Destroy(), getSymTab(), hasName(), Name, llvm::ValueSymbolTable::reinsertValue(), llvm::ValueSymbolTable::removeValueName(), setName(), and llvm::StringMapEntry< ValueTy >::setValue().
Referenced by BreakUpSubtract(), ConvertShiftToMul(), FoldBranchToCommonDest(), FoldTwoEntryPHINode(), ForceRenaming(), HoistThenElseCodeToIf(), InstallGlobalCtors(), LowerNegateToMultiply(), llvm::MergeBlockIntoPredecessor(), TryToShrinkGlobalToBoolean(), and TryToSimplifyUncondBranchFromEmptyBlock().
| 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 315 of file Value.cpp.
References getType(), and uncheckedReplaceAllUsesWith().
Referenced by AddReachableCodeToWorklist(), AssociativeOpt(), BreakUpSubtract(), ChangeToCall(), llvm::CloneAndPruneFunctionInto(), ConvertShiftToMul(), llvm::DemotePHIToStack(), EvaluateStaticConstructor(), FindPHIToPartitionLoops(), FoldBlockIntoPredecessor(), FoldCondBranchOnPHI(), FoldTwoEntryPHINode(), HandleInlinedInvoke(), HoistThenElseCodeToIf(), llvm::InlineFunction(), InstallGlobalCtors(), LinkAppendingVars(), LinkFunctionProtos(), LinkGlobals(), llvm::IntrinsicLowering::LowerIntrinsicCall(), LowerNegateToMultiply(), llvm::MergeBlockIntoPredecessor(), OptimizeGlobalAddressOfMalloc(), llvm::PHINode::removeIncomingValue(), llvm::BasicBlock::removePredecessor(), ReplaceCallWith(), llvm::BitcodeReaderValueList::ResolveConstantForwardRefs(), RewriteHeapSROALoadUser(), llvm::SimplifyCFG(), SpecializeFunction(), llvm::SplitBlockPredecessors(), SRAGlobal(), TryToShrinkGlobalToBoolean(), llvm::UnrollLoop(), and llvm::UpgradeIntrinsicCall().
| void Value::uncheckedReplaceAllUsesWith | ( | Value * | V | ) |
Definition at line 299 of file Value.cpp.
References llvm::CallingConv::C, llvm::Use::getUser(), llvm::Use::set(), and use_empty().
Referenced by llvm::ConvertConstantType< ConstantExpr, Type >::convert(), llvm::ConvertConstantType< UndefValue, Type >::convert(), llvm::ConvertConstantType< ConstantPointerNull, PointerType >::convert(), llvm::ConvertConstantType< ConstantVector, VectorType >::convert(), llvm::ConvertConstantType< ConstantStruct, StructType >::convert(), llvm::ConvertConstantType< ConstantArray, ArrayType >::convert(), llvm::ConvertConstantType< ConstantAggregateZero, Type >::convert(), replaceAllUsesWith(), llvm::ConstantExpr::replaceUsesOfWithOnConstant(), llvm::ConstantVector::replaceUsesOfWithOnConstant(), llvm::ConstantStruct::replaceUsesOfWithOnConstant(), and llvm::ConstantArray::replaceUsesOfWithOnConstant().
| bool llvm::Value::use_empty | ( | ) | const [inline] |
Definition at line 141 of file Value.h.
Referenced by DeadPHICycle(), llvm::DemotePHIToStack(), llvm::DemoteRegToStack(), llvm::Constant::destroyConstantImpl(), llvm::AsmPrinter::doFinalization(), llvm::AsmPrinter::EmitSpecialLLVMGlobal(), EraseDeadInstructions(), EvaluateStaticConstructor(), FindSingleUseMultiplyFactors(), getGlobalVariableClass(), InlineCallIfPossible(), llvm::InlineFunction(), InstallGlobalCtors(), llvm::isInstructionTriviallyDead(), isOnlyUsedInEntryBlock(), isReassociableOp(), llvm::IntrinsicLowering::LowerIntrinsicCall(), OptimizeAwayTrappingUsesOfLoads(), OptimizeAwayTrappingUsesOfValue(), OptimizeCmpExpression(), OptimizeGlobalAddressOfMalloc(), OptimizeNoopCopyExpression(), PerformHeapAllocSRoA(), RemoveDeadConstant(), removeDeadUsersOfConstant(), ReplaceCallWith(), ReplaceUsesOfMallocWithGlobal(), RewriteHeapSROALoadUser(), RewriteUsesOfLoadForHeapSRoA(), llvm::FunctionLoweringInfo::set(), llvm::SimplifyCFG(), uncheckedReplaceAllUsesWith(), llvm::UpgradeIntrinsicCall(), and ~Value().
| use_iterator llvm::Value::use_begin | ( | ) | [inline] |
Definition at line 142 of file Value.h.
Referenced by AddressIsTaken(), AddressMightEscape(), AllCalleesPassInValidPointerForArgument(), AllUsersAreLoads(), AllUsesOfLoadedValueWillTrapIfNull(), AllUsesOfValueWillTrapIfNull(), AnalyzeGlobal(), ChangeCalleesToFastCall(), llvm::GraphTraits< User * >::child_begin(), llvm::GraphTraits< const User * >::child_begin(), CleanupConstantGlobalUsers(), ConstantIsDead(), ConstantPropUsersOf(), getGlobalVariablesUsing(), getNextStopPoint(), getNumUses(), llvm::SourceFunctionInfo::getSourceLocation(), GlobalLoadUsesSimpleEnoughForHeapSRA(), GlobalUsersSafeToSRA(), hasNUses(), hasNUsesOrMore(), hasOneUse(), llvm::SCEVExpander::InsertCastOfTo(), llvm::isAllocaPromotable(), isOnlyCopiedFromConstantGlobal(), isOnlyUsedInEntryBlock(), IsOnlyUsedInZeroEqualityComparison(), isSafeSROAElementUse(), isUsedInBasicBlock(), llvm::Instruction::isUsedOutsideOfBlock(), isUsedOutsideOfDefiningBlock(), IsUserOfGlobalSafeForSRA(), llvm::BitcodeReader::materializeFunction(), llvm::BitcodeReader::materializeModule(), OnlyCalledDirectly(), OptimizeAwayTrappingUsesOfLoads(), OptimizeAwayTrappingUsesOfValue(), OptimizeCmpExpression(), OptimizeNoopCopyExpression(), llvm::GlobalValue::removeDeadConstantUsers(), RemoveNestAttribute(), ReplaceUsesOfMallocWithGlobal(), SpecializeFunction(), SpeculativelyExecuteBB(), TryToShrinkGlobalToBoolean(), llvm::UnrollLoop(), llvm::UpgradeCallsToIntrinsic(), use_back(), llvm::Instruction::use_back(), llvm::BasicBlock::use_back(), ValueIsOnlyUsedLocallyOrStoredToOneGlobal(), and ~Value().
| use_const_iterator llvm::Value::use_begin | ( | ) | const [inline] |
| use_iterator llvm::Value::use_end | ( | ) | [inline] |
Definition at line 144 of file Value.h.
Referenced by AddressIsTaken(), AddressMightEscape(), AllCalleesPassInValidPointerForArgument(), AllUsersAreLoads(), AllUsesOfLoadedValueWillTrapIfNull(), AllUsesOfValueWillTrapIfNull(), AnalyzeGlobal(), ChangeCalleesToFastCall(), llvm::GraphTraits< User * >::child_end(), llvm::GraphTraits< const User * >::child_end(), CleanupConstantGlobalUsers(), ConstantIsDead(), ConstantPropUsersOf(), getGlobalVariablesUsing(), getNextStopPoint(), getNumUses(), llvm::SourceFunctionInfo::getSourceLocation(), GlobalLoadUsesSimpleEnoughForHeapSRA(), GlobalUsersSafeToSRA(), hasNUses(), hasNUsesOrMore(), hasOneUse(), llvm::SCEVExpander::InsertCastOfTo(), llvm::isAllocaPromotable(), isOnlyCopiedFromConstantGlobal(), isOnlyUsedInEntryBlock(), IsOnlyUsedInZeroEqualityComparison(), isSafeSROAElementUse(), isUsedInBasicBlock(), llvm::Instruction::isUsedOutsideOfBlock(), isUsedOutsideOfDefiningBlock(), IsUserOfGlobalSafeForSRA(), llvm::BitcodeReader::materializeFunction(), llvm::BitcodeReader::materializeModule(), OnlyCalledDirectly(), OptimizeAwayTrappingUsesOfLoads(), OptimizeAwayTrappingUsesOfValue(), OptimizeCmpExpression(), OptimizeNoopCopyExpression(), llvm::GlobalValue::removeDeadConstantUsers(), RemoveNestAttribute(), SpecializeFunction(), SpeculativelyExecuteBB(), TryToShrinkGlobalToBoolean(), llvm::UnrollLoop(), llvm::UpgradeCallsToIntrinsic(), ValueIsOnlyUsedLocallyOrStoredToOneGlobal(), and ~Value().
| use_const_iterator llvm::Value::use_end | ( | ) | const [inline] |
| User* llvm::Value::use_back | ( | ) | [inline] |
Reimplemented in llvm::BasicBlock, and llvm::Instruction.
Definition at line 146 of file Value.h.
References use_begin().
Referenced by llvm::Constant::destroyConstantImpl(), OptimizeGlobalAddressOfMalloc(), PerformHeapAllocSRoA(), and removeDeadUsersOfConstant().
| const User* llvm::Value::use_back | ( | ) | const [inline] |
Reimplemented in llvm::BasicBlock, and llvm::Instruction.
Definition at line 147 of file Value.h.
References use_begin().
| 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 153 of file Value.h.
References E, I, use_begin(), and use_end().
Referenced by AssociativeOpt(), CheapToScalarize(), ConvertShiftToMul(), DeadPHICycle(), dyn_castFoldableMul(), llvm::SelectionDAGLowering::FindMergedConditions(), FindSingleUseMultiplyFactors(), FoldBranchToCommonDest(), FoldCondBranchOnPHI(), FoldOpIntoSelect(), llvm::InlineCostAnalyzer::getInlineCost(), isOnlyUse(), isReassociableOp(), NegateValue(), RemoveDeadConstant(), ShouldBreakUpSubtract(), and TryToSinkInstruction().
| bool Value::hasNUses | ( | unsigned | N | ) | const |
| bool Value::hasNUsesOrMore | ( | unsigned | N | ) | const |
hasNUsesOrMore - Return true if this value has N users or more. This is logically equivalent to getNumUses() >= N.
hasNUsesOrMore - Return true if this value has N users or more. This is logically equivalent to getNumUses() >= N.
Definition at line 87 of file Value.cpp.
References E, use_begin(), and use_end().
Referenced by llvm::BasicBlock::removePredecessor(), and SRAGlobal().
| bool Value::isUsedInBasicBlock | ( | const BasicBlock * | BB | ) | const |
isUsedInBasicBlock - Return true if this value is used in the specified basic block.
Definition at line 98 of file Value.cpp.
References llvm::dyn_cast(), E, llvm::Instruction::getParent(), I, use_begin(), and use_