Lines Matching defs:GCR
4147 GCRelocateInst &GCR = *const_cast<GCRelocateInst *>(Reloc);
4150 if (GCR.use_empty()) {
4151 eraseInstFromFunction(GCR);
4155 Value *DerivedPtr = GCR.getDerivedPtr();
4156 Value *BasePtr = GCR.getBasePtr();
4160 replaceInstUsesWith(GCR, UndefValue::get(GCR.getType()));
4161 eraseInstFromFunction(GCR);
4165 if (auto *PT = dyn_cast<PointerType>(GCR.getType())) {
4171 replaceInstUsesWith(GCR, ConstantPointerNull::get(PT));
4172 eraseInstFromFunction(GCR);
4177 if (!GCR.hasRetAttr(Attribute::NonNull) &&
4180 GCR.addRetAttr(Attribute::NonNull);
4182 Worklist.pushUsersToWorkList(GCR);
4188 if (GCR.getBasePtr() == GCR.getDerivedPtr() &&
4189 GCR.getBasePtrIndex() != GCR.getDerivedPtrIndex()) {
4190 auto *OpIntTy = GCR.getOperand(2)->getType();
4191 GCR.setOperand(2, ConstantInt::get(OpIntTy, GCR.getBasePtrIndex()));
4221 GCRelocateInst &GCR = *const_cast<GCRelocateInst *>(Reloc);
4222 Value *BasePtr = GCR.getBasePtr();
4225 auto *OpIntTy1 = GCR.getOperand(1)->getType();
4226 GCR.setOperand(1, ConstantInt::get(OpIntTy1, Val2Idx[BasePtr]));
4227 Value *DerivedPtr = GCR.getDerivedPtr();
4230 auto *OpIntTy2 = GCR.getOperand(2)->getType();
4231 GCR.setOperand(2, ConstantInt::get(OpIntTy2, Val2Idx[DerivedPtr]));