Thanks a lot for working on this. There's a lot of room to improve the performance of exceptions that nobody has done for C++ yet. I've added some reviewers that I'm aware are familiar with the area or that I've talked with about this before.
This is a bit concerning. I would much rather either the headers add an attribute saying what they are, or that clang detects what they are and adds an attribute. I don't like llvm interpreting function names.
My apologies for dumping this patch which is very very rough WIP.
I mostly to give a feel of how these optimization might look for those interested.
I hope those who choose to look at it closely would not do more than a cursory look. I intend to do more much more work on it before submitting for real review :-).
Yes. I am wondering what is the way of tackling the platform/lib specific naming. One approach to take is to add them to TargetLibraryInfo analysis.
On the other hand. Large number of these optimizations are C++ specific, therefore I am not sure if adding them to TLI make sense.
Possibly a dedicated C++EH helper class that collects and maintains the resolved names for all interesting functions related to C++ EH optimizations across platform / stdlib combinations.