Lines Matching refs:Old
104 static CanMerge makeMergeable(GlobalVariable *Old, GlobalVariable *New) { in makeMergeable() argument
105 if (!Old->hasGlobalUnnamedAddr() && !New->hasGlobalUnnamedAddr()) in makeMergeable()
107 if (hasMetadataOtherThanDebugLoc(Old)) in makeMergeable()
110 if (!Old->hasGlobalUnnamedAddr()) in makeMergeable()
115 static void replace(Module &M, GlobalVariable *Old, GlobalVariable *New) { in replace() argument
118 LLVM_DEBUG(dbgs() << "Replacing global: @" << Old->getName() << " -> @" in replace()
122 if (Old->getAlign() || New->getAlign()) in replace()
123 New->setAlignment(std::max(getAlign(Old), getAlign(New))); in replace()
125 copyDebugLocMetadata(Old, New); in replace()
126 Old->replaceAllUsesWith(NewConstant); in replace()
129 assert(Old->hasLocalLinkage() && in replace()
131 Old->eraseFromParent(); in replace()
230 GlobalVariable *Old = SameContentReplacements[i].first; in mergeConstants() local
232 replace(M, Old, New); in mergeConstants()