Lines Matching refs:Builder
45 std::pair<Value *, Value *> getLocalSizeYZ(IRBuilder<> &Builder);
46 Value *getWorkitemID(IRBuilder<> &Builder, unsigned N);
231 AMDGPUPromoteAlloca::getLocalSizeYZ(IRBuilder<> &Builder) {
238 CallInst *LocalSizeY = Builder.CreateCall(LocalSizeYFn, {});
239 CallInst *LocalSizeZ = Builder.CreateCall(LocalSizeZFn, {});
284 CallInst *DispatchPtr = Builder.CreateCall(DispatchPtrFn, {});
292 Value *CastDispatchPtr = Builder.CreateBitCast(
298 Value *GEPXY = Builder.CreateConstInBoundsGEP1_64(CastDispatchPtr, 1);
299 LoadInst *LoadXY = Builder.CreateAlignedLoad(GEPXY, 4);
301 Value *GEPZU = Builder.CreateConstInBoundsGEP1_64(CastDispatchPtr, 2);
302 LoadInst *LoadZU = Builder.CreateAlignedLoad(GEPZU, 4);
310 Value *Y = Builder.CreateLShr(LoadXY, 16);
315 Value *AMDGPUPromoteAlloca::getWorkitemID(IRBuilder<> &Builder, unsigned N) {
337 CallInst *CI = Builder.CreateCall(WorkitemIdFn);
443 IRBuilder<> Builder(Inst);
448 Value *BitCast = Builder.CreateBitCast(Alloca, VectorTy->getPointerTo(0));
449 Value *VecValue = Builder.CreateLoad(BitCast);
450 Value *ExtractElement = Builder.CreateExtractElement(VecValue, Index);
458 Value *BitCast = Builder.CreateBitCast(Alloca, VectorTy->getPointerTo(0));
459 Value *VecValue = Builder.CreateLoad(BitCast);
460 Value *NewVecValue = Builder.CreateInsertElement(VecValue,
463 Builder.CreateStore(NewVecValue, BitCast);
638 IRBuilder<> Builder(&I);
704 std::tie(TCntY, TCntZ) = getLocalSizeYZ(Builder);
705 Value *TIdX = getWorkitemID(Builder, 0);
706 Value *TIdY = getWorkitemID(Builder, 1);
707 Value *TIdZ = getWorkitemID(Builder, 2);
709 Value *Tmp0 = Builder.CreateMul(TCntY, TCntZ, "", true, true);
710 Tmp0 = Builder.CreateMul(Tmp0, TIdX);
711 Value *Tmp1 = Builder.CreateMul(TIdY, TCntZ, "", true, true);
712 Value *TID = Builder.CreateAdd(Tmp0, Tmp1);
713 TID = Builder.CreateAdd(TID, TIdZ);
720 Value *Offset = Builder.CreateInBoundsGEP(GVTy, GV, Indices);
792 Builder.SetInsertPoint(Intr);
801 Builder.CreateMemCpy(MemCpy->getRawDest(), MemCpy->getRawSource(),
809 Builder.CreateMemMove(MemMove->getRawDest(), MemMove->getRawSource(),
817 Builder.CreateMemSet(MemSet->getRawDest(), MemSet->getValue(),
840 = Builder.CreateCall(ObjectSize, { Src, Intr->getOperand(1) });