This is an archive of the discontinued LLVM Phabricator instance.

[WinEH] Fix problem with mapping handler blocks when multiple clauses share a handler implementation.
ClosedPublic

Authored by andrew.w.kaylor on Apr 20 2015, 1:53 PM.

Details

Summary

This addresses a failure which could occur when optimized IR eliminated handler-specific blocks and created a single shared handler representation. The IR unconditionally flows into a handler block even when a selector dispatch would normally be expected. I believe this can only happen if the landing pad has a catch-all handler and the handlers for prior clauses are identical to the catch-all implementation with no intervening clean-up.

My proposed solution effectively eliminates the type-specific catch handlers from the final IR produced, but I think this is good because the resulting code will be more compact yet functionally equivalent.

Diff Detail

Repository
rL LLVM

Event Timeline

andrew.w.kaylor retitled this revision from to [WinEH] Fix problem with mapping handler blocks when multiple clauses share a handler implementation..
andrew.w.kaylor updated this object.
andrew.w.kaylor edited the test plan for this revision. (Show Details)
andrew.w.kaylor added reviewers: majnemer, rnk.
andrew.w.kaylor set the repository for this revision to rL LLVM.
andrew.w.kaylor added a subscriber: Unknown Object (MLST).
rnk accepted this revision.Apr 20 2015, 2:43 PM
rnk edited edge metadata.

lgtm

This revision is now accepted and ready to land.Apr 20 2015, 2:43 PM
This revision was automatically updated to reflect the committed changes.