• Home
  • Raw
  • Download

Lines Matching refs:AI

51 bool llvm::isAllocaPromotable(const AllocaInst *AI) {  in isAllocaPromotable()  argument
54 unsigned AS = AI->getType()->getAddressSpace(); in isAllocaPromotable()
57 for (const User *U : AI->users()) { in isAllocaPromotable()
64 if (SI->getOperand(0) == AI) in isAllocaPromotable()
119 void AnalyzeAlloca(AllocaInst *AI) { in AnalyzeAlloca()
125 for (auto UI = AI->user_begin(), E = AI->user_end(); UI != E;) { in AnalyzeAlloca()
149 DbgDeclare = FindAllocaDbgDeclare(AI); in AnalyzeAlloca()
293 void ComputeLiveInBlocks(AllocaInst *AI, AllocaInfo &Info,
304 static void removeLifetimeIntrinsicUsers(AllocaInst *AI) { in removeLifetimeIntrinsicUsers() argument
308 for (auto UI = AI->user_begin(), UE = AI->user_end(); UI != UE;) { in removeLifetimeIntrinsicUsers()
336 static bool rewriteSingleStoreAlloca(AllocaInst *AI, AllocaInfo &Info, in rewriteSingleStoreAlloca() argument
348 for (auto UI = AI->user_begin(), E = AI->user_end(); UI != E;) { in rewriteSingleStoreAlloca()
404 DIBuilder DIB(*AI->getModule(), /*AllowUnresolved*/ false); in rewriteSingleStoreAlloca()
414 AST->deleteValue(AI); in rewriteSingleStoreAlloca()
415 AI->eraseFromParent(); in rewriteSingleStoreAlloca()
416 LBI.deleteValue(AI); in rewriteSingleStoreAlloca()
436 static bool promoteSingleBlockAlloca(AllocaInst *AI, const AllocaInfo &Info, in promoteSingleBlockAlloca() argument
448 for (User *U : AI->users()) in promoteSingleBlockAlloca()
458 for (auto UI = AI->user_begin(), E = AI->user_end(); UI != E;) { in promoteSingleBlockAlloca()
491 while (!AI->use_empty()) { in promoteSingleBlockAlloca()
492 StoreInst *SI = cast<StoreInst>(AI->user_back()); in promoteSingleBlockAlloca()
495 DIBuilder DIB(*AI->getModule(), /*AllowUnresolved*/ false); in promoteSingleBlockAlloca()
503 AST->deleteValue(AI); in promoteSingleBlockAlloca()
504 AI->eraseFromParent(); in promoteSingleBlockAlloca()
505 LBI.deleteValue(AI); in promoteSingleBlockAlloca()
529 AllocaInst *AI = Allocas[AllocaNum]; in run() local
531 assert(isAllocaPromotable(AI) && "Cannot promote non-promotable alloca!"); in run()
532 assert(AI->getParent()->getParent() == &F && in run()
535 removeLifetimeIntrinsicUsers(AI); in run()
537 if (AI->use_empty()) { in run()
540 AST->deleteValue(AI); in run()
541 AI->eraseFromParent(); in run()
551 Info.AnalyzeAlloca(AI); in run()
556 if (rewriteSingleStoreAlloca(AI, Info, LBI, DT, AST)) { in run()
567 promoteSingleBlockAlloca(AI, Info, LBI, AST)) { in run()
606 ComputeLiveInBlocks(AI, Info, DefBlocks, LiveInBlocks); in run()
776 AllocaInst *AI, AllocaInfo &Info, in ComputeLiveInBlocks() argument
798 if (SI->getOperand(1) != AI) in ComputeLiveInBlocks()
811 if (LI->getOperand(0) != AI) in ComputeLiveInBlocks()
935 DenseMap<AllocaInst *, unsigned>::iterator AI = AllocaLookup.find(Src); in RenamePass() local
936 if (AI == AllocaLookup.end()) in RenamePass()
939 Value *V = IncomingVals[AI->second]; in RenamePass()