LLVM  mainline
Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends
llvm::UndefValue Class Reference

UndefValue - 'undef' values are things that do not have specified contents. More...

#include <Constants.h>

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

List of all members.

Public Member Functions

UndefValuegetSequentialElement () const
 getSequentialElement - If this Undef has array or vector type, return a undef with the right element type.
UndefValuegetStructElement (unsigned Elt) const
 getStructElement - If this undef has struct type, return a undef with the right element type for the specified element.
UndefValuegetElementValue (Constant *C) const
 getElementValue - Return an undef of the right value for the specified GEP index.
UndefValuegetElementValue (unsigned Idx) const
 getElementValue - Return an undef of the right value for the specified GEP index.
unsigned getNumElements () const
 Return the number of elements in the array, vector, or struct.

Static Public Member Functions

static UndefValueget (Type *T)
 get() - Static factory methods - Return an 'undef' object of the specified type.
static bool classof (const Value *V)
 Methods for support type inquiry through isa, cast, and dyn_cast:

Protected Member Functions

 UndefValue (Type *T)
void * operator new (size_t s)
 Allocate a User with an operand pointer co-allocated.

Friends

class Constant

Detailed Description

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 1220 of file Constants.h.


Constructor & Destructor Documentation

llvm::UndefValue::UndefValue ( Type T) [inline, explicit, protected]

Definition at line 1228 of file Constants.h.


Member Function Documentation

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

Methods for support type inquiry through isa, cast, and dyn_cast:

Reimplemented from llvm::Constant.

Definition at line 1260 of file Constants.h.

References llvm::Value::getValueID().

UndefValue * UndefValue::get ( Type T) [static]

get() - Static factory methods - Return an 'undef' object of the specified type.

Definition at line 1473 of file Constants.cpp.

References llvm::Type::getContext(), llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::UVConstants.

Referenced by BuildSubAggregate(), changeToUnreachable(), llvm::CloneAndPruneIntoFromInst(), CollectShuffleElements(), CollectSingleShuffleElements(), ConcatenateTwoVectors(), llvm::ConstantFoldBinaryInstruction(), llvm::ConstantFoldCastInstruction(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldExtractElementInstruction(), ConstantFoldGetElementPtrImpl(), llvm::ConstantFoldInsertElementInstruction(), llvm::ConstantFoldInstruction(), llvm::ConstantFoldLoadFromConstPtr(), ConstantFoldScalarCall(), llvm::ConstantFoldShuffleVectorInstruction(), ConvertShiftToMul(), llvm::IRBuilder< true, TargetFolder >::CreateAggregateRet(), createCast(), llvm::IRBuilderBase::CreateMaskedLoad(), llvm::InstCombiner::CreateOverflowTuple(), llvm::IRBuilder< true, TargetFolder >::CreateVectorSplat(), llvm::DeleteDeadBlock(), deleteDeadInstruction(), DeleteInstructionInBlock(), findBasePointer(), FindScalarElement(), FoldReinterpretLoadFromConstPtr(), llvm::FoldSingleEntryPHINodes(), llvm::ExecutionEngine::getConstantValue(), llvm::AArch64TTIImpl::getOrCreateResultFromMemIntrinsic(), getSequentialElement(), getSequentialMask(), getStructElement(), llvm::SSAUpdaterTraits< SSAUpdater >::GetUndefVal(), llvm::SSAUpdater::GetValueInMiddleOfBlock(), llvm::PHINode::hasConstantValue(), llvm::InlineFunction(), LinearizeExprTree(), LLVMGetUndef(), LowerAtomicCmpXchgInst(), llvm::R600TargetLowering::LowerFormalArguments(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::MapValue(), llvm::MergeBasicBlockIntoOnlyPred(), OptimizeGlobalAddressOfMalloc(), OptimizeVectorResize(), prepareICWorklistFromFunction(), promoteSingleBlockAlloca(), llvm::RecursivelyDeleteDeadPHINode(), llvm::PHINode::removeIncomingValue(), llvm::BasicBlock::removePredecessor(), llvm::InstCombiner::ReplaceInstUsesWith(), llvm::ConstantArray::replaceUsesOfWithOnConstant(), llvm::ConstantStruct::replaceUsesOfWithOnConstant(), llvm::returnTypeIsEligibleForTailCall(), rewriteSingleStoreAlloca(), llvm::LoadAndStorePromoter::run(), ScalarizeMaskedLoad(), llvm::FastISel::selectIntrinsicCall(), SimplifyCall(), SimplifyDiv(), SimplifyGEPInst(), llvm::SimplifyInstruction(), SimplifyIntrinsic(), simplifyOneLoop(), SimplifyPHINode(), SimplifyRem(), SimplifyShift(), SimplifySubInst(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), llvm::SplitBlockPredecessors(), splitVectorValues(), unpackLoadToAggregate(), llvm::UpgradeIntrinsicCall(), llvm::InstCombiner::visitAllocSite(), llvm::InstCombiner::visitBitCast(), llvm::InstCombiner::visitBranchInst(), llvm::InstCombiner::visitCallInst(), llvm::InstCombiner::visitExtractElementInst(), llvm::InstCombiner::visitExtractValueInst(), llvm::InstCombiner::visitFree(), llvm::InstCombiner::visitInsertElementInst(), llvm::InstCombiner::visitLoadInst(), llvm::ObjectSizeOffsetEvaluator::visitPHINode(), llvm::InstCombiner::visitPHINode(), llvm::InstCombiner::visitShuffleVectorInst(), and llvm::InstCombiner::visitStoreInst().

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 826 of file Constants.cpp.

References getSequentialElement(), getStructElement(), and llvm::Value::getType().

getElementValue - Return an undef of the right value for the specified GEP index.

Definition at line 834 of file Constants.cpp.

References getSequentialElement(), getStructElement(), and llvm::Value::getType().

Return the number of elements in the array, vector, or struct.

Definition at line 840 of file Constants.cpp.

References llvm::Type::getStructNumElements(), and llvm::Value::getType().

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 814 of file Constants.cpp.

References get(), and llvm::Value::getType().

Referenced by getElementValue().

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 820 of file Constants.cpp.

References get(), and llvm::Value::getType().

Referenced by getElementValue().

void* llvm::UndefValue::operator new ( size_t  Size) [inline, protected]

Allocate a User with an operand pointer co-allocated.

This is used for subclasses which need to allocate a variable number of operands, ie, 'hung off uses'.

Reimplemented from llvm::User.

Definition at line 1231 of file Constants.h.

References llvm::User::operator new().


Friends And Related Function Documentation

friend class Constant [friend]

Definition at line 1224 of file Constants.h.


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