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 |
void | destroyConstant () override |
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: | |
Protected Member Functions | |
UndefValue (Type *T) | |
void * | operator new (size_t s) |
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.
llvm::UndefValue::UndefValue | ( | Type * | T | ) | [inline, explicit, protected] |
Definition at line 1168 of file Constants.h.
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().
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 788 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 796 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 776 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 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.