42 #include <llvm/IR/Constants.h> 43 #include <llvm/IR/DerivedTypes.h> 44 #include <llvm/IR/LLVMContext.h> 45 #include <llvm/IR/Type.h> 47 #define PTYPE(p) (llvm::cast<llvm::PointerType>((p)->getType()->getScalarType())->getElementType()) 51 class InsertElementInst;
114 extern llvm::ConstantInt *
LLVMInt8(int8_t i);
116 extern llvm::ConstantInt *
LLVMUInt8(uint8_t i);
118 extern llvm::ConstantInt *
LLVMInt16(int16_t i);
120 extern llvm::ConstantInt *
LLVMUInt16(uint16_t i);
122 extern llvm::ConstantInt *
LLVMInt32(int32_t i);
124 extern llvm::ConstantInt *
LLVMUInt32(uint32_t i);
126 extern llvm::ConstantInt *
LLVMInt64(int64_t i);
128 extern llvm::ConstantInt *
LLVMUInt64(uint64_t i);
130 extern llvm::Constant *
LLVMFloat(
float f);
179 extern llvm::Constant *
LLVMIntAsType(int64_t, llvm::Type *t);
293 extern llvm::Value *
LLVMFlattenInsertChain(llvm::Value *inst,
int vectorWidth,
bool compare =
true,
bool undef =
true,
294 bool searchFirstUndef =
false);
299 #ifndef ISPC_NO_DUMPS 316 extern llvm::Value *
LLVMConcatVectors(llvm::Value *v1, llvm::Value *v2, llvm::Instruction *insertBefore);
322 extern llvm::Value *
LLVMShuffleVectors(llvm::Value *v1, llvm::Value *v2, int32_t shuf[],
int shufSize,
323 llvm::Instruction *insertBefore);
328 extern const char *
LLVMGetName(llvm::Value *v,
const char *);
329 extern const char *
LLVMGetName(
const char *op, llvm::Value *v1, llvm::Value *v2);
static llvm::Type * FloatType
llvm::Constant * LLVMMaskAllOn
static llvm::Type * Int32VectorPointerType
llvm::Value * LLVMShuffleVectors(llvm::Value *v1, llvm::Value *v2, int32_t shuf[], int shufSize, llvm::Instruction *insertBefore)
llvm::Constant * LLVMUInt16Vector(uint16_t i)
llvm::Constant * LLVMInt64Vector(int64_t i)
llvm::Constant * LLVMUInt32Vector(uint32_t i)
static llvm::Type * DoubleType
llvm::Constant * LLVMFalseInStorage
Structure that defines a compilation target.
llvm::Constant * LLVMFloat(float f)
static llvm::VectorType * VoidPointerVectorType
static llvm::VectorType * BoolVectorType
llvm::ConstantInt * LLVMUInt64(uint64_t i)
llvm::Constant * LLVMFloatVector(float f)
static llvm::Type * BoolType
bool LLVMExtractVectorInts(llvm::Value *v, int64_t ret[], int *nElts)
llvm::Constant * LLVMInt32Vector(int32_t i)
static llvm::VectorType * Int32VectorType
static llvm::VectorType * BoolVectorStorageType
static llvm::Type * FloatVectorPointerType
llvm::ConstantInt * LLVMInt8(int8_t i)
static llvm::Type * Int8PointerType
static llvm::Type * Int32PointerType
static llvm::Type * Int16VectorPointerType
void InitLLVMUtil(llvm::LLVMContext *ctx, Target &target)
llvm::Constant * LLVMUInt64Vector(uint64_t i)
static llvm::Type * Int16Type
static llvm::Type * DoubleVectorPointerType
llvm::Constant * LLVMFalse
llvm::Constant * LLVMMaskAllOff
static llvm::VectorType * Int1VectorType
llvm::Constant * LLVMInt8Vector(int8_t i)
static llvm::Type * VoidType
llvm::ConstantInt * LLVMInt32(int32_t i)
static llvm::Type * Int8VectorPointerType
static llvm::VectorType * Int8VectorType
llvm::Constant * LLVMUInt8Vector(uint8_t i)
llvm::ConstantInt * LLVMUInt8(uint8_t i)
bool LLVMVectorValuesAllEqual(llvm::Value *v, llvm::Value **splat=NULL)
llvm::ConstantInt * LLVMInt16(int16_t i)
llvm::Constant * LLVMTrue
llvm::ConstantInt * LLVMUInt16(uint16_t i)
llvm::Constant * LLVMUIntAsType(uint64_t, llvm::Type *t)
static llvm::VectorType * FloatVectorType
static llvm::Type * Int64Type
static llvm::Type * Int8Type
llvm::Constant * LLVMBoolVector(bool v)
static llvm::VectorType * Int64VectorType
llvm::Constant * LLVMDouble(double f)
static llvm::Type * Int64PointerType
llvm::ConstantInt * LLVMUInt32(uint32_t i)
llvm::Value * LLVMExtractFirstVectorElement(llvm::Value *v)
static llvm::Type * FloatPointerType
static llvm::Type * Int16PointerType
llvm::Constant * LLVMBoolVectorInStorage(bool v)
const char * LLVMGetName(llvm::Value *v, const char *)
void LLVMDumpValue(llvm::Value *v)
static llvm::Type * PointerIntType
static llvm::PointerType * VoidPointerType
static llvm::Type * Int64VectorPointerType
llvm::Constant * LLVMTrueInStorage
static llvm::Type * Int32Type
static llvm::Type * DoublePointerType
static llvm::Type * BoolStorageType
llvm::Constant * LLVMInt16Vector(int16_t i)
llvm::Constant * LLVMDoubleVector(double f)
llvm::Value * LLVMFlattenInsertChain(llvm::Value *inst, int vectorWidth, bool compare=true, bool undef=true, bool searchFirstUndef=false)
static llvm::VectorType * MaskType
static llvm::VectorType * DoubleVectorType
llvm::Constant * LLVMIntAsType(int64_t, llvm::Type *t)
bool IsOrEquivalentToAdd(llvm::Value *op)
static llvm::VectorType * Int16VectorType
llvm::Value * LLVMConcatVectors(llvm::Value *v1, llvm::Value *v2, llvm::Instruction *insertBefore)
bool LLVMVectorIsLinear(llvm::Value *v, int stride)
llvm::ConstantInt * LLVMInt64(int64_t i)