Lines Matching refs:Old
103 static CanMerge makeMergeable(GlobalVariable *Old, GlobalVariable *New) { in makeMergeable() argument
104 if (!Old->hasGlobalUnnamedAddr() && !New->hasGlobalUnnamedAddr()) in makeMergeable()
106 if (hasMetadataOtherThanDebugLoc(Old)) in makeMergeable()
109 if (!Old->hasGlobalUnnamedAddr()) in makeMergeable()
114 static void replace(Module &M, GlobalVariable *Old, GlobalVariable *New) { in replace() argument
117 LLVM_DEBUG(dbgs() << "Replacing global: @" << Old->getName() << " -> @" in replace()
121 if (Old->getAlign() || New->getAlign()) in replace()
122 New->setAlignment(std::max(getAlign(Old), getAlign(New))); in replace()
124 copyDebugLocMetadata(Old, New); in replace()
125 Old->replaceAllUsesWith(NewConstant); in replace()
128 assert(Old->hasLocalLinkage() && in replace()
130 Old->eraseFromParent(); in replace()
235 GlobalVariable *Old = SameContentReplacements[i].first; in mergeConstants() local
237 replace(M, Old, New); in mergeConstants()