This is an archive of the discontinued LLVM Phabricator instance.

[WinEH] Implement state numbering for CoreCLR
ClosedPublic

Authored by JosephTremoulet on Oct 5 2015, 2:12 PM.

Details

Summary

Assign one state number per handler/funclet, tracking parent state,
handler type, and catch type token.
State numbers are arranged such that ancestors have lower state numbers
than their descendants.

Diff Detail

Event Timeline

JosephTremoulet retitled this revision from to [WinEH] Implement state numbering for CoreCLR.
JosephTremoulet updated this object.
JosephTremoulet added a subscriber: llvm-commits.
rnk accepted this revision.Oct 6 2015, 11:34 AM
rnk edited edge metadata.

lgtm

include/llvm/CodeGen/WinEHFuncInfo.h
164

I wasn't aware of fault handlers, but they seem like a great idea. At CppCon, Andrei Alexandrescu presented a way to get them in C++ with destructors, lambdas, and macros, but it's pretty not as clean or efficient as just having language support.

lib/CodeGen/WinEHPrepare.cpp
2915

Maybe this?

if (FuncInfo.EHPadStateMap.count(Pad))
  continue;
This revision is now accepted and ready to land.Oct 6 2015, 11:34 AM
JosephTremoulet edited edge metadata.
  • rebase
  • fix a style issue per Reid's comment
JosephTremoulet marked an inline comment as done.Oct 6 2015, 1:23 PM
JosephTremoulet added inline comments.
lib/CodeGen/WinEHPrepare.cpp
2915

Sure; changed.

JosephTremoulet marked an inline comment as done.