Lines Matching refs:GV
62 for (GlobalVariable &GV : llvm::make_early_inc_range(M.globals())) { in runOnModule()
63 if (GV.getType()->getAddressSpace() == llvm::ADDRESS_SPACE_GENERIC && in runOnModule()
64 !llvm::isTexture(GV) && !llvm::isSurface(GV) && !llvm::isSampler(GV) && in runOnModule()
65 !GV.getName().starts_with("llvm.")) { in runOnModule()
67 M, GV.getValueType(), GV.isConstant(), GV.getLinkage(), in runOnModule()
68 GV.hasInitializer() ? GV.getInitializer() : nullptr, "", &GV, in runOnModule()
69 GV.getThreadLocalMode(), llvm::ADDRESS_SPACE_GLOBAL); in runOnModule()
70 NewGV->copyAttributesFrom(&GV); in runOnModule()
71 NewGV->copyMetadata(&GV, /*Offset=*/0); in runOnModule()
72 GVMap[&GV] = NewGV; in runOnModule()
114 GlobalVariable *GV = I->first; in runOnModule() local
123 Constant *BitCastNewGV = ConstantExpr::getPointerCast(NewGV, GV->getType()); in runOnModule()
127 GV->replaceAllUsesWith(BitCastNewGV); in runOnModule()
128 std::string Name = std::string(GV->getName()); in runOnModule()
129 GV->eraseFromParent(); in runOnModule()
155 GlobalVariable *GV = I->second; in remapConstant() local
157 GV, in remapConstant()
158 PointerType::get(GV->getValueType(), llvm::ADDRESS_SPACE_GENERIC)); in remapConstant()