• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/llvm-project/llvm/lib/Transforms/Scalar/

Lines Matching defs:AI

224   AllocaSlices(const DataLayout &DL, AllocaInst &AI);
298 AllocaInst &AI;
653 SliceBuilder(const DataLayout &DL, AllocaInst &AI, AllocaSlices &AS)
655 AllocSize(DL.getTypeAllocSize(AI.getAllocatedType()).getFixedSize()),
673 << " alloca: " << AS.AI << "\n"
692 << " alloca: " << AS.AI << "\n"
811 << " alloca: " << AS.AI << "\n"
1043 AllocaSlices::AllocaSlices(const DataLayout &DL, AllocaInst &AI)
1046 AI(AI),
1049 SliceBuilder PB(DL, AI, *this);
1050 SliceBuilder::PtrInfo PtrI = PB.visitPtr(AI);
1092 OS << "Can't analyze slices for alloca: " << AI << "\n"
1098 OS << "Slices of alloca: " << AI << "\n";
2660 if (AllocaInst *AI = dyn_cast<AllocaInst>(V->stripInBoundsOffsets()))
2661 Pass.PostPromotionWorklist.insert(AI);
2952 if (AllocaInst *AI =
2954 assert(AI != &OldAI && AI != &NewAI &&
2956 Pass.Worklist.insert(AI);
3744 bool SROA::presplitLoadsAndStores(AllocaInst &AI, AllocaSlices &AS) {
3932 IRBuilderTy IRB(&AI);
3951 const DataLayout &DL = AI.getModule()->getDataLayout();
4169 assert(OtherAI != &AI && "We can't re-split our own alloca!");
4174 assert(OtherAI != &AI && "We can't re-split our own alloca!");
4215 [&](AllocaInst *AI) { return ResplitPromotableAllocas.count(AI); }),
4231 AllocaInst *SROA::rewritePartition(AllocaInst &AI, AllocaSlices &AS,
4237 const DataLayout &DL = AI.getModule()->getDataLayout();
4242 if (Type *TypePartitionTy = getTypePartition(DL, AI.getAllocatedType(),
4267 if (SliceTy == AI.getAllocatedType() && P.beginOffset() == 0) {
4268 NewAI = &AI;
4274 const Align Alignment = commonAlignment(AI.getAlign(), P.beginOffset());
4279 SliceTy, AI.getType()->getAddressSpace(), nullptr,
4281 AI.getName() + ".sroa." + Twine(P.begin() - AS.begin()), &AI);
4282 // Copy the old AI debug location over to the new one.
4283 NewAI->setDebugLoc(AI.getDebugLoc());
4299 AllocaSliceRewriter Rewriter(DL, AS, *this, AI, *NewAI, P.beginOffset(),
4354 if (NewAI == &AI)
4368 bool SROA::splitAlloca(AllocaInst &AI, AllocaSlices &AS) {
4374 const DataLayout &DL = AI.getModule()->getDataLayout();
4377 Changed |= presplitLoadsAndStores(AI, AS);
4388 DL.getTypeAllocSize(AI.getAllocatedType()).getFixedSize();
4441 Fragment(AllocaInst *AI, uint64_t O, uint64_t S)
4442 : Alloca(AI), Offset(O), Size(S) {}
4448 if (AllocaInst *NewAI = rewritePartition(AI, AS, P)) {
4450 if (NewAI != &AI) {
4467 TinyPtrVector<DbgVariableIntrinsic *> DbgDeclares = FindDbgAddrUses(&AI);
4472 DIBuilder DIB(*AI.getModule(), /*AllowUnresolved*/ false);
4474 DL.getTypeSizeInBits(AI.getAllocatedType()).getFixedSize();
4476 // Create a fragment expression describing the new partition or reuse AI's
4524 DbgDeclares.front()->getDebugLoc(), &AI);
4550 bool SROA::runOnAlloca(AllocaInst &AI) {
4551 LLVM_DEBUG(dbgs() << "SROA alloca: " << AI << "\n");
4555 if (AI.use_empty()) {
4556 AI.eraseFromParent();
4559 const DataLayout &DL = AI.getModule()->getDataLayout();
4562 auto *AT = AI.getAllocatedType();
4563 if (AI.isArrayAllocation() || !AT->isSized() || isa<ScalableVectorType>(AT) ||
4572 Changed |= AggRewriter.rewrite(AI);
4575 AllocaSlices AS(DL, AI);
4602 Changed |= splitAlloca(AI, AS);
4634 if (AllocaInst *AI = dyn_cast<AllocaInst>(I)) {
4635 DeletedAllocas.insert(AI);
4636 for (DbgVariableIntrinsic *OldDII : FindDbgAddrUses(AI))
4684 if (AllocaInst *AI = dyn_cast<AllocaInst>(I)) {
4685 if (isa<ScalableVectorType>(AI->getAllocatedType())) {
4686 if (isAllocaPromotable(AI))
4687 PromotableAllocas.push_back(AI);
4689 Worklist.insert(AI);
4707 auto IsInSet = [&](AllocaInst *AI) { return DeletedAllocas.count(AI); };