Lines Matching refs:Bld
537 CGBuilderTy &Bld = CGF.Builder; in getNVPTXWarpID() local
541 return Bld.CreateAShr(RT.getGPUThreadID(CGF), LaneIDBits, "nvptx_warp_id"); in getNVPTXWarpID()
548 CGBuilderTy &Bld = CGF.Builder; in getNVPTXLaneID() local
552 return Bld.CreateAnd(RT.getGPUThreadID(CGF), Bld.getInt32(LaneIDMask), in getNVPTXLaneID()
1051 CGBuilderTy &Bld = CGF.Builder; in emitKernelInit() local
1052 Bld.restoreIP(OMPBuilder.createTargetInit(Bld, IsSPMD, requiresFullRuntime())); in emitKernelInit()
1064 CGBuilderTy &Bld = CGF.Builder; in emitKernelDeinit() local
1065 OMPBuilder.createTargetDeinit(Bld, IsSPMD, requiresFullRuntime()); in emitKernelDeinit()
1378 CGBuilderTy &Bld = CGF.Builder; in emitGenericVarsProlog() local
1406 llvm::Value *CastedVoidPtr = Bld.CreatePointerBitCastOrAddrSpaceCast( in emitGenericVarsProlog()
1425 Size = Bld.CreateNUWAdd( in emitGenericVarsProlog()
1430 Size = Bld.CreateUDiv(Size, AlignVal); in emitGenericVarsProlog()
1431 Size = Bld.CreateNUWMul(Size, AlignVal); in emitGenericVarsProlog()
1509 CGBuilderTy &Bld = CGF.Builder; in emitParallelCall() local
1513 ID = Bld.CreateBitOrPointerCast(WFn, CGM.Int8PtrTy); in emitParallelCall()
1514 llvm::Value *FnPtr = Bld.CreateBitOrPointerCast(OutlinedFn, CGM.Int8PtrTy); in emitParallelCall()
1530 Address Dst = Bld.CreateConstArrayGEP(CapturedVarsAddrs, Idx); in emitParallelCall()
1533 PtrV = Bld.CreateIntToPtr(V, CGF.VoidPtrTy); in emitParallelCall()
1535 PtrV = Bld.CreatePointerBitCastOrAddrSpaceCast(V, CGF.VoidPtrTy); in emitParallelCall()
1544 IfCondVal = Bld.CreateIntCast(CGF.EvaluateExprAsBool(IfCond), CGF.Int32Ty, in emitParallelCall()
1559 Bld.CreateBitOrPointerCast(CapturedVarsAddrs.getPointer(), in emitParallelCall()
1708 CGBuilderTy &Bld = CGF.Builder; in createRuntimeShuffleFunction() local
1726 Bld.CreateIntCast(RT.getGPUWarpSize(CGF), CGM.Int16Ty, /*isSigned=*/true); in createRuntimeShuffleFunction()
1738 CGBuilderTy &Bld = CGF.Builder; in shuffleAndStore() local
1753 Address PtrEnd = Bld.CreatePointerBitCastOrAddrSpaceCast( in shuffleAndStore()
1754 Bld.CreateConstGEP(SrcAddr, 1), CGF.VoidPtrTy); in shuffleAndStore()
1762 Ptr = Bld.CreatePointerBitCastOrAddrSpaceCast(Ptr, IntTy->getPointerTo()); in shuffleAndStore()
1764 Bld.CreatePointerBitCastOrAddrSpaceCast(ElemPtr, IntTy->getPointerTo()); in shuffleAndStore()
1769 llvm::BasicBlock *CurrentBB = Bld.GetInsertBlock(); in shuffleAndStore()
1772 Bld.CreatePHI(Ptr.getType(), /*NumReservedValues=*/2); in shuffleAndStore()
1775 Bld.CreatePHI(ElemPtr.getType(), /*NumReservedValues=*/2); in shuffleAndStore()
1779 llvm::Value *PtrDiff = Bld.CreatePtrDiff( in shuffleAndStore()
1780 PtrEnd.getPointer(), Bld.CreatePointerBitCastOrAddrSpaceCast( in shuffleAndStore()
1782 Bld.CreateCondBr(Bld.CreateICmpSGT(PtrDiff, Bld.getInt64(IntSize - 1)), in shuffleAndStore()
1794 Address LocalPtr = Bld.CreateConstGEP(Ptr, 1); in shuffleAndStore()
1795 Address LocalElemPtr = Bld.CreateConstGEP(ElemPtr, 1); in shuffleAndStore()
1810 Ptr = Bld.CreateConstGEP(Ptr, 1); in shuffleAndStore()
1811 ElemPtr = Bld.CreateConstGEP(ElemPtr, 1); in shuffleAndStore()
1847 CGBuilderTy &Bld = CGF.Builder; local
1874 Address SrcElementPtrAddr = Bld.CreateConstArrayGEP(SrcBase, Idx);
1881 DestElementPtrAddr = Bld.CreateConstArrayGEP(DestBase, Idx);
1890 Address SrcElementPtrAddr = Bld.CreateConstArrayGEP(SrcBase, Idx);
1897 DestElementPtrAddr = Bld.CreateConstArrayGEP(DestBase, Idx);
1905 Address SrcElementPtrAddr = Bld.CreateConstArrayGEP(SrcBase, Idx);
1914 Bld.CreateNUWMul(ElementSizeInChars, ScratchpadIndex);
1916 Bld.CreateNUWAdd(DestBase.getPointer(), CurrentOffset);
1918 Bld.CreateIntToPtr(ScratchPadElemAbsolutePtrVal, CGF.VoidPtrTy);
1929 Bld.CreateNUWMul(ElementSizeInChars, ScratchpadIndex);
1931 Bld.CreateNUWAdd(SrcBase.getPointer(), CurrentOffset);
1933 Bld.CreateIntToPtr(ScratchPadElemAbsolutePtrVal, CGF.VoidPtrTy);
1940 DestElementPtrAddr = Bld.CreateConstArrayGEP(DestBase, Idx);
1950 SrcElementAddr = Bld.CreateElementBitCast(
1952 DestElementAddr = Bld.CreateElementBitCast(DestElementAddr,
1997 CGF.EmitStoreOfScalar(Bld.CreatePointerBitCastOrAddrSpaceCast(
2010 ScratchpadBasePtr = Bld.CreateNUWAdd(
2012 Bld.CreateNUWMul(ScratchpadWidth, ElementSizeInChars));
2015 ScratchpadBasePtr = Bld.CreateNUWSub(
2017 ScratchpadBasePtr = Bld.CreateUDiv(
2020 ScratchpadBasePtr = Bld.CreateNUWAdd(
2022 ScratchpadBasePtr = Bld.CreateNUWMul(
2079 CGBuilderTy &Bld = CGF.Builder; in emitInterWarpCopyFunction() local
2114 Bld.CreatePointerBitCastOrAddrSpaceCast( in emitInterWarpCopyFunction()
2155 Bld.CreateICmpULT(Cnt, llvm::ConstantInt::get(CGM.IntTy, NumIters)); in emitInterWarpCopyFunction()
2156 Bld.CreateCondBr(Cmp, BodyBB, ExitBB); in emitInterWarpCopyFunction()
2168 llvm::Value *IsWarpMaster = Bld.CreateIsNull(LaneID, "warp_master"); in emitInterWarpCopyFunction()
2169 Bld.CreateCondBr(IsWarpMaster, ThenBB, ElseBB); in emitInterWarpCopyFunction()
2173 Address ElemPtrPtrAddr = Bld.CreateConstArrayGEP(LocalReduceList, Idx); in emitInterWarpCopyFunction()
2178 ElemPtr = Bld.CreateElementBitCast(ElemPtr, CopyType); in emitInterWarpCopyFunction()
2180 ElemPtr = Address(Bld.CreateGEP(ElemPtr.getElementType(), in emitInterWarpCopyFunction()
2187 llvm::Value *MediumPtrVal = Bld.CreateInBoundsGEP( in emitInterWarpCopyFunction()
2193 MediumPtr = Bld.CreateElementBitCast(MediumPtr, CopyType); in emitInterWarpCopyFunction()
2205 Bld.CreateBr(MergeBB); in emitInterWarpCopyFunction()
2208 Bld.CreateBr(MergeBB); in emitInterWarpCopyFunction()
2230 Bld.CreateICmpULT(ThreadID, NumWarpsVal, "is_active_thread"); in emitInterWarpCopyFunction()
2231 Bld.CreateCondBr(IsActiveThread, W0ThenBB, W0ElseBB); in emitInterWarpCopyFunction()
2236 llvm::Value *SrcMediumPtrVal = Bld.CreateInBoundsGEP( in emitInterWarpCopyFunction()
2241 SrcMediumPtr = Bld.CreateElementBitCast(SrcMediumPtr, CopyType); in emitInterWarpCopyFunction()
2244 Address TargetElemPtrPtr = Bld.CreateConstArrayGEP(LocalReduceList, Idx); in emitInterWarpCopyFunction()
2248 TargetElemPtr = Bld.CreateElementBitCast(TargetElemPtr, CopyType); in emitInterWarpCopyFunction()
2250 TargetElemPtr = Address(Bld.CreateGEP(TargetElemPtr.getElementType(), in emitInterWarpCopyFunction()
2260 Bld.CreateBr(W0MergeBB); in emitInterWarpCopyFunction()
2263 Bld.CreateBr(W0MergeBB); in emitInterWarpCopyFunction()
2268 Cnt = Bld.CreateNSWAdd(Cnt, llvm::ConstantInt::get(CGM.IntTy, /*V=*/1)); in emitInterWarpCopyFunction()
2383 CGBuilderTy &Bld = CGF.Builder; in emitShuffleAndReduceFunction() local
2387 Bld.CreatePointerBitCastOrAddrSpaceCast( in emitShuffleAndReduceFunction()
2440 llvm::Value *CondAlgo0 = Bld.CreateIsNull(AlgoVerArgVal); in emitShuffleAndReduceFunction()
2442 llvm::Value *Algo1 = Bld.CreateICmpEQ(AlgoVerArgVal, Bld.getInt16(1)); in emitShuffleAndReduceFunction()
2443 llvm::Value *CondAlgo1 = Bld.CreateAnd( in emitShuffleAndReduceFunction()
2444 Algo1, Bld.CreateICmpULT(LaneIDArgVal, RemoteLaneOffsetArgVal)); in emitShuffleAndReduceFunction()
2446 llvm::Value *Algo2 = Bld.CreateICmpEQ(AlgoVerArgVal, Bld.getInt16(2)); in emitShuffleAndReduceFunction()
2447 llvm::Value *CondAlgo2 = Bld.CreateAnd( in emitShuffleAndReduceFunction()
2448 Algo2, Bld.CreateIsNull(Bld.CreateAnd(LaneIDArgVal, Bld.getInt16(1)))); in emitShuffleAndReduceFunction()
2449 CondAlgo2 = Bld.CreateAnd( in emitShuffleAndReduceFunction()
2450 CondAlgo2, Bld.CreateICmpSGT(RemoteLaneOffsetArgVal, Bld.getInt16(0))); in emitShuffleAndReduceFunction()
2452 llvm::Value *CondReduce = Bld.CreateOr(CondAlgo0, CondAlgo1); in emitShuffleAndReduceFunction()
2453 CondReduce = Bld.CreateOr(CondReduce, CondAlgo2); in emitShuffleAndReduceFunction()
2458 Bld.CreateCondBr(CondReduce, ThenBB, ElseBB); in emitShuffleAndReduceFunction()
2462 llvm::Value *LocalReduceListPtr = Bld.CreatePointerBitCastOrAddrSpaceCast( in emitShuffleAndReduceFunction()
2464 llvm::Value *RemoteReduceListPtr = Bld.CreatePointerBitCastOrAddrSpaceCast( in emitShuffleAndReduceFunction()
2468 Bld.CreateBr(MergeBB); in emitShuffleAndReduceFunction()
2471 Bld.CreateBr(MergeBB); in emitShuffleAndReduceFunction()
2477 Algo1 = Bld.CreateICmpEQ(AlgoVerArgVal, Bld.getInt16(1)); in emitShuffleAndReduceFunction()
2478 llvm::Value *CondCopy = Bld.CreateAnd( in emitShuffleAndReduceFunction()
2479 Algo1, Bld.CreateICmpUGE(LaneIDArgVal, RemoteLaneOffsetArgVal)); in emitShuffleAndReduceFunction()
2484 Bld.CreateCondBr(CondCopy, CpyThenBB, CpyElseBB); in emitShuffleAndReduceFunction()
2489 Bld.CreateBr(CpyMergeBB); in emitShuffleAndReduceFunction()
2492 Bld.CreateBr(CpyMergeBB); in emitShuffleAndReduceFunction()
2538 CGBuilderTy &Bld = CGF.Builder; in emitListToGlobalCopyFunction() local
2543 Bld.CreatePointerBitCastOrAddrSpaceCast( in emitListToGlobalCopyFunction()
2551 llvm::Value *BufferArrPtr = Bld.CreatePointerBitCastOrAddrSpaceCast( in emitListToGlobalCopyFunction()
2561 Address ElemPtrPtrAddr = Bld.CreateConstArrayGEP(LocalReduceList, Idx); in emitListToGlobalCopyFunction()
2565 ElemPtrPtr = Bld.CreatePointerBitCastOrAddrSpaceCast( in emitListToGlobalCopyFunction()
2575 llvm::Value *BufferPtr = Bld.CreateInBoundsGEP( in emitListToGlobalCopyFunction()
2647 CGBuilderTy &Bld = CGF.Builder; in emitListToGlobalReduceFunction() local
2653 llvm::Value *BufferArrPtr = Bld.CreatePointerBitCastOrAddrSpaceCast( in emitListToGlobalReduceFunction()
2675 llvm::Value *BufferPtr = Bld.CreateInBoundsGEP( in emitListToGlobalReduceFunction()
2743 CGBuilderTy &Bld = CGF.Builder; in emitGlobalToListCopyFunction() local
2748 Bld.CreatePointerBitCastOrAddrSpaceCast( in emitGlobalToListCopyFunction()
2756 llvm::Value *BufferArrPtr = Bld.CreatePointerBitCastOrAddrSpaceCast( in emitGlobalToListCopyFunction()
2767 Address ElemPtrPtrAddr = Bld.CreateConstArrayGEP(LocalReduceList, Idx); in emitGlobalToListCopyFunction()
2771 ElemPtrPtr = Bld.CreatePointerBitCastOrAddrSpaceCast( in emitGlobalToListCopyFunction()
2781 llvm::Value *BufferPtr = Bld.CreateInBoundsGEP( in emitGlobalToListCopyFunction()
2853 CGBuilderTy &Bld = CGF.Builder; in emitGlobalToListReduceFunction() local
2859 llvm::Value *BufferArrPtr = Bld.CreatePointerBitCastOrAddrSpaceCast( in emitGlobalToListReduceFunction()
2881 llvm::Value *BufferPtr = Bld.CreateInBoundsGEP( in emitGlobalToListReduceFunction()
3486 CGBuilderTy &Bld = CGF.Builder; in createParallelDataSharingWrapper() local
3512 Address Src = Bld.CreateConstInBoundsGEP(SharedArgListAddress, Idx); in createParallelDataSharingWrapper()
3513 Address TypedAddress = Bld.CreatePointerBitCastOrAddrSpaceCast( in createParallelDataSharingWrapper()
3522 Src = Bld.CreateConstInBoundsGEP(SharedArgListAddress, Idx); in createParallelDataSharingWrapper()
3523 TypedAddress = Bld.CreatePointerBitCastOrAddrSpaceCast( in createParallelDataSharingWrapper()
3537 Address Src = Bld.CreateConstInBoundsGEP(SharedArgListAddress, I + Idx); in createParallelDataSharingWrapper()
3538 Address TypedAddress = Bld.CreatePointerBitCastOrAddrSpaceCast( in createParallelDataSharingWrapper()