Lines Matching defs:AI
112 ConstantRange getStaticAllocaSizeRange(const AllocaInst &AI) {
113 const DataLayout &DL = AI.getModule()->getDataLayout();
114 TypeSize TS = DL.getTypeAllocSize(AI.getAllocatedType());
123 if (AI.isArrayAllocation()) {
124 const auto *C = dyn_cast<ConstantInt>(AI.getArraySize());
168 if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) {
169 auto &AS = Allocas.find(AI)->second;
170 O << " " << AI->getName() << "["
171 << getStaticAllocaSizeRange(*AI).getUpper() << "]: " << AS << "\n";
300 const AllocaInst *AI = dyn_cast<AllocaInst>(Ptr);
314 if (AI && !SL.isAliveAfter(AI, I)) {
332 if (AI && !SL.isAliveAfter(AI, I)) {
353 if (AI && !SL.isAliveAfter(AI, I)) {
410 if (auto *AI = dyn_cast<AllocaInst>(&I))
411 Allocas.push_back(AI);
415 for (auto *AI : Allocas) {
416 auto &UI = Info.Allocas.emplace(AI, PointerSize).first->second;
417 analyzeAllUses(AI, UI, SL);
738 const AllocaInst *AI = KV.first;
739 if (getStaticAllocaSizeRange(*AI).contains(KV.second.Range)) {
740 Info->SafeAllocas.insert(AI);
801 bool StackSafetyGlobalInfo::isSafe(const AllocaInst &AI) const {
803 return Info.SafeAllocas.count(&AI);