LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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 std::vector< Use
>::iterator 
op_iterator
typedef std::vector< Use
>::const_iterator 
const_op_iterator

Public Member Functions

 User (const Type *Ty, unsigned vty, const std::string &name="")
ValuegetOperand (unsigned i)
const ValuegetOperand (unsigned i) const
void setOperand (unsigned i, Value *Val)
unsigned getNumOperands () const
void op_reserve (unsigned NumElements)
op_iterator op_begin ()
const_op_iterator op_begin () const
op_iterator op_end ()
const_op_iterator op_end () const
op_iterator op_erase (op_iterator I)
op_iterator op_erase (op_iterator I, op_iterator E)
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

std::vector< UseOperands

Detailed Description

Definition at line 27 of file User.h.


Member Typedef Documentation

typedef std::vector<Use>::const_iterator llvm::User::const_op_iterator
 

Definition at line 53 of file User.h.

typedef std::vector<Use>::iterator llvm::User::op_iterator
 

Definition at line 52 of file User.h.


Constructor & Destructor Documentation

llvm::User::User const Type Ty,
unsigned  vty,
const std::string &  name = ""
[inline]
 

Definition at line 32 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::VANextInst, llvm::VAArgInst, llvm::PHINode, llvm::ReturnInst, llvm::BranchInst, llvm::SwitchInst, llvm::InvokeInst, llvm::UnwindInst, llvm::UnreachableInst, llvm::DbgInfoIntrinsic, llvm::DbgStopPointInst, llvm::MemIntrinsic, llvm::MemCpyInst, llvm::MemMoveInst, llvm::MemSetInst, llvm::TmpInstruction, and llvm::ValueHandle.

Definition at line 89 of file User.h.

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

Definition at line 88 of file User.h.

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

Reimplemented in llvm::Function.

Definition at line 78 of file User.h.

References Operands.

unsigned llvm::User::getNumOperands  )  const [inline]
 

Definition at line 47 of file User.h.

References Operands.

Referenced by llvm::CallArgsDescriptor::CallArgsDescriptor(), llvm::ConvertConstantType< ConstantPacked, PackedType >::convert(), llvm::ConvertConstantType< ConstantStruct, StructType >::convert(), llvm::ConvertConstantType< ConstantArray, ArrayType >::convert(), llvm::ConvertExpressionToType(), ConvertOperandToType(), CountCodeReductionForConstant(), DominatesMergePoint(), EvaluateExpression(), evaluateRelation(), llvm::ExpressionConvertibleToType(), llvm::SCEVMulExpr::get(), llvm::CallArgsDescriptor::get(), getAsCString(), llvm::ConstantArray::getAsString(), GetGEPGlobalInitializer(), llvm::GetElementPtrInst::getNumIndices(), getValType(), llvm::GetElementPtrInst::hasIndices(), IdenticalComplexInst(), llvm::ExecutionEngine::InitializeMemory(), llvm::Instruction::isIdenticalTo(), llvm::ConstantArray::isString(), OperandConvertibleToType(), printAsCString(), llvm::RemapInstruction(), RemapInstruction(), RemoveDeadConstant(), llvm::PHINode::removeIncomingValue(), replaceUsesOfWith(), llvm::GlobalVariable::replaceUsesOfWithOnConstant(), llvm::ConstantExpr::replaceUsesOfWithOnConstant(), llvm::ConstantPacked::replaceUsesOfWithOnConstant(), llvm::ConstantStruct::replaceUsesOfWithOnConstant(), llvm::ConstantArray::replaceUsesOfWithOnConstant(), llvm::Constant::replaceUsesOfWithOnConstant(), llvm::SimplifyCFG(), llvm::BytecodeReader::ValueList::size(), SRAGlobal(), TraverseGEPInitializer(), llvm::SelectionDAGBuilder::visitRet(), llvm::Interpreter::visitReturnInst(), and llvm::Interpreter::visitSwitchInst().

const Value* llvm::User::getOperand unsigned  i  )  const [inline]
 

Reimplemented in llvm::Constant, and llvm::ConstantExpr.

Definition at line 39 of file User.h.

References Operands.

Value* llvm::User::getOperand unsigned  i  )  [inline]
 

Reimplemented in llvm::Constant, and llvm::ConstantExpr.

Definition at line 35 of file User.h.

References Operands.

Referenced by llvm::AliasSetTracker::add(), AddressMightEscape(), FoldSetCCLogical::apply(), AddMaskingAnd::apply(), AddRHS::apply(), AssociativeOpt(), llvm::CallArgsDescriptor::CallArgsDescriptor(), llvm::ClassifyExpr(), Coerce(), llvm::ConvertExpressionToType(), ConvertOperandToType(), CountCodeReductionForConstant(), llvm::DecomposeArrayRef(), DominatesMergePoint(), dyn_castFoldableMul(), dyncastIsNan(), EvaluateExpression(), llvm::ExpressionConvertibleToType(), FoldBinOpIntoSelect(), FoldOperationIntoSelectOperand(), llvm::gep_type_begin(), llvm::CallArgsDescriptor::get(), llvm::MemIntrinsic::getAlignment(), llvm::CallSite::getCalledValue(), llvm::DbgInfoIntrinsic::getChain(), llvm::DbgStopPointInst::getColNo(), llvm::DbgStopPointInst::getContext(), llvm::MemIntrinsic::getLength(), llvm::DbgStopPointInst::getLineNo(), llvm::AliasAnalysis::getModRefInfo(), llvm::BinaryOperator::getNegArgument(), llvm::BinaryOperator::getNotArgument(), llvm::ConstantExpr::getOperand(), llvm::Constant::getOperand(), llvm::GetElementPtrInst::getPointerOperand(), llvm::StoreInst::getPointerOperand(), llvm::LoadInst::getPointerOperand(), llvm::MemIntrinsic::getRawDest(), llvm::MemMoveInst::getRawSource(), llvm::MemCpyInst::getRawSource(), llvm::Loop::getTripCount(), llvm::MemSetInst::getValue(), GetValueEqualityComparisonCases(), HandleCastToPointer(), InstCombineLoadCast(), llvm::AllocationInst::isArrayAllocation(), isDynamicConstant(), isIdenticalBinaryInst(), llvm::Instruction::isIdenticalTo(), isInsertShiftHalf(), isOnlyUsedByUnorderedComparisons(), isReinterpretingCast(), isSafeToLoadUnconditionally(), LoadNeedsSignExtend(), NegateValue(), OperandConvertibleToType(), llvm::ValueHandle::operator<(), PeepholeOptimizeAddCast(), llvm::BytecodeReader::ValueList::print(), llvm::RemapInstruction(), RemapInstruction(), llvm::AliasSetTracker::remove(), replaceUsesOfWith(), llvm::UnifyFunctionExitNodes::runOnFunction(), llvm::RunVMAsmParser(), llvm::SimplifyCFG(), SRAGlobal(), TraverseGEPInitializer(), llvm::ValueHandle::ValueHandle(), ValueIsOnlyUsedLocallyOrStoredToOneGlobal(), llvm::SelectionDAGBuilder::visitAdd(), llvm::Interpreter::visitAllocationInst(), llvm::SelectionDAGBuilder::visitAnd(), llvm::Interpreter::visitBinaryOperator(), llvm::SelectionDAGBuilder::visitBr(), llvm::Interpreter::visitCastInst(), llvm::Interpreter::visitFreeInst(), llvm::SelectionDAGBuilder::visitLoad(), llvm::SelectionDAGBuilder::visitMul(), llvm::SelectionDAGBuilder::visitOr(), llvm::SelectionDAGBuilder::visitRet(), llvm::Interpreter::visitSelectInst(), llvm::SelectionDAGBuilder::visitSetEQ(), llvm::Interpreter::visitShl(), llvm::Interpreter::visitShr(), llvm::Interpreter::visitStoreInst(), llvm::SelectionDAGBuilder::visitSub(), llvm::Interpreter::visitSwitchInst(), llvm::Interpreter::visitVAArgInst(), llvm::Interpreter::visitVANextInst(), and llvm::SelectionDAGBuilder::visitXor().

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

Definition at line 58 of file User.h.

References Operands.

op_iterator llvm::User::op_begin  )  [inline]
 

Definition at line 57 of file User.h.

References Operands.

Referenced by llvm::CallSite::arg_begin(), llvm::ConvertConstantType< ConstantExpr, Type >::convert(), DecomposeConstantExpr(), llvm::DepIterState::DepIterState(), ErasePossiblyDeadInstructionTree(), llvm::gep_type_begin(), llvm::SCEVMulExpr::get(), llvm::SCEVAddExpr::get(), IdenticalComplexInst(), llvm::GetElementPtrInst::idx_begin(), llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(), OperandConvertibleToType(), RecursiveDelete(), and llvm::FindUsedTypes::runOnModule().

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

Definition at line 60 of file User.h.

References Operands.

op_iterator llvm::User::op_end  )  [inline]
 

Definition at line 59 of file User.h.

References Operands.

Referenced by llvm::CallSite::arg_end(), llvm::ConvertConstantType< ConstantExpr, Type >::convert(), DecomposeConstantExpr(), ErasePossiblyDeadInstructionTree(), llvm::gep_type_end(), llvm::SCEVMulExpr::get(), llvm::SCEVAddExpr::get(), IdenticalComplexInst(), llvm::GetElementPtrInst::idx_end(), llvm::DefaultIntrinsicLowering::LowerIntrinsicCall(), OperandConvertibleToType(), RecursiveDelete(), llvm::FindUsedTypes::runOnModule(), and llvm::DepIterState::SetFirstSSADep().

op_iterator llvm::User::op_erase op_iterator  I,
op_iterator  E
[inline]
 

Definition at line 66 of file User.h.

References Operands.

op_iterator llvm::User::op_erase op_iterator  I  )  [inline]
 

op_erase - This method is used to remove one of the arguments from the operands list. Only use this if you know what you are doing.

Definition at line 65 of file User.h.

References Operands.

void llvm::User::op_reserve unsigned  NumElements  )  [inline]
 

Definition at line 55 of file User.h.

References Operands.

Referenced by llvm::BytecodeReader::ParseInstruction().

void User::replaceUsesOfWith Value From,
Value To
 

replaceUsesOfWith - Replaces all references to the "From" definition with references to the "To" definition.

Definition at line 103 of file Value.cpp.

References E, getNumOperands(), getOperand(), and setOperand().

Referenced by ConvertOperandToType().

void llvm::User::setOperand unsigned  i,
Value Val
[inline]
 

Definition at line 43 of file User.h.

References Operands.

Referenced by AssociativeOpt(), Coerce(), llvm::ConvertExpressionToType(), ConvertOperandToType(), HandleCastToPointer(), llvm::InlineFunction(), llvm::InsertProfilingInitCall(), llvm::RemapInstruction(), RemapInstruction(), replaceUsesOfWith(), llvm::MemIntrinsic::setAlignment(), llvm::CallSite::setCalledFunction(), llvm::BranchInst::setCondition(), llvm::MemIntrinsic::setDest(), llvm::MemIntrinsic::setLength(), llvm::Constant::setOperand(), llvm::MemMoveInst::setSource(), llvm::MemCpyInst::setSource(), llvm::MemSetInst::setValue(), and llvm::SimplifyCFG().


Member Data Documentation

std::vector<Use> llvm::User::Operands [protected]
 

Definition at line 30 of file User.h.

Referenced by llvm::SwitchInst::addCase(), llvm::PHINode::addIncoming(), llvm::BytecodeReader::ValueList::back(), llvm::FreeInst::clone(), llvm::BinaryOperator::clone(), llvm::ConstantArray::ConstantArray(), llvm::ConstantExpr::ConstantExpr(), llvm::ConstantPacked::ConstantPacked(), llvm::ConstantStruct::ConstantStruct(), dropAllReferences(), llvm::BytecodeReader::ValueList::empty(), llvm::AllocationInst::getArraySize(), llvm::PHINode::getBasicBlockIndex(), llvm::InvokeInst::getCalledFunction(), llvm::CallInst::getCalledFunction(), llvm::InvokeInst::getCalledValue(), llvm::CallInst::getCalledValue(), llvm::SwitchInst::getCondition(), llvm::BranchInst::getCondition(), llvm::SelectInst::getCondition(), llvm::SwitchInst::getDefaultDest(), llvm::SelectInst::getFalseValue(), llvm::PHINode::getIncomingBlock(), llvm::PHINode::getIncomingValue(), llvm::GlobalVariable::getInitializer(), llvm::InvokeInst::getNormalDest(), llvm::SwitchInst::getNumCases(), llvm::PHINode::getNumIncomingValues(), getNumOperands(), llvm::SwitchInst::getNumSuccessors(), getOperand(), llvm::ReturnInst::getReturnValue(), llvm::SwitchInst::getSuccessor(), llvm::BranchInst::getSuccessor(), llvm::SwitchInst::getSuccessorValue(), llvm::SelectInst::getTrueValue(), llvm::InvokeInst::getUnwindDest(), llvm::GlobalVariable::GlobalVariable(), llvm::BinaryOperator::init(), llvm::AllocationInst::init(), llvm::BranchInst::isConditional(), llvm::GlobalVariable::isExternal(), llvm::BranchInst::isUnconditional(), op_begin(), op_end(), op_erase(), op_reserve(), llvm::BytecodeReader::ValueList::pop_back(), llvm::BytecodeReader::ValueList::push_back(), llvm::SwitchInst::removeCase(), llvm::PHINode::removeIncomingValue(), llvm::PHINode::setIncomingBlock(), llvm::PHINode::setIncomingValue(), llvm::GlobalVariable::setInitializer(), llvm::InvokeInst::setNormalDest(), setOperand(), llvm::InvokeInst::setSuccessor(), llvm::SwitchInst::setSuccessor(), llvm::BranchInst::setSuccessor(), llvm::BranchInst::setUnconditionalDest(), llvm::InvokeInst::setUnwindDest(), llvm::BinaryOperator::swapOperands(), llvm::TmpInstruction::TmpInstruction(), llvm::ValueHandle::ValueHandle(), and llvm::ValueHandle::~ValueHandle().


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