Home | History | Annotate | Download | only in Scalar

Lines Matching refs:CurInst

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