Lines Matching refs:ToReplace
616 for (GCRelocateInst *ToReplace : Targets) { in simplifyRelocatesOffABase()
617 assert(ToReplace->getBasePtrIndex() == RelocatedBase->getBasePtrIndex() && in simplifyRelocatesOffABase()
619 if (ToReplace->getBasePtrIndex() == ToReplace->getDerivedPtrIndex()) { in simplifyRelocatesOffABase()
624 if (RelocatedBase->getParent() != ToReplace->getParent()) { in simplifyRelocatesOffABase()
632 Value *Base = ToReplace->getBasePtr(); in simplifyRelocatesOffABase()
633 auto Derived = dyn_cast<GetElementPtrInst>(ToReplace->getDerivedPtr()); in simplifyRelocatesOffABase()
647 Builder.SetCurrentDebugLocation(ToReplace->getDebugLoc()); in simplifyRelocatesOffABase()
677 Replacement->takeName(ToReplace); in simplifyRelocatesOffABase()
681 if (Replacement->getType() != ToReplace->getType()) { in simplifyRelocatesOffABase()
683 Builder.CreateBitCast(Replacement, ToReplace->getType()); in simplifyRelocatesOffABase()
685 ToReplace->replaceAllUsesWith(ActualReplacement); in simplifyRelocatesOffABase()
686 ToReplace->eraseFromParent(); in simplifyRelocatesOffABase()