Lines Matching full:irb
1123 IRBuilderTy IRB(&SI);
1131 IRB.SetInsertPoint(LI);
1133 IRB.CreateLoad(TV, LI->getName() + ".sroa.speculate.load.true");
1135 IRB.CreateLoad(FV, LI->getName() + ".sroa.speculate.load.false");
1146 Value *V = IRB.CreateSelect(SI.getCondition(), TL, FL,
1160 static Value *buildGEP(IRBuilderTy &IRB, Value *BasePtr,
1170 return IRB.CreateInBoundsGEP(BasePtr, Indices, "idx");
1182 static Value *getNaturalGEPWithType(IRBuilderTy &IRB, const DataLayout &DL,
1186 return buildGEP(IRB, BasePtr, Indices);
1199 Indices.push_back(IRB.getInt(APInt(DL.getPointerSizeInBits(0), 0)));
1204 Indices.push_back(IRB.getInt32(0));
1213 return buildGEP(IRB, BasePtr, Indices);
1220 static Value *getNaturalGEPRecursively(IRBuilderTy &IRB, const DataLayout &DL,
1225 return getNaturalGEPWithType(IRB, DL, Ptr, Ty, TargetTy, Indices);
1243 Indices.push_back(IRB.getInt(NumSkippedElements));
1244 return getNaturalGEPRecursively(IRB, DL, Ptr, VecTy->getElementType(),
1256 Indices.push_back(IRB.getInt(NumSkippedElements));
1257 return getNaturalGEPRecursively(IRB, DL, Ptr, ElementTy, Offset, TargetTy,
1275 Indices.push_back(IRB.getInt32(Index));
1276 return getNaturalGEPRecursively(IRB, DL, Ptr, ElementTy, Offset, TargetTy,
1290 static Value *getNaturalGEPWithOffset(IRBuilderTy &IRB, const DataLayout &DL,
1297 if (Ty == IRB.getInt8PtrTy() && TargetTy->isIntegerTy(8))
1309 Indices.push_back(IRB.getInt(NumSkippedElements));
1310 return getNaturalGEPRecursively(IRB, DL, Ptr, ElementTy, Offset, TargetTy,
1329 static Value *getAdjustedPtr(IRBuilderTy &IRB, const DataLayout &DL,
1363 if (Value *P = getNaturalGEPWithOffset(IRB, DL, Ptr, Offset, TargetTy,
1398 Int8Ptr = IRB.CreateBitCast(Ptr, IRB.getInt8PtrTy(),
1404 IRB.CreateInBoundsGEP(Int8Ptr, IRB.getInt(Int8PtrOffset),
1411 Ptr = IRB.CreateBitCast(Ptr, PointerTy, "cast");
1451 static Value *convertValue(const DataLayout &DL, IRBuilderTy &IRB, Value *V,
1460 return IRB.CreateZExt(V, NewITy);
1462 return IRB.CreateIntToPtr(V, Ty);
1464 return IRB.CreatePtrToInt(V, Ty);
1466 return IRB.CreateBitCast(V, Ty);
1700 static Value *extractInteger(const DataLayout &DL, IRBuilderTy &IRB, Value *V,
1711 V = IRB.CreateLShr(V, ShAmt, Name + ".shift");
1717 V = IRB.CreateTrunc(V, Ty, Name + ".trunc");
1723 static Value *insertInteger(const DataLayout &DL, IRBuilderTy &IRB, Value *Old,
1731 V = IRB.CreateZExt(V, IntTy, Name + ".ext");
1740 V = IRB.CreateShl(V, ShAmt, Name + ".shift");
1746 Old = IRB.CreateAnd(Old, Mask, Name + ".mask");
1748 V = IRB.CreateOr(Old, V, Name + ".insert");
1754 static Value *extractVector(IRBuilderTy &IRB, Value *V,
1765 V = IRB.CreateExtractElement(V, IRB.getInt32(BeginIndex),
1774 Mask.push_back(IRB.getInt32(i));
1775 V = IRB.CreateShuffleVector(V, UndefValue::get(V->getType()),
1782 static Value *insertVector(IRBuilderTy &IRB, Value *Old, Value *V,
1790 V = IRB.CreateInsertElement(Old, V, IRB.getInt32(BeginIndex),
1812 Mask.push_back(IRB.getInt32(i - BeginIndex));
1814 Mask.push_back(UndefValue::get(IRB.getInt32Ty()));
1815 V = IRB.CreateShuffleVector(V, UndefValue::get(V->getType()),
1822 Mask.push_back(IRB.getInt1(i >= BeginIndex && i < EndIndex));
1824 V = IRB.CreateSelect(ConstantVector::get(Mask), V, Old, Name + "blend");
1881 IRBuilderTy IRB;
1902 IRB(NewAI.getContext(), ConstantFolder()) {
1924 IRB.SetInsertPoint(OldUserI);
1925 IRB.SetCurrentDebugLocation(OldUserI->getDebugLoc());
1926 IRB.SetNamePrefix(Twine(NewAI.getName()) + "." + Twine(BeginOffset) + ".");
1958 Value *getAdjustedAllocaPtr(IRBuilderTy &IRB, uint64_t Offset,
1961 return getAdjustedPtr(IRB, DL, &NewAI, APInt(DL.getPointerSizeInBits(),
2005 Value *V = IRB.CreateAlignedLoad(&NewAI, NewAI.getAlignment(),
2007 return extractVector(IRB, V, BeginIndex, EndIndex, "vec");
2014 Value *V = IRB.CreateAlignedLoad(&NewAI, NewAI.getAlignment(),
2016 V = convertValue(DL, IRB, V, IntTy);
2020 V = extractInteger(DL, IRB, V, cast<IntegerType>(LI.getType()), Offset,
2048 V = IRB.CreateAlignedLoad(&NewAI, NewAI.getAlignment(),
2052 V = IRB.CreateAlignedLoad(
2053 getAdjustedAllocaPtr(IRB, NewBeginOffset, LTy),
2058 V = convertValue(DL, IRB, V, TargetTy);
2070 IRB.SetInsertPoint(llvm::next(BasicBlock::iterator(&LI)));
2077 V = insertInteger(DL, IRB, Placeholder, V, NewBeginOffset,
2105 V = convertValue(DL, IRB, V, SliceTy);
2108 Value *Old = IRB.CreateAlignedLoad(&NewAI, NewAI.getAlignment(),
2110 V = insertVector(IRB, Old, V, BeginIndex, "vec");
2112 StoreInst *Store = IRB.CreateAlignedStore(V, &NewAI, NewAI.getAlignment());
2125 Value *Old = IRB.CreateAlignedLoad(&NewAI, NewAI.getAlignment(),
2127 Old = convertValue(DL, IRB, Old, IntTy);
2130 V = insertInteger(DL, IRB, Old, SI.getValueOperand(), Offset,
2133 V = convertValue(DL, IRB, V, NewAllocaTy);
2134 StoreInst *Store = IRB.CreateAlignedStore(V, &NewAI, NewAI.getAlignment());
2169 V = extractInteger(DL, IRB, V, NarrowTy, NewBeginOffset,
2183 V = convertValue(DL, IRB, V, NewAllocaTy);
2184 NewSI = IRB.CreateAlignedStore(V, &NewAI, NewAI.getAlignment(),
2187 Value *NewPtr = getAdjustedAllocaPtr(IRB, NewBeginOffset,
2189 NewSI = IRB.CreateAlignedStore(
2219 V = IRB.CreateMul(IRB.CreateZExt(V, SplatIntTy, "zext"),
2231 V = IRB.CreateVectorSplat(NumElements, V, "vsplat");
2246 getAdjustedAllocaPtr(IRB, BeginOffset, II.getRawDest()->getType()));
2277 CallInst *New = IRB.CreateMemSet(
2278 getAdjustedAllocaPtr(IRB, NewBeginOffset, II.getRawDest()->getType()),
2304 Splat = convertValue(DL, IRB, Splat, ElementTy);
2308 Value *Old = IRB.CreateAlignedLoad(&NewAI, NewAI.getAlignment(),
2310 V = insertVector(IRB, Old, Splat, BeginIndex, "vec");
2321 Value *Old = IRB.CreateAlignedLoad(&NewAI, NewAI.getAlignment(),
2323 Old = convertValue(DL, IRB, Old, IntTy);
2325 V = insertInteger(DL, IRB, Old, V, Offset, "insert");
2330 V = convertValue(DL, IRB, V, AllocaTy);
2340 V = convertValue(DL, IRB, V, AllocaTy);
2343 Value *New = IRB.CreateAlignedStore(V, &NewAI, NewAI.getAlignment(),
2387 getAdjustedAllocaPtr(IRB, BeginOffset, II.getRawDest()->getType()));
2389 II.setSource(getAdjustedAllocaPtr(IRB, BeginOffset,
2441 OtherPtr = getAdjustedPtr(IRB, DL, OtherPtr, RelOffset, OtherPtrTy);
2444 IRB, NewBeginOffset,
2449 CallInst *New = IRB.CreateMemCpy(IsDest ? OurPtr : OtherPtr,
2484 Value *SrcPtr = getAdjustedPtr(IRB, DL, OtherPtr, RelOffset, OtherPtrTy);
2491 Src = IRB.CreateAlignedLoad(&NewAI, NewAI.getAlignment(),
2493 Src = extractVector(IRB, Src, BeginIndex, EndIndex, "vec");
2495 Src = IRB.CreateAlignedLoad(&NewAI, NewAI.getAlignment(),
2497 Src = convertValue(DL, IRB, Src, IntTy);
2499 Src = extractInteger(DL, IRB, Src, SubIntTy, Offset, "extract");
2501 Src = IRB.CreateAlignedLoad(SrcPtr, Align, II.isVolatile(),
2506 Value *Old = IRB.CreateAlignedLoad(&NewAI, NewAI.getAlignment(),
2508 Src = insertVector(IRB, Old, Src, BeginIndex, "vec");
2510 Value *Old = IRB.CreateAlignedLoad(&NewAI, NewAI.getAlignment(),
2512 Old = convertValue(DL, IRB, Old, IntTy);
2514 Src = insertInteger(DL, IRB, Old, Src, Offset, "insert");
2515 Src = convertValue(DL, IRB, Src, NewAllocaTy);
2519 IRB.CreateAlignedStore(Src, DstPtr, Align, II.isVolatile()));
2544 getAdjustedAllocaPtr(IRB, NewBeginOffset, II.getArgOperand(1)->getType());
2547 New = IRB.CreateLifetimeStart(Ptr, Size);
2549 New = IRB.CreateLifetimeEnd(Ptr, Size);
2596 Value *NewPtr = getAdjustedAllocaPtr(IRB, BeginOffset, OldPtr->getType());
2677 IRBuilderTy IRB;
2691 : IRB(InsertionPoint), GEPIndices(1, IRB.getInt32(0)), Ptr(Ptr) {}
2718 GEPIndices.push_back(IRB.getInt32(Idx));
2733 GEPIndices.push_back(IRB.getInt32(Idx));
2754 Value *GEP = IRB.CreateInBoundsGEP(Ptr, GEPIndices, Name + ".gep");
2755 Value *Load = IRB.CreateLoad(GEP, Name + ".load");
2756 Agg = IRB.CreateInsertValue(Agg, Load, Indices, Name + ".insert");
2785 Value *Store = IRB.CreateStore(
2786 IRB.CreateExtractValue(Agg, Indices, Name + ".extract"),
2787 IRB.CreateInBoundsGEP(Ptr, GEPIndices, Name + ".gep"));