Lines Matching full:addr

68   llvm::LoadInst *CreateLoad(Address Addr, const llvm::Twine &Name = "") {
69 return CreateAlignedLoad(Addr.getPointer(),
70 Addr.getAlignment().getAsAlign(), Name);
72 llvm::LoadInst *CreateLoad(Address Addr, const char *Name) { in CreateLoad() argument
75 return CreateAlignedLoad(Addr.getPointer(), in CreateLoad()
76 Addr.getAlignment().getAsAlign(), Name); in CreateLoad()
78 llvm::LoadInst *CreateLoad(Address Addr, bool IsVolatile,
81 Addr.getPointer(), Addr.getAlignment().getAsAlign(), IsVolatile, Name);
85 llvm::LoadInst *CreateAlignedLoad(llvm::Value *Addr, CharUnits Align,
87 return CreateAlignedLoad(Addr, Align.getAsAlign(), Name);
89 llvm::LoadInst *CreateAlignedLoad(llvm::Value *Addr, CharUnits Align, in CreateAlignedLoad() argument
91 return CreateAlignedLoad(Addr, Align.getAsAlign(), Name); in CreateAlignedLoad()
93 llvm::LoadInst *CreateAlignedLoad(llvm::Type *Ty, llvm::Value *Addr,
96 assert(Addr->getType()->getPointerElementType() == Ty);
97 return CreateAlignedLoad(Addr, Align.getAsAlign(), Name);
102 llvm::StoreInst *CreateStore(llvm::Value *Val, Address Addr,
104 return CreateAlignedStore(Val, Addr.getPointer(),
105 Addr.getAlignment().getAsAlign(), IsVolatile);
109 llvm::StoreInst *CreateAlignedStore(llvm::Value *Val, llvm::Value *Addr,
111 return CreateAlignedStore(Val, Addr, Align.getAsAlign(), IsVolatile);
117 llvm::Value *Addr,
119 return CGBuilderBaseTy::CreateStore(Val, Addr, IsVolatile);
123 llvm::LoadInst *CreateFlagLoad(llvm::Value *Addr,
125 assert(Addr->getType()->getPointerElementType() == getInt1Ty());
126 return CreateAlignedLoad(getInt1Ty(), Addr, CharUnits::One(), Name);
130 llvm::StoreInst *CreateFlagStore(bool Value, llvm::Value *Addr) { in CreateFlagStore() argument
131 assert(Addr->getType()->getPointerElementType() == getInt1Ty()); in CreateFlagStore()
132 return CreateAlignedStore(getInt1(Value), Addr, CharUnits::One()); in CreateFlagStore()
136 Address CreateBitCast(Address Addr, llvm::Type *Ty,
138 return Address(CreateBitCast(Addr.getPointer(), Ty, Name),
139 Addr.getAlignment());
143 Address CreateAddrSpaceCast(Address Addr, llvm::Type *Ty,
145 return Address(CreateAddrSpaceCast(Addr.getPointer(), Ty, Name),
146 Addr.getAlignment());
151 Address CreateElementBitCast(Address Addr, llvm::Type *Ty,
153 auto PtrTy = Ty->getPointerTo(Addr.getAddressSpace());
154 return CreateBitCast(Addr, PtrTy, Name);
158 Address CreatePointerBitCastOrAddrSpaceCast(Address Addr, llvm::Type *Ty,
161 CreatePointerBitCastOrAddrSpaceCast(Addr.getPointer(), Ty, Name);
162 return Address(Ptr, Addr.getAlignment());
166 /// %addr = {T1, T2...}* ...
168 /// %name = getelementptr inbounds %addr, i32 0, i32 index
173 Address CreateStructGEP(Address Addr, unsigned Index,
175 llvm::StructType *ElTy = cast<llvm::StructType>(Addr.getElementType());
180 return Address(CreateStructGEP(Addr.getElementType(),
181 Addr.getPointer(), Index, Name),
182 Addr.getAlignment().alignmentAtOffset(Offset));
186 /// %addr = [n x T]* ...
188 /// %name = getelementptr inbounds %addr, i64 0, i64 index
193 Address CreateConstArrayGEP(Address Addr, uint64_t Index,
195 llvm::ArrayType *ElTy = cast<llvm::ArrayType>(Addr.getElementType());
201 CreateInBoundsGEP(Addr.getPointer(),
203 Addr.getAlignment().alignmentAtOffset(Index * EltSize));
207 /// %addr = T* ...
209 /// %name = getelementptr inbounds %addr, i64 index
211 Address CreateConstInBoundsGEP(Address Addr, uint64_t Index,
213 llvm::Type *ElTy = Addr.getElementType();
217 return Address(CreateInBoundsGEP(Addr.getElementType(), Addr.getPointer(),
219 Addr.getAlignment().alignmentAtOffset(Index * EltSize));
223 /// %addr = T* ...
225 /// %name = getelementptr inbounds %addr, i64 index
227 Address CreateConstGEP(Address Addr, uint64_t Index,
231 CharUnits::fromQuantity(DL.getTypeAllocSize(Addr.getElementType()));
233 return Address(CreateGEP(Addr.getElementType(), Addr.getPointer(),
235 Addr.getAlignment().alignmentAtOffset(Index * EltSize));
239 Address CreateConstInBoundsByteGEP(Address Addr, CharUnits Offset,
241 assert(Addr.getElementType() == TypeCache.Int8Ty);
242 return Address(CreateInBoundsGEP(Addr.getPointer(), getSize(Offset), Name),
243 Addr.getAlignment().alignmentAtOffset(Offset));
245 Address CreateConstByteGEP(Address Addr, CharUnits Offset,
247 assert(Addr.getElementType() == TypeCache.Int8Ty);
248 return Address(CreateGEP(Addr.getPointer(), getSize(Offset), Name),
249 Addr.getAlignment().alignmentAtOffset(Offset));
253 Address CreateConstInBoundsGEP2_32(Address Addr, unsigned Idx0, unsigned Idx1,
258 Addr.getElementType(), Addr.getPointer(), Idx0, Idx1, Name));
260 DL.getIndexSizeInBits(Addr.getType()->getPointerAddressSpace()), 0,
264 return Address(GEP, Addr.getAlignment().alignmentAtOffset(
305 Address CreatePreserveStructAccessIndex(Address Addr, in CreatePreserveStructAccessIndex() argument
309 llvm::StructType *ElTy = cast<llvm::StructType>(Addr.getElementType()); in CreatePreserveStructAccessIndex()
314 return Address(CreatePreserveStructAccessIndex(ElTy, Addr.getPointer(), in CreatePreserveStructAccessIndex()
316 Addr.getAlignment().alignmentAtOffset(Offset)); in CreatePreserveStructAccessIndex()