Lines Matching refs:AI
64 bool llvm::isAllocaPromotable(const AllocaInst *AI) { in isAllocaPromotable() argument
66 for (const User *U : AI->users()) { in isAllocaPromotable()
70 if (LI->isVolatile() || LI->getType() != AI->getAllocatedType()) in isAllocaPromotable()
73 if (SI->getValueOperand() == AI || in isAllocaPromotable()
74 SI->getValueOperand()->getType() != AI->getAllocatedType()) in isAllocaPromotable()
130 void init(AllocaInst *AI) { in init() argument
132 for (DbgAssignIntrinsic *DAI : at::getAssignmentMarkers(AI)) { in init()
136 for (DPValue *DPV : at::getDPVAssignmentMarkers(AI)) { in init()
238 void AnalyzeAlloca(AllocaInst *AI) { in AnalyzeAlloca()
244 for (User *U : AI->users()) { in AnalyzeAlloca()
267 findDbgUsers(AllDbgUsers, AI, &AllDPUsers); in AnalyzeAlloca()
275 AssignmentTracking.init(AI); in AnalyzeAlloca()
418 void ComputeLiveInBlocks(AllocaInst *AI, AllocaInfo &Info,
465 static void removeIntrinsicUsers(AllocaInst *AI) { in removeIntrinsicUsers() argument
469 for (Use &U : llvm::make_early_inc_range(AI->uses())) { in removeIntrinsicUsers()
508 rewriteSingleStoreAlloca(AllocaInst *AI, AllocaInfo &Info, LargeBlockInfo &LBI, in rewriteSingleStoreAlloca() argument
521 for (User *U : make_early_inc_range(AI->users())) { in rewriteSingleStoreAlloca()
570 DIBuilder DIB(*AI->getModule(), /*AllowUnresolved*/ false); in rewriteSingleStoreAlloca()
591 at::deleteAssignmentMarkers(AI); in rewriteSingleStoreAlloca()
597 AI->eraseFromParent(); in rewriteSingleStoreAlloca()
618 promoteSingleBlockAlloca(AllocaInst *AI, const AllocaInfo &Info, in promoteSingleBlockAlloca() argument
632 for (User *U : AI->users()) in promoteSingleBlockAlloca()
642 for (User *U : make_early_inc_range(AI->users())) { in promoteSingleBlockAlloca()
682 DIBuilder DIB(*AI->getModule(), /*AllowUnresolved*/ false); in promoteSingleBlockAlloca()
683 while (!AI->use_empty()) { in promoteSingleBlockAlloca()
684 StoreInst *SI = cast<StoreInst>(AI->user_back()); in promoteSingleBlockAlloca()
704 at::deleteAssignmentMarkers(AI); in promoteSingleBlockAlloca()
705 AI->eraseFromParent(); in promoteSingleBlockAlloca()
733 AllocaInst *AI = Allocas[AllocaNum]; in run() local
735 assert(isAllocaPromotable(AI) && "Cannot promote non-promotable alloca!"); in run()
736 assert(AI->getParent()->getParent() == &F && in run()
739 removeIntrinsicUsers(AI); in run()
741 if (AI->use_empty()) { in run()
743 AI->eraseFromParent(); in run()
753 Info.AnalyzeAlloca(AI); in run()
758 if (rewriteSingleStoreAlloca(AI, Info, LBI, SQ.DL, DT, AC, in run()
770 promoteSingleBlockAlloca(AI, Info, LBI, SQ.DL, DT, AC, in run()
803 ComputeLiveInBlocks(AI, Info, DefBlocks, LiveInBlocks); in run()
978 AllocaInst *AI, AllocaInfo &Info, in ComputeLiveInBlocks() argument
999 if (SI->getOperand(1) != AI) in ComputeLiveInBlocks()
1014 if (LI->getOperand(0) == AI) in ComputeLiveInBlocks()
1150 DenseMap<AllocaInst *, unsigned>::iterator AI = AllocaLookup.find(Src); in RenamePass() local
1151 if (AI == AllocaLookup.end()) in RenamePass()
1154 Value *V = IncomingVals[AI->second]; in RenamePass()