Lines Matching refs:CurInst
2186 bool GVN::performScalarPRE(Instruction *CurInst) {
2187 if (isa<AllocaInst>(CurInst) || isa<TerminatorInst>(CurInst) ||
2188 isa<PHINode>(CurInst) || CurInst->getType()->isVoidTy() ||
2189 CurInst->mayReadFromMemory() || CurInst->mayHaveSideEffects() ||
2190 isa<DbgInfoIntrinsic>(CurInst))
2197 if (isa<CmpInst>(CurInst))
2201 if (CallInst *CallI = dyn_cast<CallInst>(CurInst))
2205 uint32_t ValNo = VN.lookup(CurInst);
2216 BasicBlock *CurrentBlock = CurInst->getParent();
2227 // when CurInst has operand defined in CurrentBlock (so it may be defined
2230 llvm::any_of(CurInst->operands(), [&](const Use &U) {
2245 } else if (predV == CurInst) {
2246 /* CurInst dominates this predecessor. */
2266 if (!isSafeToSpeculativelyExecute(CurInst)) {
2275 if (OI->dominates(It->second, CurInst))
2293 PREInstr = CurInst->clone();
2310 PHINode::Create(CurInst->getType(), predMap.size(),
2311 CurInst->getName() + ".pre-phi", &CurrentBlock->front());
2316 patchReplacementInstruction(CurInst, V);
2327 Phi->setDebugLoc(CurInst->getDebugLoc());
2328 CurInst->replaceAllUsesWith(Phi);
2331 VN.erase(CurInst);
2332 removeFromLeaderTable(ValNo, CurInst, CurrentBlock);
2334 LLVM_DEBUG(dbgs() << "GVN PRE removed: " << *CurInst << '\n');
2336 MD->removeInstruction(CurInst);
2337 LLVM_DEBUG(verifyRemoved(CurInst));
2339 FirstImplicitControlFlowInsts.lookup(CurInst->getParent()) == CurInst;
2340 // FIXME: Intended to be markInstructionForDeletion(CurInst), but it causes
2343 CurInst->eraseFromParent();
2367 Instruction *CurInst = &*BI++;
2368 Changed |= performScalarPRE(CurInst);