Lines Matching refs:AI

146 ConstantRange getStaticAllocaSizeRange(const AllocaInst &AI) {  in getStaticAllocaSizeRange()  argument
147 const DataLayout &DL = AI.getModule()->getDataLayout(); in getStaticAllocaSizeRange()
148 TypeSize TS = DL.getTypeAllocSize(AI.getAllocatedType()); in getStaticAllocaSizeRange()
157 if (AI.isArrayAllocation()) { in getStaticAllocaSizeRange()
158 const auto *C = dyn_cast<ConstantInt>(AI.getArraySize()); in getStaticAllocaSizeRange()
202 if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) { in print() local
203 auto &AS = Allocas.find(AI)->second; in print()
204 O << " " << AI->getName() << "[" in print()
205 << getStaticAllocaSizeRange(*AI).getUpper() << "]: " << AS << "\n"; in print()
337 const AllocaInst *AI = dyn_cast<AllocaInst>(Ptr); in analyzeAllUses() local
351 if (AI && !SL.isAliveAfter(AI, I)) { in analyzeAllUses()
369 if (AI && !SL.isAliveAfter(AI, I)) { in analyzeAllUses()
390 if (AI && !SL.isAliveAfter(AI, I)) { in analyzeAllUses()
451 if (auto *AI = dyn_cast<AllocaInst>(&I)) in run() local
452 Allocas.push_back(AI); in run()
456 for (auto *AI : Allocas) { in run() local
457 auto &UI = Info.Allocas.emplace(AI, PointerSize).first->second; in run()
458 analyzeAllUses(AI, UI, SL); in run()
813 const AllocaInst *AI = KV.first; in getInfo() local
814 if (getStaticAllocaSizeRange(*AI).contains(KV.second.Range)) { in getInfo()
815 Info->SafeAllocas.insert(AI); in getInfo()
884 bool StackSafetyGlobalInfo::isSafe(const AllocaInst &AI) const { in isSafe()
886 return Info.SafeAllocas.count(&AI); in isSafe()