Lines Matching refs:AI

63 bool llvm::isAllocaPromotable(const AllocaInst *AI) {  in isAllocaPromotable()  argument
65 for (const User *U : AI->users()) { in isAllocaPromotable()
69 if (LI->isVolatile() || LI->getType() != AI->getAllocatedType()) in isAllocaPromotable()
72 if (SI->getValueOperand() == AI || in isAllocaPromotable()
73 SI->getValueOperand()->getType() != AI->getAllocatedType()) 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()
523 while (!AI->use_empty()) { in promoteSingleBlockAlloca()
524 StoreInst *SI = cast<StoreInst>(AI->user_back()); in promoteSingleBlockAlloca()
528 DIBuilder DIB(*AI->getModule(), /*AllowUnresolved*/ false); in promoteSingleBlockAlloca()
536 AI->eraseFromParent(); in promoteSingleBlockAlloca()
557 AllocaInst *AI = Allocas[AllocaNum]; in run() local
559 assert(isAllocaPromotable(AI) && "Cannot promote non-promotable alloca!"); in run()
560 assert(AI->getParent()->getParent() == &F && in run()
563 removeIntrinsicUsers(AI); in run()
565 if (AI->use_empty()) { in run()
567 AI->eraseFromParent(); in run()
577 Info.AnalyzeAlloca(AI); in run()
582 if (rewriteSingleStoreAlloca(AI, Info, LBI, SQ.DL, DT, AC)) { in run()
593 promoteSingleBlockAlloca(AI, Info, LBI, SQ.DL, DT, AC)) { in run()
621 ComputeLiveInBlocks(AI, Info, DefBlocks, LiveInBlocks); in run()
787 AllocaInst *AI, AllocaInfo &Info, in ComputeLiveInBlocks() argument
808 if (SI->getOperand(1) != AI) in ComputeLiveInBlocks()
823 if (LI->getOperand(0) == AI) in ComputeLiveInBlocks()
954 DenseMap<AllocaInst *, unsigned>::iterator AI = AllocaLookup.find(Src); in RenamePass() local
955 if (AI == AllocaLookup.end()) in RenamePass()
958 Value *V = IncomingVals[AI->second]; in RenamePass()