[PATCH] D45857: [ObjCARC] Account for funclet token in storeStrong transform

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 20 11:25:01 PDT 2018


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

lgtm

I'm unhappy with the need for instrumentation passes to "color" their inserted call instructions. It's a real drag. What we really want here are single-entry, multi-exit regions. If you ignore `unreachable`, then funclets are already single-entry, single-exit regions. Unfortunately, unreachable is very very common, because it comes after `throw`, which always calls a noreturn function. So this is common:

  try { may_throw(); } catch (...) { do_something(); throw; /*unreachable*/ }
  try { may_throw(); } catch (...) { do_something(); throw; /*unreachable*/ }

We needed to prevent simplifycfg from tail merging the two otherwise identical catch funclets that don't end in catchret.

If we could require instead that those `unreachable` instructions refer to their parent funclet, we'd be made in the shade. WinEHPrepare wouldn't have to do BB cloning anymore.

Throw it on the TODO list, I guess.


Repository:
  rL LLVM

https://reviews.llvm.org/D45857





More information about the llvm-commits mailing list