# The following functions need to be ignored.
if (func_name == 'CreateInsertNUWNSWBinOp' or
func_name == 'CreateMaskedIntrinsic' or
- func_name == 'CreateAlignmentAssumptionHelper'):
+ func_name == 'CreateAlignmentAssumptionHelper' or
+ func_name == 'CreateLoad'):
ignore = True
# Convert CamelCase to CAMEL_CASE
return IN_BOUNDS_GEP(ptr, indices);
}
+ LoadInst* Builder::LOAD(Value *Ptr, const char *Name)
+ {
+ return IRB()->CreateLoad(Ptr, Name);
+ }
+
+ LoadInst* Builder::LOAD(Value *Ptr, const Twine &Name)
+ {
+ return IRB()->CreateLoad(Ptr, Name);
+ }
+
+ LoadInst* Builder::LOAD(Type *Ty, Value *Ptr, const Twine &Name)
+ {
+ return IRB()->CreateLoad(Ty, Ptr, Name);
+ }
+
+ LoadInst* Builder::LOAD(Value *Ptr, bool isVolatile, const Twine &Name)
+ {
+ return IRB()->CreateLoad(Ptr, isVolatile, Name);
+ }
+
LoadInst *Builder::LOAD(Value *basePtr, const std::initializer_list<uint32_t> &indices, const llvm::Twine& name)
{
std::vector<Value*> valIndices;
Value *IN_BOUNDS_GEP(Value* ptr, const std::initializer_list<Value*> &indexList);
Value *IN_BOUNDS_GEP(Value* ptr, const std::initializer_list<uint32_t> &indexList);
-LoadInst *LOAD(Value *BasePtr, const std::initializer_list<uint32_t> &offset, const llvm::Twine& name = "");
+virtual LoadInst* LOAD(Value *Ptr, const char *Name);
+virtual LoadInst* LOAD(Value *Ptr, const Twine &Name = "");
+virtual LoadInst* LOAD(Type *Ty, Value *Ptr, const Twine &Name = "");
+virtual LoadInst* LOAD(Value *Ptr, bool isVolatile, const Twine &Name = "");
+virtual LoadInst* LOAD(Value *BasePtr, const std::initializer_list<uint32_t> &offset, const llvm::Twine& Name = "");
+
LoadInst *LOADV(Value *BasePtr, const std::initializer_list<Value*> &offset, const llvm::Twine& name = "");
StoreInst *STORE(Value *Val, Value *BasePtr, const std::initializer_list<uint32_t> &offset);
StoreInst *STOREV(Value *Val, Value *BasePtr, const std::initializer_list<Value*> &offset);
Value* pZeroIndex = ALLOCA(mInt16Ty);
STORE(C((uint16_t)0), pZeroIndex);
- pLastIndex = TRANSLATE_ADDRESS(pLastIndex);
-
// Load a SIMD of index pointers
for(int64_t lane = 0; lane < mVWidth; lane++)
{
// Calculate the address of the requested index
Value *pIndex = GEP(pIndices, C(lane));
- pIndex = TRANSLATE_ADDRESS(pIndex);
-
// check if the address is less than the max index,
Value* mask = ICMP_ULT(pIndex, pLastIndex);