Lines Matching refs:LI
68 if (const LoadInst *LI = dyn_cast<LoadInst>(U)) { in isAllocaPromotable() local
71 if (LI->isVolatile()) in isAllocaPromotable()
144 LoadInst *LI = cast<LoadInst>(User); in AnalyzeAlloca() local
147 UsingBlocks.push_back(LI->getParent()); in AnalyzeAlloca()
148 AllocaPointerVal = LI; in AnalyzeAlloca()
370 LoadInst *LI = cast<LoadInst>(UserInst); in rewriteSingleStoreAlloca() local
377 if (LI->getParent() == StoreBB) { in rewriteSingleStoreAlloca()
384 if (unsigned(StoreIndex) > LBI.getInstructionIndex(LI)) { in rewriteSingleStoreAlloca()
390 } else if (LI->getParent() != StoreBB && in rewriteSingleStoreAlloca()
391 !DT.dominates(StoreBB, LI->getParent())) { in rewriteSingleStoreAlloca()
395 Info.UsingBlocks.push_back(LI->getParent()); in rewriteSingleStoreAlloca()
404 if (ReplVal == LI) in rewriteSingleStoreAlloca()
405 ReplVal = UndefValue::get(LI->getType()); in rewriteSingleStoreAlloca()
406 LI->replaceAllUsesWith(ReplVal); in rewriteSingleStoreAlloca()
407 if (AST && LI->getType()->isPointerTy()) in rewriteSingleStoreAlloca()
408 AST->deleteValue(LI); in rewriteSingleStoreAlloca()
409 LI->eraseFromParent(); in rewriteSingleStoreAlloca()
410 LBI.deleteValue(LI); in rewriteSingleStoreAlloca()
473 LoadInst *LI = dyn_cast<LoadInst>(*UI++); in promoteSingleBlockAlloca() local
474 if (!LI) in promoteSingleBlockAlloca()
477 unsigned LoadIdx = LBI.getInstructionIndex(LI); in promoteSingleBlockAlloca()
488 LI->replaceAllUsesWith(UndefValue::get(LI->getType())); in promoteSingleBlockAlloca()
491 LI->replaceAllUsesWith(std::prev(I)->second->getOperand(0)); in promoteSingleBlockAlloca()
493 if (AST && LI->getType()->isPointerTy()) in promoteSingleBlockAlloca()
494 AST->deleteValue(LI); in promoteSingleBlockAlloca()
495 LI->eraseFromParent(); in promoteSingleBlockAlloca()
496 LBI.deleteValue(LI); in promoteSingleBlockAlloca()
810 if (LoadInst *LI = dyn_cast<LoadInst>(I)) { in ComputeLiveInBlocks() local
811 if (LI->getOperand(0) != AI) in ComputeLiveInBlocks()
1022 if (LoadInst *LI = dyn_cast<LoadInst>(I)) { in RenamePass() local
1023 AllocaInst *Src = dyn_cast<AllocaInst>(LI->getPointerOperand()); in RenamePass()
1034 LI->replaceAllUsesWith(V); in RenamePass()
1035 if (AST && LI->getType()->isPointerTy()) in RenamePass()
1036 AST->deleteValue(LI); in RenamePass()
1037 BB->getInstList().erase(LI); in RenamePass()