Lines Matching defs:AS

249   bool presplitLoadsAndStores(AllocaInst &AI, AllocaSlices &AS);
250 AllocaInst *rewritePartition(AllocaInst &AI, AllocaSlices &AS, Partition &P);
251 bool splitAlloca(AllocaInst &AI, AllocaSlices &AS);
1029 AllocaSlices &AS;
1038 SliceBuilder(const DataLayout &DL, AllocaInst &AI, AllocaSlices &AS)
1041 AS(AS) {}
1046 AS.DeadUsers.push_back(&I);
1058 << " alloca: " << AS.AI << "\n"
1077 << " alloca: " << AS.AI << "\n"
1082 AS.Slices.push_back(Slice(BeginOffset, EndOffset, U, IsSplittable));
1195 << " alloca: " << AS.AI << "\n"
1244 AS.Slices[MTPI->second].kill();
1266 MemTransferSliceMap.insert(std::make_pair(&II, AS.Slices.size()));
1269 Slice &PrevP = AS.Slices[PrevIdx];
1287 assert(AS.Slices[PrevIdx].getUse()->getUser() == &II &&
1297 AS.DeadUseIfPromotable.push_back(U);
1404 AS.DeadOperands.push_back(U);
1427 AS.DeadOperands.push_back(U);
2663 AllocaSlices &AS;
2722 AllocaSliceRewriter(const DataLayout &DL, AllocaSlices &AS, SROA &Pass,
2729 : DL(DL), AS(AS), Pass(Pass), OldAI(OldAI), NewAI(NewAI),
2761 LLVM_DEBUG(AS.printSlice(dbgs(), I, ""));
2909 unsigned AS = LI.getPointerAddressSpace();
2960 Type *LTy = IRB.getPtrTy(AS);
2991 new LoadInst(LI.getType(), PoisonValue::get(IRB.getPtrTy(AS)), "",
3114 unsigned AS = SI.getPointerAddressSpace();
3115 Value *NewPtr = getNewAllocaSlicePtr(IRB, IRB.getPtrTy(AS));
4264 bool SROA::presplitLoadsAndStores(AllocaInst &AI, AllocaSlices &AS) {
4298 for (auto &P : AS.partitions()) {
4485 auto AS = LI->getPointerAddressSpace();
4490 APInt(DL.getIndexSizeInBits(AS), PartOffset),
4543 auto AS = SI->getPointerAddressSpace();
4547 APInt(DL.getIndexSizeInBits(AS), PartOffset),
4630 auto AS = LI->getPointerAddressSpace();
4634 APInt(DL.getIndexSizeInBits(AS), PartOffset),
4644 auto AS = SI->getPointerAddressSpace();
4648 APInt(DL.getIndexSizeInBits(AS), PartOffset),
4712 llvm::erase_if(AS, [](const Slice &S) { return S.isDead(); });
4716 AS.insert(NewSlices);
4720 for (auto I = AS.begin(), E = AS.end(); I != E; ++I)
4721 LLVM_DEBUG(AS.print(dbgs(), I, " "));
4743 AllocaInst *SROA::rewritePartition(AllocaInst &AI, AllocaSlices &AS,
4820 AI.getName() + ".sroa." + Twine(P.begin() - AS.begin()), &AI);
4838 AllocaSliceRewriter Rewriter(DL, AS, *this, AI, *NewAI, P.beginOffset(),
4881 for (Use *U : AS.getDeadUsesIfPromotable()) {
4968 bool SROA::splitAlloca(AllocaInst &AI, AllocaSlices &AS) {
4969 if (AS.begin() == AS.end())
4977 Changed |= presplitLoadsAndStores(AI, AS);
4994 for (Slice &S : AS)
4999 for (Slice &S : AS) {
5017 for (Slice &S : AS) {
5033 llvm::sort(AS);
5047 for (auto &P : AS.partitions()) {
5048 if (AllocaInst *NewAI = rewritePartition(AI, AS, P)) {
5196 AllocaSlices AS(DL, AI);
5197 LLVM_DEBUG(AS.print(dbgs()));
5198 if (AS.isEscaped())
5202 for (Instruction *DeadUser : AS.getDeadUsers()) {
5214 for (Use *DeadOp : AS.getDeadOperands()) {
5220 if (AS.begin() == AS.end())
5223 Changed |= splitAlloca(AI, AS);