[cfe-commits] [PATCH] Add -fexcess-precision option.

Chandler Carruth chandlerc at google.com
Thu Jun 21 00:27:15 PDT 2012


On Wed, Jun 20, 2012 at 11:43 PM, Lang Hames <lhames at gmail.com> wrote:

> Hi All,
>
> This patch adds support for gcc's -fexcess-precision flag to clang. I'm
> new to clang's option handling. Could somebody please sanity check it for
> me?
>

A high level point:

The flag semantics '-fexcess-precision' (as spec'ed for GCC) don't seem to
map clearly onto this use case, especially as John argued so effectively in
the previous email thread. I feel like this flag should remain very
specifically attached to FP operations with more bits, but none of
the asymmetrical properties of FMAs, so that there is no confusion between
Clang's semantics and GCC's.

I'd suggest a new flag without any baggage, and one that perhaps ties more
closely into the idea of contracted expressions, or some other concept
intrinsic to fusing operations. Maybe
'-fcontract-expressions={fast,standard,strict}'? Dunno. Naming things is
hard.


Anyways, details about the patch:

- You should integrate the forwarding of this with the -ffast-math section
more fully -- -ffast-math and maybe some other flags should synthesize the
'fast' variation.

- You need to handle serializing this flag in the frontend.

- Maybe add a help section to the flag?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120621/0266df80/attachment.html>


More information about the cfe-commits mailing list