Lines Matching refs:AI

64 bool llvm::isAllocaPromotable(const AllocaInst *AI) {  in isAllocaPromotable()  argument
66 for (const User *U : AI->users()) { in isAllocaPromotable()
73 if (SI->getOperand(0) == AI) in isAllocaPromotable()
126 void AnalyzeAlloca(AllocaInst *AI) { in AnalyzeAlloca()
132 for (User *U : AI->users()) { in AnalyzeAlloca()
154 findDbgUsers(DbgUsers, AI); in AnalyzeAlloca()
288 void ComputeLiveInBlocks(AllocaInst *AI, AllocaInfo &Info,
312 static void removeIntrinsicUsers(AllocaInst *AI) { in removeIntrinsicUsers() argument
316 for (Use &U : llvm::make_early_inc_range(AI->uses())) { in removeIntrinsicUsers()
354 static bool rewriteSingleStoreAlloca(AllocaInst *AI, AllocaInfo &Info, in rewriteSingleStoreAlloca() argument
365 for (User *U : make_early_inc_range(AI->users())) { in rewriteSingleStoreAlloca()
424 DIBuilder DIB(*AI->getModule(), /*AllowUnresolved*/ false); in rewriteSingleStoreAlloca()
435 AI->eraseFromParent(); in rewriteSingleStoreAlloca()
455 static bool promoteSingleBlockAlloca(AllocaInst *AI, const AllocaInfo &Info, in promoteSingleBlockAlloca() argument
469 for (User *U : AI->users()) in promoteSingleBlockAlloca()
479 for (User *U : make_early_inc_range(AI->users())) { in promoteSingleBlockAlloca()
521 while (!AI->use_empty()) { in promoteSingleBlockAlloca()
522 StoreInst *SI = cast<StoreInst>(AI->user_back()); in promoteSingleBlockAlloca()
526 DIBuilder DIB(*AI->getModule(), /*AllowUnresolved*/ false); in promoteSingleBlockAlloca()
534 AI->eraseFromParent(); in promoteSingleBlockAlloca()
555 AllocaInst *AI = Allocas[AllocaNum]; in run() local
557 assert(isAllocaPromotable(AI) && "Cannot promote non-promotable alloca!"); in run()
558 assert(AI->getParent()->getParent() == &F && in run()
561 removeIntrinsicUsers(AI); in run()
563 if (AI->use_empty()) { in run()
565 AI->eraseFromParent(); in run()
575 Info.AnalyzeAlloca(AI); in run()
580 if (rewriteSingleStoreAlloca(AI, Info, LBI, SQ.DL, DT, AC)) { in run()
591 promoteSingleBlockAlloca(AI, Info, LBI, SQ.DL, DT, AC)) { in run()
619 ComputeLiveInBlocks(AI, Info, DefBlocks, LiveInBlocks); in run()
785 AllocaInst *AI, AllocaInfo &Info, in ComputeLiveInBlocks() argument
806 if (SI->getOperand(1) != AI) in ComputeLiveInBlocks()
821 if (LI->getOperand(0) == AI) in ComputeLiveInBlocks()
952 DenseMap<AllocaInst *, unsigned>::iterator AI = AllocaLookup.find(Src); in RenamePass() local
953 if (AI == AllocaLookup.end()) in RenamePass()
956 Value *V = IncomingVals[AI->second]; in RenamePass()