LLVM API Documentation

Public Member Functions | Static Public Member Functions | Protected Member Functions
llvm::UndefValue Class Reference

#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
UndefValuegetStructElement (unsigned Elt) const
UndefValuegetElementValue (Constant *C) const
UndefValuegetElementValue (unsigned Idx) const
void destroyConstant () override

Static Public Member Functions

static UndefValueget (Type *T)
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)

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


Constructor & Destructor Documentation

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

Definition at line 1168 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 1199 of file Constants.h.

References llvm::Value::getValueID().

void UndefValue::destroyConstant ( ) [override, 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 1443 of file Constants.cpp.

References llvm::Constant::destroyConstantImpl(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT >::erase(), llvm::Value::getContext(), llvm::Value::getType(), llvm::LLVMContext::pImpl, and llvm::LLVMContextImpl::UVConstants.

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

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

Definition at line 1433 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::ConstantFoldCastInstruction(), llvm::ConstantFoldCompareInstruction(), llvm::ConstantFoldExtractElementInstruction(), ConstantFoldGetElementPtrImpl(), llvm::ConstantFoldInstruction(), llvm::ConstantFoldLoadFromConstPtr(), ConstantFoldScalarCall(), llvm::ConstantFoldShuffleVectorInstruction(), ConvertShiftToMul(), llvm::IRBuilder< true, TargetFolder >::CreateAggregateRet(), createCast(), llvm::IRBuilder< true, TargetFolder >::CreateVectorSplat(), llvm::DeleteDeadBlock(), DeleteInstructionInBlock(), llvm::InstCombiner::DoOneIteration(), FindScalarElement(), FoldReinterpretLoadFromConstPtr(), llvm::FoldSingleEntryPHINodes(), llvm::ExecutionEngine::getConstantValue(), getSequentialElement(), 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(), 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(), simplifyOneLoop(), SimplifyPHINode(), SimplifyRem(), SimplifyShift(), SimplifySubInst(), llvm::InstCombiner::SliceUpIllegalIntegerPHI(), llvm::SplitBlockPredecessors(), llvm::UpgradeIntrinsicCall(), 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().

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

References getSequentialElement(), getStructElement(), 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 776 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 782 of file Constants.cpp.

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

Referenced by getElementValue().

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

Reimplemented from llvm::User.

Definition at line 1171 of file Constants.h.


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