LLVM API Documentation

llvm::User Class Reference

#include <User.h>

Inheritance diagram for llvm::User:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef Useop_iterator
typedef const Useconst_op_iterator

Public Member Functions

 User (const Type *Ty, unsigned vty, Use *OpList, unsigned NumOps, const std::string &name="")
ValuegetOperand (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

UseOperandList
unsigned NumOperands

Detailed Description

Definition at line 27 of file User.h.


Member Typedef Documentation

typedef const Use* llvm::User::const_op_iterator

Definition at line 60 of file User.h.

typedef Use* llvm::User::op_iterator

Definition at line 59 of file User.h.


Constructor & Destructor Documentation

llvm::User::User ( const Type Ty,
unsigned  vty,
Use OpList,
unsigned  NumOps,
const std::string &  name = "" 
) [inline]

Definition at line 42 of file User.h.


Member Function Documentation

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, llvm::TmpInstruction, and llvm::ValueHandle.

Definition at line 88 of file User.h.

References V.

static bool llvm::User::classof ( const User  )  [inline, static]

Definition at line 87 of file User.h.

void llvm::User::dropAllReferences (  )  [inline]

Reimplemented in llvm::Function.

Definition at line 75 of file User.h.

References NumOperands, and OperandList.

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::CallArgsDescriptor::CallArgsDescriptor(), llvm::ConstantFoldCastInstruction(), llvm::ConvertConstantType< ConstantPacked, PackedType >::convert(), llvm::ConvertConstantType< ConstantStruct, StructType >::convert(), llvm::ConvertConstantType< ConstantArray, ArrayType >::convert(), llvm::ConvertExpressionToType(), ConvertOperandToType(), CountCodeReductionForConstant(), DominatesMergePoint(), EmitGEPOffset(), ConstantPackedRules::EqualTo(), EvaluateExpression(), evaluateRelation(), EvaluateStoreInto(), EvalVectorOp(), llvm::ExpressionConvertibleToType(), FindStaticTors(), FoldCondBranchOnPHI(), llvm::FunctionLoweringInfo::FunctionLoweringInfo(), llvm::CallArgsDescriptor::get(), getAsCString(), llvm::ConstantArray::getAsString(), getConstantStringLength(), GetKnownAlignment(), llvm::GetElementPtrInst::getNumIndices(), getUIntOperand(), getValType(), llvm::GetElementPtrInst::hasIndices(), IdenticalComplexInst(), llvm::ExecutionEngine::InitializeMemory(), llvm::GlobalVariable::isExternal(), llvm::Instruction::isIdenticalTo(), llvm::ConstantArray::isString(), llvm::MapValue(), ParseGlobalCtors(), 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().

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(), llvm::CallArgsDescriptor::CallArgsDescriptor(), CheapToScalarize(), Coerce(), ComputeMaskedBits(), llvm::ConvertExpressionToType(), ConvertOperandToType(), ConvertShiftToMul(), CountCodeReductionForConstant(), llvm::DecomposeArrayRef(), DominatesMergePoint(), EmitGEPOffset(), EvaluateExpression(), llvm::ExpressionConvertibleToType(), FoldCondBranchOnPHI(), GatherConstantSetEQs(), GatherConstantSetNEs(), llvm::gep_type_begin(), llvm::CallArgsDescriptor::get(), 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(), llvm::Instruction::isIdenticalTo(), llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(), LowerNegateToMultiply(), OperandConvertibleToType(), llvm::ValueHandle::operator<(), OptimizeGEPExpression(), 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().

const_op_iterator llvm::User::op_begin (  )  const [inline]

Definition at line 63 of file User.h.

References OperandList.

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(), DecomposeConstantExpr(), ErasePossiblyDeadInstructionTree(), llvm::gep_type_begin(), HandleInlinedInvoke(), IdenticalComplexInst(), llvm::GetElementPtrInst::idx_begin(), llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(), OptimizeGEPExpression(), RecursiveDelete(), and llvm::SelectionDAGLowering::visitGetElementPtr().

const_op_iterator llvm::User::op_end (  )  const [inline]

Definition at line 65 of file User.h.

References NumOperands, and OperandList.

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(), DecomposeConstantExpr(), ErasePossiblyDeadInstructionTree(), llvm::gep_type_end(), HandleInlinedInvoke(), IdenticalComplexInst(), llvm::GetElementPtrInst::idx_end(), llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(), OptimizeGEPExpression(), RecursiveDelete(), and llvm::SelectionDAGLowering::visitGetElementPtr().

void User::replaceUsesOfWith ( Value From,
Value To 
)

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().

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().


Member Data Documentation

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().

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().


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