LLVM API Documentation
#include <Constants.h>
Public Member Functions | |
Constant * | getSplatValue () const |
VectorType * | getType () const |
Static Public Member Functions | |
static Constant * | get (LLVMContext &Context, ArrayRef< uint8_t > Elts) |
static Constant * | get (LLVMContext &Context, ArrayRef< uint16_t > Elts) |
static Constant * | get (LLVMContext &Context, ArrayRef< uint32_t > Elts) |
static Constant * | get (LLVMContext &Context, ArrayRef< uint64_t > Elts) |
static Constant * | get (LLVMContext &Context, ArrayRef< float > Elts) |
static Constant * | get (LLVMContext &Context, ArrayRef< double > Elts) |
static Constant * | getSplat (unsigned NumElts, Constant *Elt) |
static bool | classof (const Value *V) |
Protected Member Functions | |
void * | operator new (size_t s) |
Friends | |
class | ConstantDataSequential |
ConstantDataVector - A vector constant whose element type is a simple 1/2/4/8-byte integer or float/double, and whose elements are just simple data values (i.e. ConstantInt/ConstantFP). This Constant node has no operands because it stores all of the elements of the constant as densely packed data, instead of as Value*'s.
Definition at line 701 of file Constants.h.
static bool llvm::ConstantDataVector::classof | ( | const Value * | V | ) | [inline, static] |
Methods for support type inquiry through isa, cast, and dyn_cast:
Reimplemented from llvm::ConstantDataSequential.
Definition at line 743 of file Constants.h.
References llvm::Value::ConstantDataVectorVal, and llvm::Value::getValueID().
Constant * ConstantDataVector::get | ( | LLVMContext & | Context, |
ArrayRef< uint8_t > | Elts | ||
) | [static] |
get() constructors - Return a constant with vector type with an element count and element type matching the ArrayRef passed in. Note that this can return a ConstantAggregateZero object.
Definition at line 2557 of file Constants.cpp.
References llvm::ArrayRef< T >::data(), llvm::ConstantDataSequential::getImpl(), llvm::Type::getInt8Ty(), and llvm::ArrayRef< T >::size().
Referenced by get(), OptimizeVectorResize(), and llvm::InstCombiner::visitCallInst().
Constant * ConstantDataVector::get | ( | LLVMContext & | Context, |
ArrayRef< uint16_t > | Elts | ||
) | [static] |
Definition at line 2562 of file Constants.cpp.
References llvm::ArrayRef< T >::data(), get(), llvm::ConstantDataSequential::getImpl(), llvm::Type::getInt16Ty(), and llvm::ArrayRef< T >::size().
Constant * ConstantDataVector::get | ( | LLVMContext & | Context, |
ArrayRef< uint32_t > | Elts | ||
) | [static] |
Definition at line 2567 of file Constants.cpp.
References llvm::ArrayRef< T >::data(), get(), llvm::ConstantDataSequential::getImpl(), llvm::Type::getInt32Ty(), and llvm::ArrayRef< T >::size().
Constant * ConstantDataVector::get | ( | LLVMContext & | Context, |
ArrayRef< uint64_t > | Elts | ||
) | [static] |
Definition at line 2572 of file Constants.cpp.
References llvm::ArrayRef< T >::data(), get(), llvm::ConstantDataSequential::getImpl(), llvm::Type::getInt64Ty(), and llvm::ArrayRef< T >::size().
Constant * ConstantDataVector::get | ( | LLVMContext & | Context, |
ArrayRef< float > | Elts | ||
) | [static] |
Definition at line 2577 of file Constants.cpp.
References llvm::ArrayRef< T >::data(), get(), llvm::Type::getFloatTy(), llvm::ConstantDataSequential::getImpl(), and llvm::ArrayRef< T >::size().
Constant * ConstantDataVector::get | ( | LLVMContext & | Context, |
ArrayRef< double > | Elts | ||
) | [static] |
Definition at line 2582 of file Constants.cpp.
References llvm::ArrayRef< T >::data(), get(), llvm::Type::getDoubleTy(), llvm::ConstantDataSequential::getImpl(), and llvm::ArrayRef< T >::size().
Constant * ConstantDataVector::getSplat | ( | unsigned | NumElts, |
Constant * | Elt | ||
) | [static] |
getSplat - Return a ConstantVector with the specified constant in each element. The specified constant has to be a of a compatible type (i8/i16/ i32/i64/float/double) and must be a ConstantFP or ConstantInt.
Definition at line 2588 of file Constants.cpp.
References llvm::Value::getContext(), llvm::Value::getType(), and llvm::ConstantDataSequential::isElementTypeCompatible().
Constant * ConstantDataVector::getSplatValue | ( | ) | const |
getSplatValue - If this is a splat constant, meaning that all of the elements have the same value, return that value. Otherwise return NULL.
Reimplemented from llvm::Constant.
Definition at line 2716 of file Constants.cpp.
References llvm::StringRef::data(), llvm::ConstantDataSequential::getElementAsConstant(), llvm::ConstantDataSequential::getElementByteSize(), llvm::ConstantDataSequential::getNumElements(), llvm::ConstantDataSequential::getRawDataValues(), and llvm::LibFunc::memcmp.
VectorType* llvm::ConstantDataVector::getType | ( | ) | const [inline] |
getType - Specialize the getType() method to always return a VectorType, which reduces the amount of casting needed in parts of the compiler.
Reimplemented from llvm::ConstantDataSequential.
Definition at line 737 of file Constants.h.
void* llvm::ConstantDataVector::operator new | ( | size_t | s | ) | [inline, protected] |
Reimplemented from llvm::ConstantDataSequential.
Definition at line 710 of file Constants.h.
References operator new().
friend class ConstantDataSequential [friend] |
Definition at line 705 of file Constants.h.