LLVM API Documentation
#include <User.h>
Inheritance diagram for llvm::User:
Public Types | |
typedef Use * | op_iterator |
typedef const Use * | const_op_iterator |
Public Member Functions | |
User (const Type *Ty, unsigned vty, Use *OpList, unsigned NumOps, const std::string &name="") | |
Value * | getOperand (unsigned i) const |
void | setOperand (unsigned i, Value *Val) |
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 Attributes | |
Use * | OperandList |
unsigned | NumOperands |
Definition at line 27 of file User.h.
typedef Use* llvm::User::op_iterator |
typedef const Use* llvm::User::const_op_iterator |
Value* llvm::User::getOperand | ( | unsigned | i | ) | const [inline] |
Reimplemented in llvm::Constant, llvm::ConstantExpr, llvm::UnaryInstruction, llvm::BinaryOperator, llvm::StoreInst, llvm::ShiftInst, llvm::SelectInst, llvm::ExtractElementInst, llvm::InsertElementInst, llvm::ShuffleVectorInst, llvm::ReturnInst, and llvm::BranchInst.
Definition at line 46 of file User.h.
References NumOperands, and OperandList.
Referenced by AddressIsTaken(), AssociativeOpt(), BreakUpSubtract(), CanEvaluateInDifferentType(), CheapToScalarize(), Coerce(), CollectBSwapParts(), ComputeMaskedBits(), llvm::ConvertExpressionToType(), ConvertOperandToType(), ConvertShiftToMul(), CountCodeReductionForConstant(), DominatesMergePoint(), EmitGEPOffset(), EvaluateExpression(), llvm::ExpressionConvertibleToType(), FoldCondBranchOnPHI(), GatherConstantSetEQs(), GatherConstantSetNEs(), llvm::gep_type_begin(), llvm::DbgDeclareInst::getAddress(), llvm::MemIntrinsic::getAlignment(), llvm::CallSite::getCalledValue(), llvm::DbgStopPointInst::getColumn(), llvm::DbgStopPointInst::getColumnValue(), getConstantStringLength(), llvm::DbgRegionEndInst::getContext(), llvm::DbgRegionStartInst::getContext(), llvm::DbgStopPointInst::getContext(), GetKnownAlignment(), llvm::MemIntrinsic::getLength(), llvm::DbgStopPointInst::getLine(), llvm::DbgStopPointInst::getLineValue(), llvm::ConstantExpr::getOperand(), llvm::Constant::getOperand(), llvm::GetElementPtrInst::getPointerOperand(), llvm::MemIntrinsic::getRawDest(), llvm::MemMoveInst::getRawSource(), llvm::MemCpyInst::getRawSource(), llvm::DbgFuncStartInst::getSubprogram(), llvm::Loop::getTripCount(), llvm::MemSetInst::getValue(), llvm::DbgDeclareInst::getVariable(), InstCombineLoadCast(), InstCombineStoreToCast(), isDynamicConstant(), isIdenticalBinaryInst(), isIdenticalTernaryInst(), llvm::Instruction::isIdenticalTo(), llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(), LowerNegateToMultiply(), OperandConvertibleToType(), llvm::ValueHandle::operator<(), OptimizeGEPExpression(), llvm::PPCTargetLowering::PerformDAGCombine(), llvm::BytecodeReader::ValueList::print(), llvm::RemapInstruction(), RemapInstruction(), replaceUsesOfWith(), ReplaceUsesOfWith(), llvm::UnifyFunctionExitNodes::runOnFunction(), ShrinkDemandedConstant(), llvm::SimplifyCFG(), SRAGlobal(), llvm::UpgradeIntrinsicCall(), llvm::SelectionDAGLowering::visitBinary(), llvm::SelectionDAGLowering::visitCall(), llvm::SelectionDAGLowering::visitCast(), llvm::SelectionDAGLowering::visitExtractElement(), llvm::SelectionDAGLowering::visitFrameReturnAddress(), llvm::SelectionDAGLowering::visitGetElementPtr(), llvm::SelectionDAGLowering::visitInlineAsm(), llvm::SelectionDAGLowering::visitInsertElement(), llvm::SelectionDAGLowering::visitMemIntrinsic(), llvm::SelectionDAGLowering::visitSelect(), llvm::SelectionDAGLowering::visitSetCC(), llvm::SelectionDAGLowering::visitShift(), llvm::SelectionDAGLowering::visitShuffleVector(), llvm::SelectionDAGLowering::visitSub(), llvm::SelectionDAGLowering::visitSwitch(), llvm::Interpreter::visitSwitchInst(), llvm::SelectionDAGLowering::visitTargetIntrinsic(), llvm::SelectionDAGLowering::visitVACopy(), llvm::SelectionDAGLowering::visitVAEnd(), and llvm::SelectionDAGLowering::visitVAStart().
void llvm::User::setOperand | ( | unsigned | i, | |
Value * | Val | |||
) | [inline] |
Reimplemented in llvm::UnaryInstruction, llvm::BinaryOperator, llvm::StoreInst, llvm::ShiftInst, llvm::SelectInst, llvm::ExtractElementInst, llvm::InsertElementInst, llvm::ShuffleVectorInst, llvm::ReturnInst, and llvm::BranchInst.
Definition at line 50 of file User.h.
References NumOperands, OperandList, and Val.
Referenced by AssociativeOpt(), Coerce(), llvm::ConvertExpressionToType(), ConvertOperandToType(), FoldCondBranchOnPHI(), llvm::InlineFunction(), llvm::InsertProfilingInitCall(), llvm::RemapInstruction(), RemapInstruction(), replaceUsesOfWith(), llvm::MemIntrinsic::setAlignment(), llvm::CallSite::setCalledFunction(), llvm::MemIntrinsic::setDest(), llvm::MemIntrinsic::setLength(), llvm::Constant::setOperand(), llvm::MemMoveInst::setSource(), llvm::MemCpyInst::setSource(), llvm::MemSetInst::setValue(), ShrinkDemandedConstant(), and llvm::SimplifyCFG().
unsigned llvm::User::getNumOperands | ( | ) | const [inline] |
Reimplemented in llvm::UnaryInstruction, llvm::BinaryOperator, llvm::StoreInst, llvm::ShiftInst, llvm::SelectInst, llvm::ExtractElementInst, llvm::InsertElementInst, and llvm::ShuffleVectorInst.
Definition at line 54 of file User.h.
References NumOperands.
Referenced by llvm::ConstantFoldCastInstruction(), llvm::ConvertConstantType< ConstantPacked, PackedType >::convert(), llvm::ConvertConstantType< ConstantStruct, StructType >::convert(), llvm::ConvertConstantType< ConstantArray, ArrayType >::convert(), llvm::ConvertExpressionToType(), ConvertOperandToType(), CountCodeReductionForConstant(), DominatesMergePoint(), EmitGEPOffset(), llvm::X86IntelAsmPrinter::EmitString(), llvm::AsmPrinter::EmitString(), EvaluateExpression(), evaluateRelation(), EvaluateStoreInto(), EvalVectorOp(), llvm::ExpressionConvertibleToType(), FindStaticTors(), FoldCondBranchOnPHI(), llvm::FunctionLoweringInfo::FunctionLoweringInfo(), llvm::ConstantArray::getAsString(), getConstantStringLength(), GetKnownAlignment(), llvm::GetElementPtrInst::getNumIndices(), getShuffleMask(), getUIntOperand(), getValType(), llvm::ConstantExpr::getWithOperandReplaced(), llvm::ConstantExpr::getWithOperands(), llvm::GetElementPtrInst::hasIndices(), IdenticalComplexInst(), llvm::ExecutionEngine::InitializeMemory(), llvm::GlobalVariable::isExternal(), llvm::Instruction::isIdenticalTo(), llvm::ConstantArray::isString(), llvm::MapValue(), OptimizeConstantExpr(), ParseGlobalCtors(), llvm::PPCTargetLowering::PerformDAGCombine(), llvm::RemapInstruction(), RemapInstruction(), RemapOperand(), llvm::SwitchInst::removeCase(), llvm::PHINode::removeIncomingValue(), replaceUsesOfWith(), ReplaceUsesOfWith(), llvm::GlobalVariable::replaceUsesOfWithOnConstant(), llvm::ConstantExpr::replaceUsesOfWithOnConstant(), llvm::ConstantPacked::replaceUsesOfWithOnConstant(), llvm::ConstantStruct::replaceUsesOfWithOnConstant(), llvm::ConstantArray::replaceUsesOfWithOnConstant(), llvm::Constant::replaceUsesOfWithOnConstant(), llvm::ExecutionEngine::runStaticConstructorsDestructors(), llvm::SimplifyCFG(), llvm::BytecodeReader::ValueList::size(), SRAGlobal(), llvm::UpgradeIntrinsicCall(), llvm::DIVerifier::Verify(), llvm::SelectionDAGLowering::visitCall(), llvm::SelectionDAGLowering::visitRet(), llvm::Interpreter::visitReturnInst(), llvm::SelectionDAGLowering::visitSwitch(), llvm::Interpreter::visitSwitchInst(), llvm::SelectionDAGLowering::visitTargetIntrinsic(), and WriteConstantInt().
op_iterator llvm::User::op_begin | ( | ) | [inline] |
Definition at line 62 of file User.h.
References OperandList.
Referenced by llvm::CallSite::arg_begin(), llvm::ConvertConstantType< ConstantExpr, Type >::convert(), ErasePossiblyDeadInstructionTree(), llvm::gep_type_begin(), llvm::value_use_iterator< UserTy >::getOperandNo(), HandleInlinedInvoke(), IdenticalComplexInst(), llvm::GetElementPtrInst::idx_begin(), llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(), OptimizeConstantExpr(), OptimizeGEPExpression(), RecursiveDelete(), and llvm::SelectionDAGLowering::visitGetElementPtr().
const_op_iterator llvm::User::op_begin | ( | ) | const [inline] |
op_iterator llvm::User::op_end | ( | ) | [inline] |
Definition at line 64 of file User.h.
References NumOperands, and OperandList.
Referenced by llvm::CallSite::arg_end(), llvm::ConvertConstantType< ConstantExpr, Type >::convert(), ErasePossiblyDeadInstructionTree(), llvm::gep_type_end(), HandleInlinedInvoke(), IdenticalComplexInst(), llvm::GetElementPtrInst::idx_end(), llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(), OptimizeConstantExpr(), OptimizeGEPExpression(), RecursiveDelete(), and llvm::SelectionDAGLowering::visitGetElementPtr().
const_op_iterator llvm::User::op_end | ( | ) | const [inline] |
void llvm::User::dropAllReferences | ( | ) | [inline] |
Reimplemented in llvm::Function.
Definition at line 75 of file User.h.
References NumOperands, and OperandList.
replaceUsesOfWith - Replaces all references to the "From" definition with references to the "To" definition.
Definition at line 169 of file Value.cpp.
References E, getNumOperands(), getOperand(), and setOperand().
Referenced by ReplaceUsesOfGEPInst().
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::ConstantIntegral, llvm::ConstantBool, llvm::ConstantInt, llvm::ConstantSInt, llvm::ConstantUInt, llvm::ConstantFP, llvm::ConstantAggregateZero, llvm::ConstantArray, llvm::ConstantStruct, llvm::ConstantPacked, llvm::ConstantPointerNull, llvm::ConstantExpr, llvm::UndefValue, llvm::Function, llvm::GlobalValue, llvm::GlobalVariable, llvm::TerminatorInst, llvm::BinaryOperator, llvm::Instruction, llvm::AllocationInst, llvm::MallocInst, llvm::AllocaInst, llvm::FreeInst, llvm::LoadInst, llvm::StoreInst, llvm::GetElementPtrInst, llvm::SetCondInst, llvm::CastInst, llvm::CallInst, llvm::ShiftInst, llvm::SelectInst, llvm::VAArgInst, llvm::ExtractElementInst, llvm::InsertElementInst, llvm::ShuffleVectorInst, llvm::PHINode, llvm::ReturnInst, llvm::BranchInst, llvm::SwitchInst, llvm::InvokeInst, llvm::UnwindInst, llvm::UnreachableInst, llvm::IntrinsicInst, llvm::DbgInfoIntrinsic, llvm::DbgStopPointInst, llvm::DbgFuncStartInst, llvm::DbgRegionStartInst, llvm::DbgRegionEndInst, llvm::DbgDeclareInst, llvm::MemIntrinsic, llvm::MemCpyInst, llvm::MemMoveInst, llvm::MemSetInst, and llvm::ValueHandle.
Definition at line 88 of file User.h.
References V.
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 embedded into the derived class. For nodes of variable arity (e.g. ConstantArrays, CallInst, PHINodes, etc), this memory will be dynamically allocated and should be destroyed by the classes virtual dtor.
Definition at line 35 of file User.h.
Referenced by llvm::SwitchInst::addCase(), llvm::PHINode::addIncoming(), llvm::ConstantArray::ConstantArray(), llvm::ConstantPacked::ConstantPacked(), llvm::ConstantStruct::ConstantStruct(), dropAllReferences(), llvm::PHINode::getBasicBlockIndex(), getOperand(), op_begin(), op_end(), llvm::BytecodeReader::ValueList::push_back(), llvm::SwitchInst::removeCase(), llvm::PHINode::removeIncomingValue(), llvm::ConstantStruct::replaceUsesOfWithOnConstant(), llvm::ConstantArray::replaceUsesOfWithOnConstant(), setOperand(), llvm::CallInst::~CallInst(), llvm::ConstantArray::~ConstantArray(), llvm::ConstantPacked::~ConstantPacked(), llvm::ConstantStruct::~ConstantStruct(), llvm::GetElementPtrInst::~GetElementPtrInst(), llvm::InvokeInst::~InvokeInst(), llvm::PHINode::~PHINode(), and llvm::SwitchInst::~SwitchInst().
unsigned llvm::User::NumOperands [protected] |
NumOperands - The number of values used by this User.
Definition at line 39 of file User.h.
Referenced by llvm::SwitchInst::addCase(), llvm::PHINode::addIncoming(), dropAllReferences(), llvm::BytecodeReader::ValueList::empty(), getNumOperands(), getOperand(), op_end(), llvm::BytecodeReader::ValueList::pop_back(), llvm::BytecodeReader::ValueList::push_back(), llvm::SwitchInst::removeCase(), llvm::PHINode::removeIncomingValue(), llvm::GlobalVariable::setInitializer(), setOperand(), and llvm::BranchInst::setUnconditionalDest().