LLVM API Documentation
#include <Constants.h>
Public Member Functions | |
UndefValue * | getSequentialElement () const |
UndefValue * | getStructElement (unsigned Elt) const |
UndefValue * | getElementValue (Constant *C) const |
UndefValue * | getElementValue (unsigned Idx) const |
virtual void | destroyConstant () |
![]() | |
bool | isNullValue () const |
bool | isAllOnesValue () const |
bool | isNegativeZeroValue () const |
bool | isZeroValue () const |
Return true if the value is negative zero or null value. More... | |
bool | canTrap () const |
bool | isThreadDependent () const |
isThreadDependent - Return true if the value can vary between threads. More... | |
bool | isConstantUsed () const |
PossibleRelocationsTy | getRelocationInfo () const |
Constant * | getAggregateElement (unsigned Elt) const |
Constant * | getAggregateElement (Constant *Elt) const |
Constant * | getSplatValue () const |
const APInt & | getUniqueInteger () const |
virtual void | replaceUsesOfWithOnConstant (Value *, Value *, Use *) |
void | removeDeadConstantUsers () const |
![]() | |
~User () | |
void | operator delete (void *Usr) |
operator delete - free memory allocated for User and Use objects More... | |
void | operator delete (void *, unsigned) |
placement delete - required by std, but never called. More... | |
void | operator delete (void *, unsigned, bool) |
placement delete - required by std, but never called. More... | |
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 |
value_op_iterator | value_op_begin () |
value_op_iterator | value_op_end () |
void | dropAllReferences () |
void | replaceUsesOfWith (Value *From, Value *To) |
![]() | |
virtual | ~Value () |
void | dump () const |
dump - Support for debugging, callable in GDB: V->dump() More... | |
void | print (raw_ostream &O, AssemblyAnnotationWriter *AAW=0) const |
Type * | getType () const |
LLVMContext & | getContext () const |
All values hold a context through their type. More... | |
bool | hasName () const |
ValueName * | getValueName () const |
void | setValueName (ValueName *VN) |
StringRef | getName () const |
void | setName (const Twine &Name) |
void | takeName (Value *V) |
void | replaceAllUsesWith (Value *V) |
bool | use_empty () const |
use_iterator | use_begin () |
const_use_iterator | use_begin () const |
use_iterator | use_end () |
const_use_iterator | use_end () const |
User * | use_back () |
const User * | use_back () const |
bool | hasOneUse () const |
bool | hasNUses (unsigned N) const |
bool | hasNUsesOrMore (unsigned N) const |
bool | isUsedInBasicBlock (const BasicBlock *BB) const |
unsigned | getNumUses () const |
void | addUse (Use &U) |
unsigned | getValueID () const |
unsigned | getRawSubclassOptionalData () const |
void | clearSubclassOptionalData () |
bool | hasSameSubclassOptionalData (const Value *V) const |
void | intersectOptionalDataWith (const Value *V) |
bool | hasValueHandle () const |
Value * | stripPointerCasts () |
Strips off any unneeded pointer casts, all-zero GEPs and aliases from the specified value, returning the original uncasted value. More... | |
const Value * | stripPointerCasts () const |
Value * | stripPointerCastsNoFollowAliases () |
Strips off any unneeded pointer casts and all-zero GEPs from the specified value, returning the original uncasted value. More... | |
const Value * | stripPointerCastsNoFollowAliases () const |
Value * | stripInBoundsConstantOffsets () |
Strips off unneeded pointer casts and all-constant GEPs from the specified value, returning the original pointer value. More... | |
const Value * | stripInBoundsConstantOffsets () const |
Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) |
Strips like stripInBoundsConstantOffsets but also accumulates the constant offset stripped. More... | |
const Value * | stripAndAccumulateInBoundsConstantOffsets (const DataLayout &DL, APInt &Offset) const |
Value * | stripInBoundsOffsets () |
Strips off unneeded pointer casts and any in-bounds offsets from the specified value, returning the original pointer value. More... | |
const Value * | stripInBoundsOffsets () const |
bool | isDereferenceablePointer () const |
Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) |
const Value * | DoPHITranslation (const BasicBlock *CurBB, const BasicBlock *PredBB) const |
void | mutateType (Type *Ty) |
Static Public Member Functions | |
static UndefValue * | get (Type *T) |
static bool | classof (const Value *V) |
Methods for support type inquiry through isa, cast, and dyn_cast: More... | |
![]() | |
static bool | classof (const Value *V) |
static Constant * | getNullValue (Type *Ty) |
static Constant * | getAllOnesValue (Type *Ty) |
Get the all ones value. More... | |
static Constant * | getIntegerValue (Type *Ty, const APInt &V) |
![]() | |
static bool | classof (const Value *V) |
Protected Member Functions | |
UndefValue (Type *T) | |
void * | operator new (size_t s) |
![]() | |
Constant (Type *ty, ValueTy vty, Use *Ops, unsigned NumOps) | |
void | destroyConstantImpl () |
![]() | |
void * | operator new (size_t s, unsigned Us) |
User (Type *ty, unsigned vty, Use *OpList, unsigned NumOps) | |
Use * | allocHungoffUses (unsigned) const |
void | dropHungoffUses () |
template<int Idx> | |
Use & | Op () |
template<int Idx> | |
const Use & | Op () const |
![]() | |
virtual void | printCustom (raw_ostream &O) const |
Value (Type *Ty, unsigned scid) | |
unsigned short | getSubclassDataFromValue () const |
void | setValueSubclassData (unsigned short D) |
UndefValue - 'undef' values are things that do not have specified contents. These are used for a variety of purposes, including global variable initializers and operands to instructions. 'undef' values can occur with any first-class type.
Undef values aren't exactly constants; if they have multiple uses, they can appear to have different bit patterns at each use. See LangRef.html::undefvalues for details.
Definition at line 1121 of file Constants.h.
|
inlineexplicitprotected |
Definition at line 1125 of file Constants.h.
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition at line 1156 of file Constants.h.
References llvm::Value::getValueID().
|
virtual |
destroyConstant - Called if some element of this constant is no longer valid. At this point only other constants may be on the use_list for this constant. Any constants on our Use list must also be destroy'd. The implementation must be sure to remove the constant from the list of available cached constants. Implementations should call destroyConstantImpl as the last thing they do, to destroy all users and delete this.
Reimplemented from llvm::Constant.
Definition at line 1344 of file Constants.cpp.
References llvm::Constant::destroyConstantImpl(), llvm::Value::getContext(), llvm::Value::getType(), llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::UVConstants.
|
static |
get() - Static factory methods - Return an 'undef' object of the specified type.
Definition at line 1334 of file Constants.cpp.
References llvm::Type::getContext(), llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::UVConstants.
Referenced by BuildSubAggregate(), changeToUnreachable(), llvm::CloneAndPruneFunctionInto(), CollectShuffleElements(), CollectSingleShuffleElements(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCall(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldExtractElementInstruction(), ConstantFoldGetElementPtrImpl(), llvm::ConstantFoldInstruction(), llvm::ConstantFoldLoadFromConstPtr(), llvm::ConstantFoldShuffleVectorInstruction(), ConvertShiftToMul(), llvm::IRBuilder< true, TargetFolder >::CreateAggregateRet(), llvm::IRBuilder< true, TargetFolder >::CreateVectorSplat(), llvm::DeleteDeadBlock(), DeleteInstructionInBlock(), llvm::InstCombiner::DoOneIteration(), FindScalarElement(), FoldReinterpretLoadFromConstPtr(), llvm::FoldSingleEntryPHINodes(), llvm::ConstantArray::get(), llvm::ConstantStruct::get(), llvm::ConstantVector::get(), llvm::ExecutionEngine::getConstantValue(), getSequentialElement(), getStructElement(), llvm::SSAUpdaterTraits< SSAUpdater >::GetUndefVal(), llvm::SSAUpdater::GetValueInMiddleOfBlock(), llvm::PHINode::hasConstantValue(), llvm::InlineFunction(), LinearizeExprTree(), LLVMGetUndef(), llvm::R600TargetLowering::LowerFormalArguments(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::MapValue(), llvm::MergeBasicBlockIntoOnlyPred(), OptimizeGlobalAddressOfMalloc(), OptimizeVectorResize(), promoteSingleBlockAlloca(), llvm::RecursivelyDeleteDeadPHINode(), llvm::PHINode::removeIncomingValue(), llvm::BasicBlock::removePredecessor(), llvm::InstCombiner::ReplaceInstUsesWith(), llvm::ConstantArray::replaceUsesOfWithOnConstant(), llvm::ConstantStruct::replaceUsesOfWithOnConstant(), llvm::returnTypeIsEligibleForTailCall(), rewriteSingleStoreAlloca(), llvm::LoadAndStorePromoter::run(), SimplifyCall(), SimplifyFCmpInst(), SimplifyGEPInst(), llvm::SimplifyInstruction(), SimplifyPHINode(), SimplifyRem(), SimplifyShift(), SimplifySubInst(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), llvm::SplitBlockPredecessors(), llvm::InstCombiner::visitAllocSite(), llvm::InstCombiner::visitBitCast(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitExtractElementInst(), llvm::InstCombiner::visitExtractValueInst(), llvm::InstCombiner::visitFPTrunc(), llvm::InstCombiner::visitFree(), llvm::InstCombiner::visitInsertElementInst(), llvm::InstCombiner::visitLoadInst(), llvm::InstCombiner::visitPHINode(), llvm::ObjectSizeOffsetEvaluator::visitPHINode(), llvm::InstCombiner::visitShuffleVectorInst(), and llvm::InstCombiner::visitStoreInst().
UndefValue * UndefValue::getElementValue | ( | Constant * | C | ) | const |
getElementValue - Return an undef of the right value for the specified GEP index.
getElementValue - Return an undef of the right value for the specified GEP index if we can, otherwise return null (e.g. if C is a ConstantExpr).
Definition at line 705 of file Constants.cpp.
References getSequentialElement(), getStructElement(), and llvm::Value::getType().
UndefValue * UndefValue::getElementValue | ( | unsigned | Idx | ) | const |
getElementValue - Return an undef of the right value for the specified GEP index.
Definition at line 713 of file Constants.cpp.
References getSequentialElement(), getStructElement(), and llvm::Value::getType().
UndefValue * UndefValue::getSequentialElement | ( | ) | const |
getSequentialElement - If this Undef has array or vector type, return a undef with the right element type.
getSequentialElement - If this undef has array or vector type, return an undef with the right element type.
Definition at line 693 of file Constants.cpp.
References get(), and llvm::Value::getType().
Referenced by getElementValue().
UndefValue * UndefValue::getStructElement | ( | unsigned | Elt | ) | const |
getStructElement - If this undef has struct type, return a undef with the right element type for the specified element.
getStructElement - If this undef has struct type, return a zero with the right element type for the specified element.
Definition at line 699 of file Constants.cpp.
References get(), and llvm::Value::getType().
Referenced by getElementValue().
|
inlineprotected |
Definition at line 1128 of file Constants.h.