Lines Matching full:replacements
79 // Replacements - This vector contains a list of replacements to perform. in mergeConstants()
80 SmallVector<std::pair<GlobalVariable*, GlobalVariable*>, 32> Replacements; in mergeConstants() local
129 // the Replacements vector. We cannot do the replacement in this pass in mergeConstants()
162 Replacements.push_back(std::make_pair(GV, Slot)); in mergeConstants()
165 if (Replacements.empty()) in mergeConstants()
169 // Now that we have figured out which replacements must be made, do them all in mergeConstants()
172 for (unsigned i = 0, e = Replacements.size(); i != e; ++i) { in mergeConstants()
174 if (Replacements[i].first->getAlignment() || in mergeConstants()
175 Replacements[i].second->getAlignment()) { in mergeConstants()
176 Replacements[i].second->setAlignment( in mergeConstants()
177 std::max(getAlignment(Replacements[i].first), in mergeConstants()
178 getAlignment(Replacements[i].second))); in mergeConstants()
182 Replacements[i].first->replaceAllUsesWith(Replacements[i].second); in mergeConstants()
185 assert(Replacements[i].first->hasLocalLinkage() && in mergeConstants()
187 Replacements[i].first->eraseFromParent(); in mergeConstants()
190 NumMerged += Replacements.size(); in mergeConstants()
191 Replacements.clear(); in mergeConstants()