[llvm] [PPC] Replace PPCMergeStringPool with GlobalMerge for Linux (PR #114850)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 6 14:14:44 PST 2024
================
@@ -713,6 +714,25 @@ bool GlobalMergeImpl::run(Module &M) {
// Ignore all "required" globals:
if (isMustKeepGlobalVariable(&GV))
continue;
+ auto checkUsers = [](const GlobalVariable *GV) {
+ for (const User *CurrentUser : GV->users()) {
+ auto *I = dyn_cast<Instruction>(CurrentUser);
+ if (!I)
+ continue;
+ // Do not merge globals in exception pads.
+ if (I->isEHPad())
----------------
nikic wrote:
Isn't this already handled in https://github.com/llvm/llvm-project/blob/408abb2353fdc359de09d2ba3d3521ce2b5fd0b1/llvm/lib/CodeGen/GlobalMerge.cpp#L636? All code for globals that cannot be merged based on uses should be kept in there.
https://github.com/llvm/llvm-project/pull/114850
More information about the llvm-commits
mailing list