[PATCH] D137944: [ObjC][ARC] Teach the OptimizeSequences step of ObjCARCOpts about WinEH funclet tokens

Akira Hatanaka via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 23 06:41:38 PST 2023


ahatanak accepted this revision.
ahatanak added a comment.
This revision is now accepted and ready to land.

I'm not familiar with the WinEH stuff, but the other parts (the code that adds bundles, etc.) LGTM.



================
Comment at: llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp:597
+      assert(CV.size() > 0 && "Uncolored block");
+      for (BasicBlock *EHPadBB : CV)
+        if (auto *EHPad = dyn_cast<FuncletPadInst>(EHPadBB->getFirstNonPHI())) {
----------------
This piece of code does something similar to `cloneCallInstForBB`, but it's slightly different from it. It iterates over the entries in `CV` whereas the code above just looks at the first entry. 

Is this a bug that is fixed in https://reviews.llvm.org/D137945?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137944/new/

https://reviews.llvm.org/D137944



More information about the cfe-commits mailing list