Page MenuHomePhabricator

[FPEnv Core 01/14] Add flags and command-line switches for FPEnv

Authored by sdmitrouk on Oct 26 2015, 6:55 AM.



This patch open first set of patches aimed to add better support of floating-point environment to LLVM. Its previous version is present on llvm-commits, uploading the new one here as amount of changes reached about 4K lines (mostly additions) as reported by git. The 14th patch is the biggest one, but it's quite consistent and there is already too many patches in this set.

  • Two flags for TargetOptions.
  • Three command-line switches to enable flags separately or at the same time.

Diff Detail


Event Timeline

sdmitrouk updated this revision to Diff 38397.Oct 26 2015, 6:55 AM
sdmitrouk retitled this revision from to [FPEnv Core 01/14] Add flags and command-line switches for FPEnv.
sdmitrouk updated this object.
sdmitrouk added reviewers: hfinkel, mehdi_amini.
sdmitrouk set the repository for this revision to rL LLVM.
sdmitrouk added subscribers: llvm-commits, resistor, scanon.
scanon added inline comments.Oct 26 2015, 8:06 AM

Maybe "fenv-access" instead of "fpenv-access" to mirror the pragma spelling? I think the description could be improved somewhat. Perhaps "Disable optimizations that assume the default floating-point environment or might change observable floating-point exceptions."


I believe that you really want to say "disable optimizations that assume default floating-point rounding", rather than "optimizations that affect FP rounding" (the latter sounds like it licenses re-association, which I don't think you want).

More generally, this should probably include other non-default settings in the floating-point environment (DAZ, FTZ, default nan bits, etc). From a machine model perspective, the two settings are to "FP exceptions may be observed" and "FP control may be non-default". How about something like:

"Disable optimizations that assume the default floating-point environment, including rounding-mode"

sdmitrouk updated this revision to Diff 41906.Dec 4 2015, 11:56 AM

Updated text of comments.

mehdi_amini added inline comments.Dec 4 2015, 12:11 PM


mehdi_amini edited edge metadata.Dec 4 2015, 12:11 PM

LGTM, Steve?

scanon accepted this revision.Dec 4 2015, 12:12 PM
scanon added a reviewer: scanon.


This revision is now accepted and ready to land.Dec 4 2015, 12:12 PM

Looks like patch was not committed. Same may be true for subsequent patches.

mehdi_amini closed this revision.Sep 26 2016, 5:18 PM

Yes this approach is unfortunately abandoned. We should close all this rev.