[llvm] [PPC] Replace PPCMergeStringPool with GlobalMerge for Linux (PR #114850)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 7 08:24:24 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:
```suggestion
if (!Pad->isEHPad())
continue;
if (auto *II = dyn_cast<IntrinsicInst>(Pad))
if (II->getIntrinsicID() == Intrinsic::eh_typeid_for))
continue;
```
nit: I'd separate the two ifs here.
https://github.com/llvm/llvm-project/pull/114850
More information about the llvm-commits
mailing list