[PATCH] D46482: [ObjCARC] Prevent code motion into a catchswitch

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 15 10:34:34 PDT 2018


rnk added inline comments.


================
Comment at: lib/Transforms/ObjCARC/ObjCARCOpts.cpp:1699
+                CFGHazardAfflicted |= isa<CatchSwitchInst>(RIP);
               }
             }
----------------
ahatanak wrote:
> This is preventing releases from being inserted before a CatchSwitchInst. Is that correct? Do you have to prevent retains from being inserted before CatchSwitchInsts too somewhere, or we don't have to worry about it because it never happens?
Yes, a catchswitch must be the first and last non-phi instruction in the BB. It's BB must be empty. It only exists to multiplex unwind edges from invokes.


Repository:
  rL LLVM

https://reviews.llvm.org/D46482





More information about the llvm-commits mailing list