LLVM API Documentation

llvm::User Class Reference

#include <User.h>

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

List of all members.

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


Detailed Description

Definition at line 47 of file User.h.


Member Typedef Documentation

Definition at line 117 of file User.h.

Definition at line 118 of file User.h.


Constructor & Destructor Documentation

llvm::User::User ( const Type *  ty,
unsigned  vty,
Use *  OpList,
unsigned  NumOps 
) [inline, protected]

Definition at line 66 of file User.h.

llvm::User::~User (  )  [inline]

Definition at line 77 of file User.h.

References NumOperands, OperandList, and llvm::Use::zap().


Member Function Documentation

void * User::operator new ( size_t  s,
unsigned  Us 
) [protected]

Definition at line 409 of file Value.cpp.

References End, NumOperands, OperandList, and Start.

Use * llvm::User::allocHungoffUses ( unsigned  N  )  const [protected]

void llvm::User::dropHungoffUses ( Use *  U  )  [inline, protected]

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]

placement delete - required by std, but never called.

Definition at line 83 of file User.h.

template<unsigned Idx>
Use& llvm::User::Op (  )  [inline]

Definition at line 86 of file User.h.

References Idx, and llvm::OperandTraits< User >::op_begin().

template<unsigned Idx>
const Use& llvm::User::Op (  )  const [inline]

Definition at line 89 of file User.h.

References Idx, and llvm::OperandTraits< User >::op_begin().

Value* llvm::User::getOperand ( unsigned  i  )  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().

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

const Use& llvm::User::getOperandUse ( unsigned  i  )  const [inline]

Definition at line 103 of file User.h.

References NumOperands, and OperandList.

Use& llvm::User::getOperandUse ( unsigned  i  )  [inline]

Definition at line 107 of file User.h.

References NumOperands, and OperandList.

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]

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

Definition at line 121 of file User.h.

References OperandList.

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

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

Definition at line 123 of file User.h.

References NumOperands, and OperandList.

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

Reimplemented in llvm::Function.

Definition at line 133 of file User.h.

References op_begin(), and op_end().

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

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]

Definition at line 144 of file User.h.

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


Friends And Related Function Documentation

friend struct HungoffOperandTraits [friend]

Definition at line 51 of file User.h.


Member Data Documentation


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