Lines Matching defs:GCR
3748 GCRelocateInst &GCR = *const_cast<GCRelocateInst *>(Reloc);
3751 if (GCR.use_empty()) {
3752 eraseInstFromFunction(GCR);
3756 Value *DerivedPtr = GCR.getDerivedPtr();
3757 Value *BasePtr = GCR.getBasePtr();
3761 replaceInstUsesWith(GCR, UndefValue::get(GCR.getType()));
3762 eraseInstFromFunction(GCR);
3766 if (auto *PT = dyn_cast<PointerType>(GCR.getType())) {
3772 replaceInstUsesWith(GCR, ConstantPointerNull::get(PT));
3773 eraseInstFromFunction(GCR);
3778 if (!GCR.hasRetAttr(Attribute::NonNull) &&
3780 GCR.addRetAttr(Attribute::NonNull);
3782 Worklist.pushUsersToWorkList(GCR);
3788 if (GCR.getBasePtr() == GCR.getDerivedPtr() &&
3789 GCR.getBasePtrIndex() != GCR.getDerivedPtrIndex()) {
3790 auto *OpIntTy = GCR.getOperand(2)->getType();
3791 GCR.setOperand(2, ConstantInt::get(OpIntTy, GCR.getBasePtrIndex()));
3820 GCRelocateInst &GCR = *const_cast<GCRelocateInst *>(Reloc);
3821 Value *BasePtr = GCR.getBasePtr();
3824 auto *OpIntTy1 = GCR.getOperand(1)->getType();
3825 GCR.setOperand(1, ConstantInt::get(OpIntTy1, Val2Idx[BasePtr]));
3826 Value *DerivedPtr = GCR.getDerivedPtr();
3829 auto *OpIntTy2 = GCR.getOperand(2)->getType();
3830 GCR.setOperand(2, ConstantInt::get(OpIntTy2, Val2Idx[DerivedPtr]));