• Home
  • Raw
  • Download

Lines Matching refs:GV

47     bool hasKnownAlignment(GlobalVariable *GV) const;
51 unsigned getAlignment(GlobalVariable *GV) const;
73 if (GlobalValue *GV = in FindUsedValues() local
75 UsedValues.insert(GV); in FindUsedValues()
90 bool ConstantMerge::hasKnownAlignment(GlobalVariable *GV) const { in hasKnownAlignment()
91 return TD || GV->getAlignment() != 0; in hasKnownAlignment()
94 unsigned ConstantMerge::getAlignment(GlobalVariable *GV) const { in getAlignment()
96 return TD->getPreferredAlignment(GV); in getAlignment()
97 return GV->getAlignment(); in getAlignment()
127 GlobalVariable *GV = GVI++; in runOnModule() local
130 GV->removeDeadConstantUsers(); in runOnModule()
131 if (GV->use_empty() && GV->hasLocalLinkage()) { in runOnModule()
132 GV->eraseFromParent(); in runOnModule()
137 if (!GV->isConstant() || !GV->hasDefinitiveInitializer() || in runOnModule()
138 GV->getType()->getAddressSpace() != 0 || GV->hasSection() || in runOnModule()
140 UsedGlobals.count(GV)) in runOnModule()
147 if (GV->isWeakForLinker()) in runOnModule()
150 Constant *Init = GV->getInitializer(); in runOnModule()
153 PointerIntPair<Constant*, 1, bool> Pair(Init, hasKnownAlignment(GV)); in runOnModule()
159 if (Slot == 0 || IsBetterCannonical(*GV, *Slot)) in runOnModule()
160 Slot = GV; in runOnModule()
169 GlobalVariable *GV = GVI++; in runOnModule() local
172 if (!GV->isConstant() || !GV->hasDefinitiveInitializer() || in runOnModule()
173 GV->getType()->getAddressSpace() != 0 || GV->hasSection() || in runOnModule()
175 UsedGlobals.count(GV)) in runOnModule()
179 if (!GV->hasLocalLinkage()) in runOnModule()
182 Constant *Init = GV->getInitializer(); in runOnModule()
185 PointerIntPair<Constant*, 1, bool> Pair(Init, hasKnownAlignment(GV)); in runOnModule()
188 if (!Slot || Slot == GV) in runOnModule()
191 if (!Slot->hasUnnamedAddr() && !GV->hasUnnamedAddr()) in runOnModule()
194 if (!GV->hasUnnamedAddr()) in runOnModule()
198 Replacements.push_back(std::make_pair(GV, Slot)); in runOnModule()