This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Support setting default fused FP contract via CMake
ClosedPublic

Authored by phosek on Aug 5 2021, 11:50 AM.

Details

Summary

D74436 changed the default fused FP contract which broke several
projects and it may take a while to address those issues. This
change allows setting the default fused FP contract via CMake, so
vendors can change their defaults rather than having to include the
-ffp-contract=off flag in every project to revert to the previous
behavior while the issues that were uncovered by D74436 are being
addressed.

Diff Detail

Event Timeline

phosek created this revision.Aug 5 2021, 11:50 AM
phosek requested review of this revision.Aug 5 2021, 11:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 5 2021, 11:50 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
haowei accepted this revision.Aug 5 2021, 1:02 PM
This revision is now accepted and ready to land.Aug 5 2021, 1:02 PM
hans added a comment.Sep 1 2021, 6:19 AM

I just got back from vacation, so am probably missing some of the discussion elsewhere, but I'm a bit skeptical of this patch. It seems it would be confusing for users if clang generates code with different floating-point behaviour depending on how it was built.

rjmccall closed this revision.Sep 1 2021, 4:03 PM

I agree. This isn't the right approach. The patch in question is currently reverted; if you'd like to argue to not restore it, that conversation should be part of that review.