[cfe-commits] [PATCH 3/3] Make fp-contract=fast default for Freescale vendor

Lang Hames lhames at gmail.com
Sun Sep 23 14:22:40 PDT 2012


Hi All,

My reading of C99 TC3, 6.5.8 is that setting FP_CONTRACT to OFF should
disallow all contractions. When -ffp-contract=fast the FP_CONTRACT setting
is ignored, so that would break with the spec (usual caveat, howover: I'm
not a language lawyer, so take this with a grain of salt). As for breaking
with the spec by default for a particular target - I suspect there's
precedent for it, and it doesn't especially bother me as long as it won't
surprise clients too badly.

I've just started looking at frontend support for FP_CONTRACT again. If
it's as easy as I'm hoping it'll be in shortly (within the week). If it
turns out to be more difficult I'll put the call out for assistance. Either
way you'll hear from me on this soon.

- Lang.

On Tue, Sep 18, 2012 at 2:53 PM, Hal Finkel <hfinkel at anl.gov> wrote:

> Lang, et al.,
>
> Do you (or anyone else) have an opinion on this? Do we want to
> introduce vendor-specific defaults for this? Should we wait until
> contraction is fully implemented in clang and let them test the
> differential performance (and what's the status on that)?
>
> Thanks again,
> Hal
>
> On Fri, 31 Aug 2012 15:34:26 +0200
> Tobias von Koch <tobias.von.koch at gmail.com> wrote:
>
> > New patch with test case attached.
> >
> > Thanks again,
> > Tobias
> >
> > On 28/08/2012 20:00, Hal Finkel wrote:
> > > Tobias,
> > >
> > > This also requires a test case.
> > >
> > >   -Hal
> > >
> > > On Tue, 28 Aug 2012 18:54:18 +0200
> > > Tobias von Koch <tobias.von.koch at gmail.com> wrote:
> > >
> > >> Dear all,
> > >>
> > >> This is part of a sequence of three (trivial) patches to allow
> > >> Clang to be used as a drop-in replacement for GCC with the
> > >> Freescale SDK. Support for Freescale processors has just been
> > >> added to the PowerPC backend.
> > >>
> > >> Please review and commit if this is OK - I don't have commit
> > >> access.
> > >>
> > >> Thanks!
> > >> Tobias
> > >>
> > >> Description of patch:
> > >>
> > >> If vendor==Freescale, set fp-contract=fast unless specified
> > >> otherwise. This is the default in GCC on Freescale targets.
> > >>
> > >
> > >
> > >
> >
>
>
>
> --
> Hal Finkel
> Postdoctoral Appointee
> Leadership Computing Facility
> Argonne National Laboratory
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120923/b555d078/attachment.html>


More information about the cfe-commits mailing list