LLVM API Documentation
#include <Constants.h>


Public Member Functions | |
| DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Constant) | |
| Transparently provide more efficient getOperand methods. | |
| ArrayType * | getType () const |
| virtual void | destroyConstant () |
| virtual void | replaceUsesOfWithOnConstant (Value *From, Value *To, Use *U) |
Static Public Member Functions | |
| static Constant * | get (ArrayType *T, ArrayRef< Constant * > V) |
| static bool | classof (const Value *V) |
| Methods for support type inquiry through isa, cast, and dyn_cast: | |
Protected Member Functions | |
| ConstantArray (ArrayType *T, ArrayRef< Constant * > Val) | |
Friends | |
| struct | ConstantArrayCreator< ConstantArray, ArrayType > |
ConstantArray - Constant Array Declarations
Definition at line 340 of file Constants.h.
Definition at line 733 of file Constants.cpp.
References llvm::ArrayRef< T >::begin(), llvm::ArrayRef< T >::end(), llvm::SequentialType::getElementType(), llvm::ArrayType::getNumElements(), getType(), llvm::User::op_begin(), and llvm::ArrayRef< T >::size().
Methods for support type inquiry through isa, cast, and dyn_cast:
Reimplemented from llvm::Constant.
Definition at line 363 of file Constants.h.
References llvm::Value::ConstantArrayVal, and llvm::Value::getValueID().
| llvm::ConstantArray::DECLARE_TRANSPARENT_OPERAND_ACCESSORS | ( | Constant | ) |
Transparently provide more efficient getOperand methods.
| void ConstantArray::destroyConstant | ( | ) | [virtual] |
destroyConstant - Remove the constant from the constant table...
Reimplemented from llvm::Constant.
Definition at line 1250 of file Constants.cpp.
References llvm::LLVMContextImpl::ArrayConstants, llvm::Constant::destroyConstantImpl(), llvm::Type::getContext(), getType(), and llvm::LLVMContext::pImpl.
Referenced by replaceUsesOfWithOnConstant().
Definition at line 745 of file Constants.cpp.
References llvm::LLVMContextImpl::ArrayConstants, llvm::ArrayRef< T >::begin(), llvm::CallingConv::C, llvm::ArrayRef< T >::empty(), llvm::ArrayRef< T >::end(), llvm::ConstantAggregateZero::get(), llvm::ConstantDataArray::get(), llvm::Value::getContext(), llvm::Type::getContext(), llvm::SequentialType::getElementType(), llvm::Value::getType(), getType(), llvm::ConstantDataSequential::isElementTypeCompatible(), llvm::Constant::isNullValue(), llvm::LLVMContext::pImpl, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), rangeOnlyContains(), llvm::ArrayRef< T >::size(), llvm::SmallVectorTemplateCommon< T, typename >::size(), and llvm::SmallVectorTemplateCommon< T >::size().
Referenced by appendToGlobalArray(), llvm::ConstantFoldInsertValueInstruction(), createLoweredInitializer(), EvaluateStoreInto(), InstallGlobalCtors(), llvm::IntegersSubset::IntegersSubset(), LLVMConstArray(), llvm::MapValue(), replaceUsesOfWithOnConstant(), llvm::BitcodeReaderValueList::ResolveConstantForwardRefs(), setUsedInitializer(), and llvm::InstCombiner::visitLandingPadInst().
| ArrayType* llvm::ConstantArray::getType | ( | ) | const [inline] |
getType - Specialize the getType() method to always return an ArrayType, which reduces the amount of casting needed in parts of the compiler.
Reimplemented from llvm::Value.
Definition at line 355 of file Constants.h.
Referenced by ConstantArray(), destroyConstant(), emitGlobalConstantArray(), get(), and replaceUsesOfWithOnConstant().
replaceUsesOfWithOnConstant - Update this constant array to change uses of 'From' to be uses of 'To'. This must update the uniquing data structures etc.
Note that we intentionally replace all uses of From with To here. Consider a large array that uses 'From' 1000 times. By handling this case all here, ConstantArray::replaceUsesOfWithOnConstant is only invoked once, and that single invocation handles all 1000 uses. Handling them one at a time would work, but would be really slow because it would have to unique each updated array instance.
Reimplemented from llvm::Constant.
Definition at line 2533 of file Constants.cpp.
References destroyConstant(), get(), llvm::Type::getContext(), llvm::User::getNumOperands(), llvm::User::getOperand(), getType(), I, llvm::Constant::isNullValue(), Lookup(), llvm::makeArrayRef(), llvm::User::OperandList, llvm::LLVMContext::pImpl, llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::Value::replaceAllUsesWith(), llvm::SmallVectorImpl< T >::reserve(), and llvm::User::setOperand().
friend struct ConstantArrayCreator< ConstantArray, ArrayType > [friend] |
Definition at line 341 of file Constants.h.