Lines Matching full:replacements
114 // Replacements - This vector contains a list of replacements to perform.
115 SmallVector<std::pair<GlobalVariable*, GlobalVariable*>, 32> Replacements;
165 // the Replacements vector. We cannot do the replacement in this pass
199 Replacements.push_back(std::make_pair(GV, Slot));
202 if (Replacements.empty())
206 // Now that we have figured out which replacements must be made, do them all
209 for (unsigned i = 0, e = Replacements.size(); i != e; ++i) {
211 if (Replacements[i].first->getAlignment() ||
212 Replacements[i].second->getAlignment()) {
213 Replacements[i].second->setAlignment(std::max(
214 Replacements[i].first->getAlignment(),
215 Replacements[i].second->getAlignment()));
219 Replacements[i].first->replaceAllUsesWith(Replacements[i].second);
222 assert(Replacements[i].first->hasLocalLinkage() &&
224 Replacements[i].first->eraseFromParent();
227 NumMerged += Replacements.size();
228 Replacements.clear();