Lines Matching defs:GV
48 Value *getOrInsertCVTA(Module *M, Function *F, GlobalVariable *GV,
84 GlobalVariable *GV = I++;
85 if (GV->getType()->getAddressSpace() == llvm::ADDRESS_SPACE_GENERIC &&
86 !llvm::isTexture(*GV) && !llvm::isSurface(*GV) &&
87 !llvm::isSampler(*GV) && !GV->getName().startswith("llvm.")) {
89 M, GV->getType()->getElementType(), GV->isConstant(),
90 GV->getLinkage(),
91 GV->hasInitializer() ? GV->getInitializer() : nullptr,
92 "", GV, GV->getThreadLocalMode(), llvm::ADDRESS_SPACE_GLOBAL);
93 NewGV->copyAttributesFrom(GV);
94 GVMap[GV] = NewGV;
141 GlobalVariable *GV = I->first;
144 Constant *BitCastNewGV = ConstantExpr::getPointerCast(NewGV, GV->getType());
145 // At this point, the remaining uses of GV should be found only in global
148 for (Value::use_iterator UI = GV->use_begin(), UE = GV->use_end();
151 std::string Name = GV->getName();
152 GV->removeDeadConstantUsers();
153 GV->eraseFromParent();
162 GlobalVariable *GV,
164 PointerType *GVType = GV->getType();
175 CVTA = Builder.CreateBitCast(GV, DestTy, "cvta");
198 CVTA = Builder.CreateCall(CVTAFunction, GV, "cvta");