Page MenuHomePhabricator

EH: Prune unreachable resume instructions during Dwarf EH preparation

Authored by rnk on Feb 18 2015, 5:38 PM.



Today a simple function that only catches exceptions and doesn't run
destructor cleanups ends up containing a dead call to _Unwind_Resume
(PR20300). We can't remove these dead resume instructions during normal
optimization because inlining might introduce additional landingpads
that do have cleanups to run. Instead we can do this during EH
preparation, which is guaranteed to run after inlining.

Fixes PR20300.

Diff Detail


Event Timeline

rnk updated this revision to Diff 20244.Feb 18 2015, 5:38 PM
rnk retitled this revision from to EH: Prune unreachable resume instructions during Dwarf EH preparation.
rnk updated this object.
rnk added a reviewer: majnemer.
rnk added a subscriber: Unknown Object (MLST).

+mseaborn, since he filed it

majnemer accepted this revision.Feb 19 2015, 4:46 PM
majnemer edited edge metadata.


76–77 ↗(On Diff #20244)

Please sort these appropriately.

This revision is now accepted and ready to land.Feb 19 2015, 4:46 PM
This revision was automatically updated to reflect the committed changes.