[llvm] [PPC] Replace PPCMergeStringPool with GlobalMerge for Linux (PR #114850)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 7 09:23:37 PST 2024


================
@@ -632,10 +633,13 @@ void GlobalMergeImpl::setMustKeepGlobalVariables(Module &M) {
   for (Function &F : M) {
     for (BasicBlock &BB : F) {
       Instruction *Pad = BB.getFirstNonPHI();
-      if (!Pad->isEHPad())
+      auto *II = dyn_cast<IntrinsicInst>(Pad);
+      if (!Pad->isEHPad() &&
+          !(II && II->getIntrinsicID() == Intrinsic::eh_typeid_for))
         continue;
----------------
nikic wrote:

Oh sorry, I completely misread the code here. I think your original version was already the best one then.

https://github.com/llvm/llvm-project/pull/114850


More information about the llvm-commits mailing list