Home | History | Annotate | Download | only in Utils

Lines Matching refs:AI

94   bool analyzeAlloca(AllocaInst &AI) {
97 AllocaTy = AI.getAllocatedType();
98 enqueueUsers(AI);
115 DbgDeclare = FindAllocaDbgDeclare(&AI);
347 void DetermineInsertionPoint(AllocaInst *AI, unsigned AllocaNum,
349 void ComputeLiveInBlocks(AllocaInst *AI, AllocaInfo &Info,
365 static void removeDeadInstructions(AllocaInst *AI,
371 if (I == AI)
406 static bool rewriteSingleStoreAlloca(AllocaInst *AI, AllocaInfo &Info,
418 for (Value::use_iterator UI = AI->use_begin(), E = AI->use_end(); UI != E;) {
474 DIBuilder DIB(*AI->getParent()->getParent()->getParent());
483 AST->deleteValue(AI);
484 AI->eraseFromParent();
485 LBI.deleteValue(AI);
512 static void promoteSingleBlockAlloca(AllocaInst *AI, const AllocaInfo &Info,
524 for (Value::use_iterator UI = AI->use_begin(), E = AI->use_end(); UI != E;
536 for (Value::use_iterator UI = AI->use_begin(), E = AI->use_end(); UI != E;) {
563 while (!AI->use_empty()) {
564 StoreInst *SI = cast<StoreInst>(AI->use_back());
567 DIBuilder DIB(*AI->getParent()->getParent()->getParent());
575 AST->deleteValue(AI);
576 AI->eraseFromParent();
577 LBI.deleteValue(AI);
597 AllocaInst *AI = Allocas[AllocaNum];
599 assert(AI->getParent()->getParent() == &F &&
604 bool Good = Info.analyzeAlloca(*AI);
609 removeDeadInstructions(AI, Info.DeadInsts);
611 if (AI->use_empty()) {
614 AST->deleteValue(AI);
615 AI->eraseFromParent();
626 if (rewriteSingleStoreAlloca(AI, Info, LBI, DT, AST)) {
637 promoteSingleBlockAlloca(AI, Info, LBI, AST);
687 DetermineInsertionPoint(AI, AllocaNum, Info);
837 AllocaInst *AI, AllocaInfo &Info,
859 if (SI->getOperand(1) != AI)
871 if (LI->getOperand(0) != AI)
921 void PromoteMem2Reg::DetermineInsertionPoint(AllocaInst *AI, unsigned AllocaNum,
930 ComputeLiveInBlocks(AI, Info, DefBlocks, LiveInBlocks);
1096 DenseMap<AllocaInst *, unsigned>::iterator AI = AllocaLookup.find(Src);
1097 if (AI == AllocaLookup.end())
1100 Value *V = IncomingVals[AI->second];
1114 DenseMap<AllocaInst *, unsigned>::iterator ai = AllocaLookup.find(Dest);
1115 if (ai == AllocaLookup.end())
1119 IncomingVals[ai->second] = SI->getOperand(0);
1121 if (DbgDeclareInst *DDI = AllocaDbgDeclares[ai->second])
1148 bool llvm::isAllocaPromotable(const AllocaInst *AI, const DataLayout *DL) {
1153 return AllocaInfo(DL).analyzeAlloca(*const_cast<AllocaInst *>(AI));