This is an archive of the discontinued LLVM Phabricator instance.

[clang] Add -fignore-exceptions
ClosedPublic

Authored by jasonliu on Jan 13 2020, 1:40 PM.

Details

Summary

This is trying to implement the functionality proposed in: http://lists.llvm.org/pipermail/cfe-dev/2017-April/053417.html
An exception can throw, but no cleanup is going to happen. A module compiled with exceptions on, can catch the exception throws from module compiled with -fignore-exceptions.

The use cases for enabling this option are:

  1. Performance analysis of EH instrumentation overhead
  2. The ability to QA non EH functionality when EH functionality is not available.
  3. User of EH enabled headers knows the calls won't throw in their program and wants the performance gain from ignoring EH construct.

The implementation tried to accomplish that by removing any landing pad code that might get generated.

Diff Detail

Event Timeline

jasonliu created this revision.Jan 13 2020, 1:40 PM
aaron.ballman accepted this revision.Feb 11 2020, 12:32 AM

Sorry about the delayed review. I think this patch basically LG, thank you!

clang/include/clang/Driver/Options.td
936

construct -> constructs

clang/lib/Driver/ToolChains/Clang.cpp
466

A comment here explaining why enabling this flag doesn't also set EH = false might be helpful.

This revision is now accepted and ready to land.Feb 11 2020, 12:32 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 12 2020, 1:57 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

This review omitted cfe-commits list

Sorry about the delayed review. I think this patch basically LG, thank you!

Thanks Aaron. Addressed your comments in the commits.

This review omitted cfe-commits list

Good catch, I didn't notice that in the review. I think we can address any concerns with post-commit feedback.

This review omitted cfe-commits list

Didn't realized that. Since this is approved and committed, I guess I will keep monitor messages in this review, and address any post-commit comments. I could revert the commit if the comments gets controversial.
Thanks.