Lines Matching refs:AI

65 bool llvm::isAllocaPromotable(const AllocaInst *AI) {  in isAllocaPromotable()  argument
67 for (const User *U : AI->users()) { in isAllocaPromotable()
71 if (LI->isVolatile() || LI->getType() != AI->getAllocatedType()) in isAllocaPromotable()
74 if (SI->getValueOperand() == AI || in isAllocaPromotable()
75 SI->getValueOperand()->getType() != AI->getAllocatedType()) in isAllocaPromotable()
132 void init(AllocaInst *AI) { in init() argument
134 for (DbgAssignIntrinsic *DAI : at::getAssignmentMarkers(AI)) { in init()
138 for (DbgVariableRecord *DVR : at::getDVRAssignmentMarkers(AI)) { in init()
240 void AnalyzeAlloca(AllocaInst *AI) { in AnalyzeAlloca()
246 for (User *U : AI->users()) { in AnalyzeAlloca()
269 findDbgUsers(AllDbgUsers, AI, &AllDPUsers); in AnalyzeAlloca()
277 AssignmentTracking.init(AI); in AnalyzeAlloca()
423 void ComputeLiveInBlocks(AllocaInst *AI, AllocaInfo &Info,
479 static void removeIntrinsicUsers(AllocaInst *AI) { in removeIntrinsicUsers() argument
483 for (Use &U : llvm::make_early_inc_range(AI->uses())) { in removeIntrinsicUsers()
522 rewriteSingleStoreAlloca(AllocaInst *AI, AllocaInfo &Info, LargeBlockInfo &LBI, in rewriteSingleStoreAlloca() argument
541 for (User *U : make_early_inc_range(AI->users())) { in rewriteSingleStoreAlloca()
589 DIBuilder DIB(*AI->getModule(), /*AllowUnresolved*/ false); in rewriteSingleStoreAlloca()
610 at::deleteAssignmentMarkers(AI); in rewriteSingleStoreAlloca()
616 AI->eraseFromParent(); in rewriteSingleStoreAlloca()
637 promoteSingleBlockAlloca(AllocaInst *AI, const AllocaInfo &Info, in promoteSingleBlockAlloca() argument
651 for (User *U : AI->users()) in promoteSingleBlockAlloca()
661 for (User *U : make_early_inc_range(AI->users())) { in promoteSingleBlockAlloca()
701 DIBuilder DIB(*AI->getModule(), /*AllowUnresolved*/ false); in promoteSingleBlockAlloca()
702 while (!AI->use_empty()) { in promoteSingleBlockAlloca()
703 StoreInst *SI = cast<StoreInst>(AI->user_back()); in promoteSingleBlockAlloca()
723 at::deleteAssignmentMarkers(AI); in promoteSingleBlockAlloca()
724 AI->eraseFromParent(); in promoteSingleBlockAlloca()
754 AllocaInst *AI = Allocas[AllocaNum]; in run() local
756 assert(isAllocaPromotable(AI) && "Cannot promote non-promotable alloca!"); in run()
757 assert(AI->getParent()->getParent() == &F && in run()
760 removeIntrinsicUsers(AI); in run()
762 if (AI->use_empty()) { in run()
764 AI->eraseFromParent(); in run()
774 Info.AnalyzeAlloca(AI); in run()
779 if (rewriteSingleStoreAlloca(AI, Info, LBI, SQ.DL, DT, AC, in run()
791 promoteSingleBlockAlloca(AI, Info, LBI, SQ.DL, DT, AC, in run()
824 ComputeLiveInBlocks(AI, Info, DefBlocks, LiveInBlocks); in run()
999 AllocaInst *AI, AllocaInfo &Info, in ComputeLiveInBlocks() argument
1020 if (SI->getOperand(1) != AI) in ComputeLiveInBlocks()
1035 if (LI->getOperand(0) == AI) in ComputeLiveInBlocks()
1179 DenseMap<AllocaInst *, unsigned>::iterator AI = AllocaLookup.find(Src); in RenamePass() local
1180 if (AI == AllocaLookup.end()) in RenamePass()
1183 Value *V = IncomingVals[AI->second]; in RenamePass()