This is an archive of the discontinued LLVM Phabricator instance.

[FPEnv][Clang][Driver] Use MarshallingInfoFlag for -fexperimental-strict-floating-point
ClosedPublic

Authored by kpn on Oct 7 2020, 10:37 AM.

Details

Summary

As of D80952 we are disabling strict floating point on all hosts except those that are explicitly listed as supported. Use of strict floating point on other hosts requires use of the -fexperimental-strict-floating-point flag. This is to avoid bugs like "https://bugs.llvm.org/show_bug.cgi?id=45329" (which has an incorrect link in the previous review).

In the review for D80952 I was asked to mark the -fexperimental option as a MarshallingInfoFlag. This patch does exactly that.

The previous tests continue to work correctly so I haven't included a new one here. I can if needed, but I would need guidance since I don't know what would need to be tested.

Diff Detail

Event Timeline

kpn created this revision.Oct 7 2020, 10:37 AM
kpn requested review of this revision.Oct 7 2020, 10:37 AM
jansvoboda11 requested changes to this revision.Nov 10 2020, 8:15 AM

Hi Kevin, sorry for the late response.

I don't think adding new tests is necessary as long as the flag is used in existing ones.

clang/include/clang/Driver/Options.td
1311

In D82756, we've replaced the "default value" argument with a list of options that can imply the current flag. If empty or omitted, we set the default value to false automatically. Could you please remove the "false" argument?

This revision now requires changes to proceed.Nov 10 2020, 8:15 AM
kpn added a comment.Nov 11 2020, 9:41 AM

No worries!

The option does already have tests that verify correct operation.

clang/include/clang/Driver/Options.td
1311

Will do.

kpn updated this revision to Diff 304557.Nov 11 2020, 9:44 AM

Update for review comments.

This revision is now accepted and ready to land.Nov 12 2020, 12:40 AM