Lines Matching refs:CurInst
2938 bool GVNPass::performScalarPRE(Instruction *CurInst) { in performScalarPRE() argument
2939 if (isa<AllocaInst>(CurInst) || CurInst->isTerminator() || in performScalarPRE()
2940 isa<PHINode>(CurInst) || CurInst->getType()->isVoidTy() || in performScalarPRE()
2941 CurInst->mayReadFromMemory() || CurInst->mayHaveSideEffects() || in performScalarPRE()
2942 isa<DbgInfoIntrinsic>(CurInst)) in performScalarPRE()
2949 if (isa<CmpInst>(CurInst)) in performScalarPRE()
2959 if (isa<GetElementPtrInst>(CurInst)) in performScalarPRE()
2962 if (auto *CallB = dyn_cast<CallBase>(CurInst)) { in performScalarPRE()
2968 uint32_t ValNo = VN.lookup(CurInst); in performScalarPRE()
2979 BasicBlock *CurrentBlock = CurInst->getParent(); in performScalarPRE()
3007 } else if (predV == CurInst) { in performScalarPRE()
3028 if (!isSafeToSpeculativelyExecute(CurInst)) { in performScalarPRE()
3033 if (ICF->isDominatedByICFIFromSameBlock(CurInst)) in performScalarPRE()
3050 PREInstr = CurInst->clone(); in performScalarPRE()
3068 PHINode *Phi = PHINode::Create(CurInst->getType(), predMap.size(), in performScalarPRE()
3069 CurInst->getName() + ".pre-phi"); in performScalarPRE()
3075 patchReplacementInstruction(CurInst, V); in performScalarPRE()
3086 Phi->setDebugLoc(CurInst->getDebugLoc()); in performScalarPRE()
3087 CurInst->replaceAllUsesWith(Phi); in performScalarPRE()
3090 VN.erase(CurInst); in performScalarPRE()
3091 LeaderTable.erase(ValNo, CurInst, CurrentBlock); in performScalarPRE()
3093 LLVM_DEBUG(dbgs() << "GVN PRE removed: " << *CurInst << '\n'); in performScalarPRE()
3094 removeInstruction(CurInst); in performScalarPRE()
3116 Instruction *CurInst = &*BI++; in performPRE() local
3117 Changed |= performScalarPRE(CurInst); in performPRE()