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

Lines Matching defs:AI

64 bool llvm::isAllocaPromotable(const AllocaInst *AI) {
67 unsigned AS = AI->getType()->getAddressSpace();
70 for (const User *U : AI->users()) {
77 if (SI->getOperand(0) == AI)
78 return false; // Don't allow a store OF the AI, only INTO the AI.
129 void AnalyzeAlloca(AllocaInst *AI) {
135 for (auto UI = AI->user_begin(), E = AI->user_end(); UI != E;) {
157 DbgDeclares = FindDbgAddrUses(AI);
291 void ComputeLiveInBlocks(AllocaInst *AI, AllocaInfo &Info,
315 static void removeLifetimeIntrinsicUsers(AllocaInst *AI) {
319 for (auto UI = AI->user_begin(), UE = AI->user_end(); UI != UE;) {
347 static bool rewriteSingleStoreAlloca(AllocaInst *AI, AllocaInfo &Info,
358 for (auto UI = AI->user_begin(), E = AI->user_end(); UI != E;) {
416 DIBuilder DIB(*AI->getModule(), /*AllowUnresolved*/ false);
424 AI->eraseFromParent();
444 static bool promoteSingleBlockAlloca(AllocaInst *AI, const AllocaInfo &Info,
458 for (User *U : AI->users())
468 for (auto UI = AI->user_begin(), E = AI->user_end(); UI != E;) {
510 while (!AI->use_empty()) {
511 StoreInst *SI = cast<StoreInst>(AI->user_back());
514 DIBuilder DIB(*AI->getModule(), /*AllowUnresolved*/ false);
521 AI->eraseFromParent();
541 AllocaInst *AI = Allocas[AllocaNum];
543 assert(isAllocaPromotable(AI) && "Cannot promote non-promotable alloca!");
544 assert(AI->getParent()->getParent() == &F &&
547 removeLifetimeIntrinsicUsers(AI);
549 if (AI->use_empty()) {
551 AI->eraseFromParent();
561 Info.AnalyzeAlloca(AI);
566 if (rewriteSingleStoreAlloca(AI, Info, LBI, SQ.DL, DT, AC)) {
577 promoteSingleBlockAlloca(AI, Info, LBI, SQ.DL, DT, AC)) {
605 ComputeLiveInBlocks(AI, Info, DefBlocks, LiveInBlocks);
769 AllocaInst *AI, AllocaInfo &Info,
790 if (SI->getOperand(1) != AI)
805 if (LI->getOperand(0) == AI)
935 DenseMap<AllocaInst *, unsigned>::iterator AI = AllocaLookup.find(Src);
936 if (AI == AllocaLookup.end())
939 Value *V = IncomingVals[AI->second];