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

Lines Matching defs:AI

377   FieldId addFieldForAlloca(AllocaInst *AI, Spill *ForSpill = nullptr,
379 Type *Ty = AI->getAllocatedType();
382 if (AI->isArrayAllocation()) {
383 if (auto *CI = dyn_cast<ConstantInt>(AI->getArraySize()))
389 return addField(Ty, AI->getAlign(), ForSpill, IsHeader);
585 if (auto *AI = dyn_cast<AllocaInst>(CurrentDef)) {
586 B.addFieldForAlloca(AI, &S);
763 if (auto *AI = dyn_cast<AllocaInst>(Orig)) {
764 if (auto *CI = dyn_cast<ConstantInt>(AI->getArraySize())) {
802 if (auto *AI = dyn_cast<AllocaInst>(CurrentValue)) {
805 Allocas.emplace_back(AI, Index);
806 if (!AI->isStaticAlloca())
1220 static bool isLocalAlloca(CoroAllocaAllocInst *AI) {
1224 for (auto User : AI->users()) {
1229 return !isSuspendReachableFrom(AI->getParent(), VisitedOrFreeBBs);
1253 static bool localAllocaNeedsStackSave(CoroAllocaAllocInst *AI) {
1257 for (auto U : AI->users()) {
1273 for (auto AI : LocalAllocas) {
1274 auto M = AI->getModule();
1275 IRBuilder<> Builder(AI);
1280 if (localAllocaNeedsStackSave(AI))
1285 auto Alloca = Builder.CreateAlloca(Builder.getInt8Ty(), AI->getSize());
1286 Alloca->setAlignment(Align(AI->getAlignment()));
1288 for (auto U : AI->users()) {
1308 DeadInsts.push_back(AI);
1315 static Instruction *lowerNonLocalAlloca(CoroAllocaAllocInst *AI,
1318 IRBuilder<> Builder(AI);
1319 auto Alloc = Shape.emitAlloc(Builder, AI->getSize(), nullptr);
1321 for (User *U : AI->users()) {
1333 DeadInsts.push_back(AI);
1680 if (auto *AI = dyn_cast<AllocaInst>(OpInst->getOperand(0))) {
1682 if (LifetimeMap.find(AI) == LifetimeMap.end())
1683 LifetimeMap[AI] = std::make_unique<LifetimeStart>();
1685 LifetimeMap[AI]->insert(OpInst);
1708 if (auto AI = dyn_cast<CoroAllocaAllocInst>(&I)) {
1710 if (isLocalAlloca(AI)) {
1711 LocalAllocas.push_back(AI);
1718 // besides AI, and it doesn't invalidate the iteration because we delay
1719 // erasing AI.
1720 auto Alloc = lowerNonLocalAlloca(AI, Shape, DeadInstructions);