• Home
  • Raw
  • Download

Lines Matching refs:LI

184     void RewriteLoadUserOfWholeAlloca(LoadInst *LI, AllocaInst *AI,
479 if (LoadInst *LI = dyn_cast<LoadInst>(UI)) { in CanConvertToScalar() local
481 if (!LI->isSimple()) in CanConvertToScalar()
484 if (LI->getType()->isX86_MMXTy()) in CanConvertToScalar()
487 MergeInTypeForLoadOrStore(LI->getType(), Offset); in CanConvertToScalar()
634 if (LoadInst *LI = dyn_cast<LoadInst>(User)) { in ConvertUsesToScalar() local
638 = ConvertScalar_ExtractValue(LoadedVal, LI->getType(), Offset, in ConvertUsesToScalar()
640 LI->replaceAllUsesWith(NewLoadVal); in ConvertUsesToScalar()
641 LI->eraseFromParent(); in ConvertUsesToScalar()
1088 if (LoadInst *LI = dyn_cast<LoadInst>(I)) in isInstInList() local
1089 return LI->getOperand(0) == AI; in isInstInList()
1099 else if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) in updateDebugInfo() local
1100 ConvertDebugDeclareToDebugValue(DDI, LI, *DIB); in updateDebugInfo()
1115 } else if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) { in updateDebugInfo() local
1116 Arg = LI->getOperand(0); in updateDebugInfo()
1147 LoadInst *LI = dyn_cast<LoadInst>(U); in isSafeSelectToSpeculate() local
1148 if (!LI || !LI->isSimple()) return false; in isSafeSelectToSpeculate()
1153 !isSafeToLoadUnconditionally(SI->getTrueValue(), LI, in isSafeSelectToSpeculate()
1154 LI->getAlignment())) in isSafeSelectToSpeculate()
1157 !isSafeToLoadUnconditionally(SI->getFalseValue(), LI, in isSafeSelectToSpeculate()
1158 LI->getAlignment())) in isSafeSelectToSpeculate()
1189 LoadInst *LI = dyn_cast<LoadInst>(U); in isSafePHIToSpeculate() local
1190 if (!LI || !LI->isSimple()) return false; in isSafePHIToSpeculate()
1194 if (LI->getParent() != BB) return false; in isSafePHIToSpeculate()
1198 for (BasicBlock::iterator BBI = PN; &*BBI != LI; ++BBI) in isSafePHIToSpeculate()
1202 MaxAlign = std::max(MaxAlign, LI->getAlignment()); in isSafePHIToSpeculate()
1250 if (LoadInst *LI = dyn_cast<LoadInst>(U)) { in tryToMakeAllocaBePromotable() local
1251 if (!LI->isSimple()) in tryToMakeAllocaBePromotable()
1330 LoadInst *LI = cast<LoadInst>(SI->user_back()); in tryToMakeAllocaBePromotable() local
1332 IRBuilder<> Builder(LI); in tryToMakeAllocaBePromotable()
1334 Builder.CreateLoad(SI->getTrueValue(), LI->getName()+".t"); in tryToMakeAllocaBePromotable()
1336 Builder.CreateLoad(SI->getFalseValue(), LI->getName()+".f"); in tryToMakeAllocaBePromotable()
1339 TrueLoad->setAlignment(LI->getAlignment()); in tryToMakeAllocaBePromotable()
1340 FalseLoad->setAlignment(LI->getAlignment()); in tryToMakeAllocaBePromotable()
1343 LI->getAAMetadata(Tags); in tryToMakeAllocaBePromotable()
1350 V->takeName(LI); in tryToMakeAllocaBePromotable()
1351 LI->replaceAllUsesWith(V); in tryToMakeAllocaBePromotable()
1352 LI->eraseFromParent(); in tryToMakeAllocaBePromotable()
1382 LoadInst *LI = cast<LoadInst>(PN->user_back()); in tryToMakeAllocaBePromotable() local
1383 LI->replaceAllUsesWith(NewPN); in tryToMakeAllocaBePromotable()
1384 LI->eraseFromParent(); in tryToMakeAllocaBePromotable()
1630 } else if (LoadInst *LI = dyn_cast<LoadInst>(User)) { in isSafeForScalarRepl() local
1631 if (!LI->isSimple()) in isSafeForScalarRepl()
1633 Type *LIType = LI->getType(); in isSafeForScalarRepl()
1635 LI, true /*AllowWholeAccess*/); in isSafeForScalarRepl()
1690 } else if (LoadInst *LI = dyn_cast<LoadInst>(UI)) { in isSafePHISelectUseForScalarRepl() local
1691 if (!LI->isSimple()) in isSafePHISelectUseForScalarRepl()
1693 Type *LIType = LI->getType(); in isSafePHISelectUseForScalarRepl()
1695 LI, false /*AllowWholeAccess*/); in isSafePHISelectUseForScalarRepl()
1916 if (LoadInst *LI = dyn_cast<LoadInst>(User)) { in RewriteForScalarRepl() local
1917 Type *LIType = LI->getType(); in RewriteForScalarRepl()
1929 IRBuilder<> Builder(LI); in RewriteForScalarRepl()
1934 LI->replaceAllUsesWith(Insert); in RewriteForScalarRepl()
1935 DeadInsts.push_back(LI); in RewriteForScalarRepl()
1940 RewriteLoadUserOfWholeAlloca(LI, AI, NewElts); in RewriteForScalarRepl()
2467 SROA::RewriteLoadUserOfWholeAlloca(LoadInst *LI, AllocaInst *AI, in RewriteLoadUserOfWholeAlloca() argument
2472 const DataLayout &DL = LI->getModule()->getDataLayout(); in RewriteLoadUserOfWholeAlloca()
2475 DEBUG(dbgs() << "PROMOTING LOAD OF WHOLE ALLOCA: " << *AI << '\n' << *LI in RewriteLoadUserOfWholeAlloca()
2490 Constant::getNullValue(IntegerType::get(LI->getContext(), AllocaSizeBits)); in RewriteLoadUserOfWholeAlloca()
2503 IntegerType *FieldIntTy = IntegerType::get(LI->getContext(), in RewriteLoadUserOfWholeAlloca()
2509 "", LI); in RewriteLoadUserOfWholeAlloca()
2510 SrcField = new LoadInst(SrcField, "sroa.load.elt", LI); in RewriteLoadUserOfWholeAlloca()
2515 SrcField = new BitCastInst(SrcField, FieldIntTy, "", LI); in RewriteLoadUserOfWholeAlloca()
2520 SrcField = new ZExtInst(SrcField, ResultVal->getType(), "", LI); in RewriteLoadUserOfWholeAlloca()
2534 SrcField = BinaryOperator::CreateShl(SrcField, ShiftVal, "", LI); in RewriteLoadUserOfWholeAlloca()
2540 ResultVal = BinaryOperator::CreateOr(SrcField, ResultVal, "", LI); in RewriteLoadUserOfWholeAlloca()
2546 if (DL.getTypeSizeInBits(LI->getType()) != AllocaSizeBits) in RewriteLoadUserOfWholeAlloca()
2547 ResultVal = new TruncInst(ResultVal, LI->getType(), "", LI); in RewriteLoadUserOfWholeAlloca()
2549 LI->replaceAllUsesWith(ResultVal); in RewriteLoadUserOfWholeAlloca()
2550 DeadInsts.push_back(LI); in RewriteLoadUserOfWholeAlloca()