Lines Matching defs:GCR
3977 GCRelocateInst &GCR = *const_cast<GCRelocateInst *>(Reloc);
3980 if (GCR.use_empty()) {
3981 eraseInstFromFunction(GCR);
3985 Value *DerivedPtr = GCR.getDerivedPtr();
3986 Value *BasePtr = GCR.getBasePtr();
3990 replaceInstUsesWith(GCR, UndefValue::get(GCR.getType()));
3991 eraseInstFromFunction(GCR);
3995 if (auto *PT = dyn_cast<PointerType>(GCR.getType())) {
4001 replaceInstUsesWith(GCR, ConstantPointerNull::get(PT));
4002 eraseInstFromFunction(GCR);
4007 if (!GCR.hasRetAttr(Attribute::NonNull) &&
4010 GCR.addRetAttr(Attribute::NonNull);
4012 Worklist.pushUsersToWorkList(GCR);
4018 if (GCR.getBasePtr() == GCR.getDerivedPtr() &&
4019 GCR.getBasePtrIndex() != GCR.getDerivedPtrIndex()) {
4020 auto *OpIntTy = GCR.getOperand(2)->getType();
4021 GCR.setOperand(2, ConstantInt::get(OpIntTy, GCR.getBasePtrIndex()));
4050 GCRelocateInst &GCR = *const_cast<GCRelocateInst *>(Reloc);
4051 Value *BasePtr = GCR.getBasePtr();
4054 auto *OpIntTy1 = GCR.getOperand(1)->getType();
4055 GCR.setOperand(1, ConstantInt::get(OpIntTy1, Val2Idx[BasePtr]));
4056 Value *DerivedPtr = GCR.getDerivedPtr();
4059 auto *OpIntTy2 = GCR.getOperand(2)->getType();
4060 GCR.setOperand(2, ConstantInt::get(OpIntTy2, Val2Idx[DerivedPtr]));