Lines Matching refs:CurInst
2757 bool GVNPass::performScalarPRE(Instruction *CurInst) { in performScalarPRE() argument
2758 if (isa<AllocaInst>(CurInst) || CurInst->isTerminator() || in performScalarPRE()
2759 isa<PHINode>(CurInst) || CurInst->getType()->isVoidTy() || in performScalarPRE()
2760 CurInst->mayReadFromMemory() || CurInst->mayHaveSideEffects() || in performScalarPRE()
2761 isa<DbgInfoIntrinsic>(CurInst)) in performScalarPRE()
2768 if (isa<CmpInst>(CurInst)) in performScalarPRE()
2778 if (isa<GetElementPtrInst>(CurInst)) in performScalarPRE()
2781 if (auto *CallB = dyn_cast<CallBase>(CurInst)) { in performScalarPRE()
2790 uint32_t ValNo = VN.lookup(CurInst); in performScalarPRE()
2801 BasicBlock *CurrentBlock = CurInst->getParent(); in performScalarPRE()
2821 llvm::any_of(CurInst->operands(), [&](const Use &U) { in performScalarPRE()
2836 } else if (predV == CurInst) { in performScalarPRE()
2857 if (!isSafeToSpeculativelyExecute(CurInst)) { in performScalarPRE()
2862 if (ICF->isDominatedByICFIFromSameBlock(CurInst)) in performScalarPRE()
2879 PREInstr = CurInst->clone(); in performScalarPRE()
2896 PHINode::Create(CurInst->getType(), predMap.size(), in performScalarPRE()
2897 CurInst->getName() + ".pre-phi", &CurrentBlock->front()); in performScalarPRE()
2902 patchReplacementInstruction(CurInst, V); in performScalarPRE()
2913 Phi->setDebugLoc(CurInst->getDebugLoc()); in performScalarPRE()
2914 CurInst->replaceAllUsesWith(Phi); in performScalarPRE()
2917 VN.erase(CurInst); in performScalarPRE()
2918 removeFromLeaderTable(ValNo, CurInst, CurrentBlock); in performScalarPRE()
2920 LLVM_DEBUG(dbgs() << "GVN PRE removed: " << *CurInst << '\n'); in performScalarPRE()
2922 MD->removeInstruction(CurInst); in performScalarPRE()
2924 MSSAU->removeMemoryAccess(CurInst); in performScalarPRE()
2925 LLVM_DEBUG(verifyRemoved(CurInst)); in performScalarPRE()
2928 ICF->removeInstruction(CurInst); in performScalarPRE()
2929 CurInst->eraseFromParent(); in performScalarPRE()
2951 Instruction *CurInst = &*BI++; in performPRE() local
2952 Changed |= performScalarPRE(CurInst); in performPRE()