rsmith added inline comments.
================ Comment at: lib/CodeGen/ItaniumCXXABI.cpp:3878 + } else { + // FIXME: We could filter out definitely-unreachable catch handlers. + EHCatchScope *LaterCatchScope = ---------------- There are a lot of other optimizations possible here. For example: if there are no later catches, and no enclosing EH scopes, we can just `resume` (before the `__cxa_begin_catch`) call. Or if the first such later catch will definitely catch the exception (eg, `catch (int*&) {} catch (int*) {}`), we could branch directly to it. I'm inclined to think we should keep the frontend emission simpler and implement these cases as EHABI-aware middle-end optimization passes if we care enough about them. Repository: rC Clang https://reviews.llvm.org/D42092 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits