Home | History | Annotate | Download | only in XCore

Lines Matching defs:GV

49     bool lowerGlobal(GlobalVariable *GV);
160 static bool rewriteNonInstructionUses(GlobalVariable *GV, Pass *P) {
162 for (User *U : GV->users())
179 bool XCoreLowerThreadLocal::lowerGlobal(GlobalVariable *GV) {
180 Module *M = GV->getParent();
182 if (!GV->isThreadLocal())
186 if (!rewriteNonInstructionUses(GV, this) ||
187 !GV->getType()->isSized() || isZeroLengthArray(GV->getType()))
191 ArrayType *NewType = createLoweredType(GV->getType()->getElementType());
193 if (GV->hasInitializer())
195 GV->getInitializer());
197 new GlobalVariable(*M, NewType, GV->isConstant(), GV->getLinkage(),
200 GV->getType()->getAddressSpace(),
201 GV->isExternallyInitialized());
204 SmallVector<User *, 16> Users(GV->user_begin(), GV->user_end());
209 Function *GetID = Intrinsic::getDeclaration(GV->getParent(),
216 U->replaceUsesOfWith(GV, Addr);
220 NewGV->takeName(GV);
221 GV->eraseFromParent();
231 GlobalVariable *GV = GVI;
232 if (GV->isThreadLocal())
233 ThreadLocalGlobals.push_back(GV);