Lines Matching refs:CurInst

2338 bool GVN::performScalarPRE(Instruction *CurInst) {  in performScalarPRE()  argument
2339 if (isa<AllocaInst>(CurInst) || isa<TerminatorInst>(CurInst) || in performScalarPRE()
2340 isa<PHINode>(CurInst) || CurInst->getType()->isVoidTy() || in performScalarPRE()
2341 CurInst->mayReadFromMemory() || CurInst->mayHaveSideEffects() || in performScalarPRE()
2342 isa<DbgInfoIntrinsic>(CurInst)) in performScalarPRE()
2349 if (isa<CmpInst>(CurInst)) in performScalarPRE()
2353 if (CallInst *CallI = dyn_cast<CallInst>(CurInst)) in performScalarPRE()
2357 uint32_t ValNo = VN.lookup(CurInst); in performScalarPRE()
2368 BasicBlock *CurrentBlock = CurInst->getParent(); in performScalarPRE()
2388 } else if (predV == CurInst) { in performScalarPRE()
2422 PREInstr = CurInst->clone(); in performScalarPRE()
2439 PHINode::Create(CurInst->getType(), predMap.size(), in performScalarPRE()
2440 CurInst->getName() + ".pre-phi", &CurrentBlock->front()); in performScalarPRE()
2450 Phi->setDebugLoc(CurInst->getDebugLoc()); in performScalarPRE()
2451 CurInst->replaceAllUsesWith(Phi); in performScalarPRE()
2454 VN.erase(CurInst); in performScalarPRE()
2455 removeFromLeaderTable(ValNo, CurInst, CurrentBlock); in performScalarPRE()
2457 DEBUG(dbgs() << "GVN PRE removed: " << *CurInst << '\n'); in performScalarPRE()
2459 MD->removeInstruction(CurInst); in performScalarPRE()
2460 DEBUG(verifyRemoved(CurInst)); in performScalarPRE()
2461 CurInst->eraseFromParent(); in performScalarPRE()
2483 Instruction *CurInst = &*BI++; in performPRE() local
2484 Changed |= performScalarPRE(CurInst); in performPRE()