[PATCH] D80315: Fix CC1 command line options mapping into fast-math flags.

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 29 18:02:39 PDT 2020


rjmccall added a comment.

Per a private discussion, it seems like the right thing to do here would be stop recognizing `-ffast-math` flag in cc1 and just put the driver in charge of all these individual flags.  That may necessitate adding a `-fdefine-fast-math` cc1 option to control the `#define`, but the logic for that seems complex enough that it ought to be left to the driver.

Separately, we should consider making some more driver options imply `-ffp-contract=fast`.  Fast contraction is the default behavior in GCC, and while Clang has chosen not to follow that precedent, it seems to be in keeping with the spirit of options like `-funsafe-math-optimizations` that they should broadly enable contraction if that policy isn't otherwise specified.

Those sorts of changes should be kept separate from this kind of refactor, though.  This is still approved.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80315/new/

https://reviews.llvm.org/D80315





More information about the cfe-commits mailing list