This is an archive of the discontinued LLVM Phabricator instance.

Update clang to use the updated LLVM EH instructions
ClosedPublic

Authored by majnemer on Dec 1 2015, 11:29 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

majnemer updated this revision to Diff 41592.Dec 1 2015, 11:29 PM
majnemer retitled this revision from to Update clang to use the updated LLVM EH instructions.
majnemer updated this object.
majnemer added a reviewer: rnk.
majnemer added a subscriber: cfe-commits.
majnemer updated this revision to Diff 41716.Dec 2 2015, 9:43 PM
  • Updated for the latest EH changes
majnemer updated this revision to Diff 41781.Dec 3 2015, 10:54 AM
  • Updated for LLVM changes
rnk added inline comments.Dec 11 2015, 11:07 AM
lib/CodeGen/CGCall.cpp
3482 ↗(On Diff #41781)

I guess we have a cleaner way of writing this:

EHPersonality::get(*this).isMSVCXXPersonality()
lib/CodeGen/CGException.cpp
899 ↗(On Diff #41781)

This creates one extra basic block per catch handler. Why not insert the catchpadinst directly into Handler.Block, emit Handler.Block, and add Handler.Block to the switch?

If this disturbs the test cases too much, then we can punt on it for now.

910 ↗(On Diff #41781)

If we go with the suggestion above, we don't need this Br.

lib/CodeGen/MicrosoftCXXABI.cpp
896–897 ↗(On Diff #41781)

If we emit the catchpadinst into Handler.Block, we can drop the 'getSinglePredecessor' call.

majnemer updated this revision to Diff 42618.Dec 11 2015, 7:05 PM
  • Updated for the latest EH changes
  • Updated for LLVM changes
  • Address review comments
This revision was automatically updated to reflect the committed changes.