LLVM API Documentation
#include <User.h>
Public Types | |
| typedef Use * | op_iterator |
| typedef const Use * | const_op_iterator |
Public Member Functions | |
| ~User () | |
| void | operator delete (void *Usr) |
| operator delete - free memory allocated for User and Use objects | |
| void | operator delete (void *, unsigned) |
| placement delete - required by std, but never called. | |
| template<unsigned Idx> | |
| Use & | Op () |
| template<unsigned Idx> | |
| const Use & | Op () const |
| Value * | getOperand (unsigned i) const |
| void | setOperand (unsigned i, Value *Val) |
| const Use & | getOperandUse (unsigned i) const |
| Use & | getOperandUse (unsigned i) |
| unsigned | getNumOperands () const |
| op_iterator | op_begin () |
| const_op_iterator | op_begin () const |
| op_iterator | op_end () |
| const_op_iterator | op_end () const |
| void | dropAllReferences () |
| void | replaceUsesOfWith (Value *From, Value *To) |
Static Public Member Functions | |
| static bool | classof (const User *) |
| static bool | classof (const Value *V) |
Protected Member Functions | |
| void * | operator new (size_t s, unsigned Us) |
| User (const Type *ty, unsigned vty, Use *OpList, unsigned NumOps) | |
| Use * | allocHungoffUses (unsigned) const |
| void | dropHungoffUses (Use *U) |
Protected Attributes | |
| Use * | OperandList |
| unsigned | NumOperands |
Friends | |
| struct | HungoffOperandTraits |
Definition at line 47 of file User.h.
| typedef Use* llvm::User::op_iterator |
| typedef const Use* llvm::User::const_op_iterator |
| llvm::User::~User | ( | ) | [inline] |
| void * User::operator new | ( | size_t | s, | |
| unsigned | Us | |||
| ) | [protected] |
Definition at line 155 of file Use.cpp.
References End, llvm::PointerIntPair< PointerTy, IntBits, IntType >::setInt(), llvm::PointerIntPair< PointerTy, IntBits, IntType >::setPointer(), and llvm::tagOne.
Referenced by llvm::BitcodeReaderValueList::resize().
| void llvm::User::dropHungoffUses | ( | Use * | U | ) | [inline, protected] |
Definition at line 69 of file User.h.
References llvm::Use::getImpliedUser(), NumOperands, OperandList, and llvm::Use::zap().
Referenced by llvm::BitcodeReaderValueList::clear(), llvm::PHINode::~PHINode(), and llvm::SwitchInst::~SwitchInst().
| void User::operator delete | ( | void * | Usr | ) |
operator delete - free memory allocated for User and Use objects
Definition at line 420 of file Value.cpp.
References NumOperands, OperandList, and Start.
| void llvm::User::operator delete | ( | void * | , | |
| unsigned | ||||
| ) | [inline] |
| Use& llvm::User::Op | ( | ) | [inline] |
| const Use& llvm::User::Op | ( | ) | const [inline] |
Reimplemented in llvm::Constant.
Definition at line 92 of file User.h.
References NumOperands, and OperandList.
Referenced by llvm::AliasSetTracker::add(), llvm::AddCatchInfo(), AddressIsTaken(), llvm::BitcodeReaderValueList::AssignValue(), AssociativeOpt(), llvm::BitcodeReaderValueList::back(), BreakUpSubtract(), llvm::CannotBeNegativeZero(), CheapToScalarize(), llvm::FreeInst::clone(), llvm::CloneLoop(), CollectBSwapParts(), CollectShuffleElements(), CollectSingleShuffleElements(), llvm::ComputeMaskedBits(), llvm::ComputeNumSignBits(), llvm::ConstantFoldInstOperands(), ConvertShiftToMul(), DecomposeSimpleLinearExpr(), DominatesMergePoint(), dyn_castFoldableMul(), EnforceKnownAlignment(), EvaluateExpression(), EvaluateGEPOffsetExpression(), llvm::SelectionDAGLowering::FindMergedConditions(), FindSingleUseMultiplyFactors(), FoldBranchToCommonDest(), FoldOperationIntoSelectOperand(), FoldOpIntoSelect(), GatherConstantSetEQs(), GatherConstantSetNEs(), llvm::gep_type_begin(), llvm::DbgDeclareInst::getAddress(), llvm::InsertValueInst::getAggregateOperand(), llvm::MemIntrinsic::getAlignment(), llvm::AllocationInst::getArraySize(), getBitCastOperand(), llvm::CallSite::getCalledValue(), llvm::DbgStopPointInst::getColumn(), llvm::DbgStopPointInst::getColumnValue(), getConstantEvolvingPHI(), llvm::DbgRegionEndInst::getContext(), llvm::DbgRegionStartInst::getContext(), llvm::DbgStopPointInst::getContext(), llvm::InsertValueInst::getInsertedValueOperand(), llvm::MemIntrinsic::getLength(), llvm::DbgStopPointInst::getLine(), llvm::DbgStopPointInst::getLineValue(), llvm::ShuffleVectorInst::getMaskValue(), llvm::AliasAnalysis::getModRefInfo(), llvm::BinaryOperator::getNegArgument(), llvm::BinaryOperator::getNotArgument(), GetOffsetFromIndex(), llvm::Constant::getOperand(), llvm::GetElementPtrInst::getPointerOperand(), llvm::StoreInst::getPointerOperand(), llvm::LoadInst::getPointerOperand(), llvm::FreeInst::getPointerOperand(), llvm::MemIntrinsic::getRawDest(), llvm::MemMoveInst::getRawSource(), llvm::MemCpyInst::getRawSource(), getShuffleMask(), GetStringLengthH(), llvm::DbgFuncStartInst::getSubprogram(), llvm::LoopBase< BlockT >::getTripCount(), llvm::MemSetInst::getValue(), llvm::DbgDeclareInst::getVariable(), llvm::GetElementPtrInst::hasAllConstantIndices(), llvm::GetElementPtrInst::hasAllZeroIndices(), llvm::BinaryOperator::init(), InstCombineLoadCast(), InstCombineStoreToCast(), llvm::AllocationInst::isArrayAllocation(), isDynamicConstant(), isEliminableCastPair(), isFPIntBitCast(), llvm::Instruction::isIdenticalTo(), llvm::CastInst::isIntegerCast(), llvm::CastInst::isLosslessCast(), llvm::CastInst::isNoopCast(), isOnlyCopiedFromConstantGlobal(), IsOperandAMemoryOperand(), IsPointerOffset(), isSafeSROAElementUse(), isSafeToEliminateVarargsCast(), isSafeToLoadUnconditionally(), isSafeToSinkLoad(), llvm::Instruction::isSameOperationAs(), IsUserOfGlobalSafeForSRA(), llvm::IntrinsicLowering::LowerIntrinsicCall(), LowerNegateToMultiply(), LowerPartSelect(), LowerPartSet(), MightBeFoldableInst(), llvm::BitcodeReaderValueList::operator[](), OptimizeAwayTrappingUsesOfLoads(), OptimizeAwayTrappingUsesOfValue(), OptimizeCmpExpression(), OptimizeNoopCopyExpression(), PerformHeapAllocSRoA(), llvm::PointerMayBeCaptured(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), RemapInstruction(), llvm::AliasSetTracker::remove(), ReplaceFPIntrinsicWithCall(), replaceUsesOfWith(), llvm::BitcodeReaderValueList::ResolveConstantForwardRefs(), llvm::UnifyFunctionExitNodes::runOnFunction(), llvm::FastISel::SelectOperator(), ShouldBreakUpSubtract(), ShrinkDemandedConstant(), SRAGlobal(), StripDebugInfo(), TryToShrinkGlobalToBoolean(), llvm::UpgradeIntrinsicCall(), ValueIsOnlyUsedLocallyOrStoredToOneGlobal(), llvm::Interpreter::visitAllocationInst(), llvm::Interpreter::visitAShr(), llvm::Interpreter::visitBinaryOperator(), llvm::Interpreter::visitBitCastInst(), 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::visitLShr(), llvm::Interpreter::visitPtrToIntInst(), llvm::Interpreter::visitSelectInst(), llvm::Interpreter::visitSExtInst(), llvm::Interpreter::visitShl(), llvm::Interpreter::visitSIToFPInst(), llvm::Interpreter::visitStoreInst(), llvm::Interpreter::visitSwitchInst(), llvm::Interpreter::visitTruncInst(), llvm::Interpreter::visitUIToFPInst(), llvm::Interpreter::visitVAArgInst(), llvm::Interpreter::visitZExtInst(), and WriteInstruction().
Definition at line 96 of file User.h.
References NumOperands, and OperandList.
Referenced by llvm::BitcodeReaderValueList::AssignValue(), AssociativeOpt(), llvm::CloneLoop(), llvm::InlineFunction(), llvm::InsertProfilingInitCall(), OptimizeAwayTrappingUsesOfValue(), llvm::BitcodeReaderValueList::pop_back(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), RemapInstruction(), replaceUsesOfWith(), llvm::MemIntrinsic::setAlignment(), llvm::CallSite::setArgument(), llvm::CallSite::setCalledFunction(), llvm::MemIntrinsic::setDest(), llvm::MemIntrinsic::setLength(), llvm::Constant::setOperand(), llvm::MemMoveInst::setSource(), llvm::MemCpyInst::setSource(), llvm::MemSetInst::setValue(), and ShrinkDemandedConstant().
| unsigned llvm::User::getNumOperands | ( | ) | const [inline] |
Definition at line 112 of file User.h.
References NumOperands.
Referenced by llvm::AddCatchInfo(), llvm::MachineModuleInfo::AnalyzeModule(), BitCastConstantVector(), llvm::Constant::canTrap(), CheapToScalarize(), llvm::InvokeInst::clone(), llvm::BranchInst::clone(), llvm::ReturnInst::clone(), llvm::SelectInst::clone(), llvm::CallInst::clone(), llvm::GetElementPtrInst::clone(), llvm::CloneLoop(), llvm::ComputeMaskedBits(), llvm::ConstantFoldInsertValueInstruction(), llvm::Constant::ContainsRelocations(), llvm::ConvertConstantType< ConstantVector, VectorType >::convert(), llvm::ConvertConstantType< ConstantStruct, StructType >::convert(), llvm::ConvertConstantType< ConstantArray, ArrayType >::convert(), llvm::InsertElementInst::Create(), llvm::X86IntelAsmPrinter::EmitString(), llvm::AsmPrinter::EmitString(), EvaluateExpression(), EvaluateGEPOffsetExpression(), evaluateICmpRelation(), EvaluateStoreInto(), FindStaticTors(), FoldBitCast(), llvm::ConstantArray::getAsString(), getConstantEvolvingPHI(), llvm::DIDescriptor::getDescriptorField(), llvm::DIDescriptor::getGlobalVariableField(), llvm::ShuffleVectorInst::getMaskValue(), llvm::ScalarEvolution::getMulExpr(), llvm::DIArray::getNumElements(), llvm::GetElementPtrInst::getNumIndices(), GetOffsetFromIndex(), llvm::ConstantVector::getSplatValue(), llvm::DIDescriptor::getStringField(), GetStringLengthH(), llvm::DIDescriptor::getUInt64Field(), getValType(), llvm::ConstantExpr::getWithOperandReplaced(), llvm::ConstantExpr::getWithOperands(), llvm::GetElementPtrInst::hasAllConstantIndices(), llvm::GetElementPtrInst::hasAllZeroIndices(), llvm::GetElementPtrInst::hasIndices(), llvm::ExecutionEngine::InitializeMemory(), llvm::MachOWriter::InitMem(), llvm::ConstantVector::isAllOnesValue(), llvm::ConstantArray::isCString(), llvm::GlobalVariable::isDeclaration(), llvm::Instruction::isIdenticalTo(), IsPointerOffset(), isSafeSROAElementUse(), llvm::Instruction::isSameOperationAs(), llvm::ConstantArray::isString(), IsUserOfGlobalSafeForSRA(), llvm::MapValue(), llvm::VariadicOperandTraits< 3 >::op_begin(), llvm::HungoffOperandTraits< 2 >::op_end(), llvm::OperandTraits< User >::operands(), llvm::HungoffOperandTraits< 2 >::operands(), llvm::VariadicOperandTraits< 3 >::operands(), llvm::OptionalOperandTraits< >::operands(), OptimizeAwayTrappingUsesOfValue(), ParseGlobalCtors(), llvm::RecursivelyDeleteTriviallyDeadInstructions(), RemapInstruction(), RemapOperand(), llvm::SwitchInst::removeCase(), RemoveDeadConstant(), llvm::PHINode::removeIncomingValue(), replaceUsesOfWith(), llvm::GlobalVariable::replaceUsesOfWithOnConstant(), llvm::ConstantExpr::replaceUsesOfWithOnConstant(), llvm::ConstantVector::replaceUsesOfWithOnConstant(), llvm::ConstantStruct::replaceUsesOfWithOnConstant(), llvm::ConstantArray::replaceUsesOfWithOnConstant(), llvm::Constant::replaceUsesOfWithOnConstant(), llvm::BitcodeReaderValueList::resize(), llvm::ExecutionEngine::runStaticConstructorsDestructors(), llvm::BitcodeReaderValueList::size(), SRAGlobal(), llvm::Interpreter::visitReturnInst(), llvm::Interpreter::visitSwitchInst(), WriteConstantInt(), WriteConstants(), and WriteInstruction().
| op_iterator llvm::User::op_begin | ( | ) | [inline] |
Definition at line 120 of file User.h.
References OperandList.
Referenced by llvm::CallSite::arg_begin(), ChangeToCall(), llvm::GraphTraits< Inverse< User * > >::child_begin(), llvm::GraphTraits< Inverse< const User * > >::child_begin(), llvm::ConstantFoldConstantExpression(), llvm::ConstantFoldInstruction(), llvm::ConvertConstantType< ConstantExpr, Type >::convert(), DominatesMergePoint(), dropAllReferences(), EmitGEPOffset(), EnforceKnownAlignment(), EvaluateStoreInto(), FoldCondBranchOnPHI(), llvm::gep_type_begin(), llvm::ScalarEvolution::getAddExpr(), getBitCastOperand(), getShuffleMask(), HandleInlinedInvoke(), llvm::GetElementPtrInst::idx_begin(), llvm::CallSite::isCallee(), IsConstantOffsetFromGlobal(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::MapValue(), OnlyCalledDirectly(), llvm::OperandTraits< User >::op_begin(), ParseGlobalCtors(), llvm::RemapInstruction(), ReplaceFPIntrinsicWithCall(), llvm::BitcodeReaderValueList::ResolveConstantForwardRefs(), llvm::FindUsedTypes::runOnModule(), llvm::SimplifyCFG(), SpeculativelyExecuteBB(), and llvm::UpgradeIntrinsicCall().
| const_op_iterator llvm::User::op_begin | ( | ) | const [inline] |
| op_iterator llvm::User::op_end | ( | ) | [inline] |
Definition at line 122 of file User.h.
References NumOperands, and OperandList.
Referenced by llvm::CallSite::arg_end(), ChangeToCall(), llvm::ConstantFoldConstantExpression(), llvm::ConstantFoldInstruction(), llvm::ConvertConstantType< ConstantExpr, Type >::convert(), DominatesMergePoint(), dropAllReferences(), EmitGEPOffset(), EnforceKnownAlignment(), EvaluateStoreInto(), FoldCondBranchOnPHI(), llvm::gep_type_end(), llvm::ScalarEvolution::getAddExpr(), getShuffleMask(), HandleInlinedInvoke(), llvm::GetElementPtrInst::idx_end(), IsConstantOffsetFromGlobal(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::MapValue(), OnlyCalledDirectly(), llvm::OperandTraits< User >::op_end(), ParseGlobalCtors(), llvm::RemapInstruction(), ReplaceFPIntrinsicWithCall(), llvm::BitcodeReaderValueList::ResolveConstantForwardRefs(), llvm::FindUsedTypes::runOnModule(), llvm::SimplifyCFG(), SpeculativelyExecuteBB(), and llvm::UpgradeIntrinsicCall().
| const_op_iterator llvm::User::op_end | ( | ) | const [inline] |
| void llvm::User::dropAllReferences | ( | ) | [inline] |
Reimplemented in llvm::Function.
Definition at line 133 of file User.h.
References op_begin(), and op_end().
replaceUsesOfWith - Replaces all references to the "From" definition with references to the "To" definition.
Definition at line 394 of file Value.cpp.
References E, getNumOperands(), getOperand(), and setOperand().
Referenced by llvm::DemoteRegToStack(), llvm::BitcodeReader::materializeModule(), and ReplaceUsesOfMallocWithGlobal().
| static bool llvm::User::classof | ( | const User * | ) | [inline, static] |
| static bool llvm::User::classof | ( | const Value * | V | ) | [inline, static] |
Reimplemented from llvm::Value.
Reimplemented in llvm::Constant, llvm::ConstantInt, llvm::ConstantFP, llvm::ConstantAggregateZero, llvm::ConstantArray, llvm::ConstantStruct, llvm::ConstantVector, llvm::ConstantPointerNull, llvm::ConstantExpr, llvm::UndefValue, llvm::Function, llvm::GlobalAlias, llvm::GlobalValue, llvm::GlobalVariable, llvm::TerminatorInst, llvm::UnaryInstruction, llvm::BinaryOperator, llvm::CastInst, llvm::CmpInst, llvm::Instruction, llvm::AllocationInst, llvm::MallocInst, llvm::AllocaInst, llvm::FreeInst, llvm::LoadInst, llvm::StoreInst, llvm::GetElementPtrInst, llvm::ICmpInst, llvm::FCmpInst, llvm::VICmpInst, llvm::VFCmpInst, llvm::CallInst, llvm::SelectInst, llvm::VAArgInst, llvm::ExtractElementInst, llvm::InsertElementInst, llvm::ShuffleVectorInst, llvm::ExtractValueInst, llvm::InsertValueInst, llvm::PHINode, llvm::ReturnInst, llvm::BranchInst, llvm::SwitchInst, llvm::InvokeInst, llvm::UnwindInst, llvm::UnreachableInst, llvm::TruncInst, llvm::ZExtInst, llvm::SExtInst, llvm::FPTruncInst, llvm::FPExtInst, llvm::UIToFPInst, llvm::SIToFPInst, llvm::FPToUIInst, llvm::FPToSIInst, llvm::IntToPtrInst, llvm::PtrToIntInst, llvm::BitCastInst, llvm::IntrinsicInst, llvm::DbgInfoIntrinsic, llvm::DbgStopPointInst, llvm::DbgFuncStartInst, llvm::DbgRegionStartInst, llvm::DbgRegionEndInst, llvm::DbgDeclareInst, llvm::MemIntrinsic, llvm::MemCpyInst, llvm::MemMoveInst, llvm::MemSetInst, and llvm::EHSelectorInst.
friend struct HungoffOperandTraits [friend] |
Use* llvm::User::OperandList [protected] |
OperandList - This is a pointer to the array of Users for this operand. For nodes of fixed arity (e.g. a binary operator) this array will live prefixed to the derived class. For nodes of resizable variable arity (e.g. PHINodes, SwitchInst etc.), this memory will be dynamically allocated and should be destroyed by the classes' virtual dtor.
Definition at line 59 of file User.h.
Referenced by llvm::BitcodeReaderValueList::clear(), llvm::ConstantArray::ConstantArray(), llvm::ConstantStruct::ConstantStruct(), llvm::ConstantVector::ConstantVector(), dropHungoffUses(), llvm::BitcodeReaderValueList::getConstantFwdRef(), getOperand(), getOperandUse(), llvm::BitcodeReaderValueList::getValueFwdRef(), op_begin(), llvm::HungoffOperandTraits< 2 >::op_begin(), op_end(), llvm::HungoffOperandTraits< 2 >::op_end(), operator delete(), operator new(), llvm::BitcodeReaderValueList::push_back(), llvm::PHINode::removeIncomingValue(), llvm::ConstantStruct::replaceUsesOfWithOnConstant(), llvm::ConstantArray::replaceUsesOfWithOnConstant(), llvm::BitcodeReaderValueList::resize(), setOperand(), llvm::PHINode::~PHINode(), and ~User().
unsigned llvm::User::NumOperands [protected] |
NumOperands - The number of values used by this User.
Definition at line 63 of file User.h.
Referenced by llvm::SwitchInst::addCase(), dropHungoffUses(), llvm::BitcodeReaderValueList::empty(), llvm::BitcodeReaderValueList::getConstantFwdRef(), getNumOperands(), getOperand(), getOperandUse(), llvm::BitcodeReaderValueList::getValueFwdRef(), op_end(), operator delete(), operator new(), llvm::BitcodeReaderValueList::pop_back(), llvm::BitcodeReaderValueList::push_back(), llvm::SwitchInst::removeCase(), llvm::PHINode::removeIncomingValue(), llvm::GlobalVariable::setInitializer(), setOperand(), llvm::BitcodeReaderValueList::shrinkTo(), llvm::GlobalVariable::~GlobalVariable(), and ~User().