Home | History | Annotate | Download | only in Utils

Lines Matching refs:ai

82 bool llvm::isAllocaPromotable(const AllocaInst *AI) {
87 for (Value::const_use_iterator UI = AI->use_begin(), UE = AI->use_end();
96 if (SI->getOperand(0) == AI)
97 return false; // Don't allow a store OF the AI, only INTO the AI.
281 void DetermineInsertionPoint(AllocaInst *AI, unsigned AllocaNum,
283 void ComputeLiveInBlocks(AllocaInst *AI, AllocaInfo &Info,
287 void RewriteSingleStoreAlloca(AllocaInst *AI, AllocaInfo &Info,
289 void PromoteSingleBlockAlloca(AllocaInst *AI, AllocaInfo &Info,
321 void AnalyzeAlloca(AllocaInst *AI) {
327 for (Value::use_iterator UI = AI->use_begin(), E = AI->use_end();
352 DbgDeclare = FindAllocaDbgDeclare(AI);
365 static void removeLifetimeIntrinsicUsers(AllocaInst *AI) {
369 for (Value::use_iterator UI = AI->use_begin(), UE = AI->use_end();
401 AllocaInst *AI = Allocas[AllocaNum];
403 assert(isAllocaPromotable(AI) &&
405 assert(AI->getParent()->getParent() == &F &&
408 removeLifetimeIntrinsicUsers(AI);
410 if (AI->use_empty()) {
412 if (AST) AST->deleteValue(AI);
413 AI->eraseFromParent();
423 Info.AnalyzeAlloca(AI);
428 RewriteSingleStoreAlloca(AI, Info, LBI);
444 if (AST) AST->deleteValue(AI);
445 AI->eraseFromParent();
446 LBI.deleteValue(AI);
459 PromoteSingleBlockAlloca(AI, Info, LBI);
466 while (!AI->use_empty()) {
467 StoreInst *SI = cast<StoreInst>(AI->use_back());
478 if (AST) AST->deleteValue(AI);
479 AI->eraseFromParent();
480 LBI.deleteValue(AI);
536 DetermineInsertionPoint(AI, AllocaNum, Info);
683 ComputeLiveInBlocks(AllocaInst *AI, AllocaInfo &Info,
704 if (SI->getOperand(1) != AI) continue;
715 if (LI->getOperand(0) != AI) continue;
754 void PromoteMem2Reg::DetermineInsertionPoint(AllocaInst *AI, unsigned AllocaNum,
763 ComputeLiveInBlocks(AI, Info, DefBlocks, LiveInBlocks);
842 void PromoteMem2Reg::RewriteSingleStoreAlloca(AllocaInst *AI,
853 for (Value::use_iterator UI = AI->use_begin(), E = AI->use_end(); UI != E; ) {
930 void PromoteMem2Reg::PromoteSingleBlockAlloca(AllocaInst *AI, AllocaInfo &Info,
944 for (Value::use_iterator UI = AI->use_begin(), E = AI->use_end();
951 for (Value::use_iterator UI = AI->use_begin(), E = AI->use_end(); UI != E;)
968 for (Value::use_iterator UI = AI->use_begin(), E = AI->use_end(); UI != E;) {
1083 DenseMap<AllocaInst*, unsigned>::iterator AI = AllocaLookup.find(Src);
1084 if (AI == AllocaLookup.end()) continue;
1086 Value *V = IncomingVals[AI->second];
1099 DenseMap<AllocaInst *, unsigned>::iterator ai = AllocaLookup.find(Dest);
1100 if (ai == AllocaLookup.end())
1104 IncomingVals[ai->second] = SI->getOperand(0);
1106 if (DbgDeclareInst *DDI = AllocaDbgDeclares[ai->second]) {