This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][fortran] Make cbrt, cexpi and sincos builtins available
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Jerry DeLisle" <jvdelisle at verizon dot net>
- Cc: "Tobias Burnus" <burnus at net-b dot de>, "Richard Guenther" <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org, fortran at gcc dot gnu dot org, "Paolo Bonzini" <paolo dot bonzini at lu dot unisi dot ch>, "Mark Mitchell" <mark at codesourcery dot com>
- Date: Mon, 1 Jan 2007 13:07:28 +0100
- Subject: Re: [PATCH][fortran] Make cbrt, cexpi and sincos builtins available
- References: <Pine.LNX.4.64.0612071953510.3105@zhemvz.fhfr.qr> <4582FCC1.6010706@net-b.de> <45830034.7030704@verizon.net>
On 12/15/06, Jerry DeLisle <jvdelisle@verizon.net> wrote:
Tobias Burnus wrote:
> Let's *ping* for Richard.
>
> with the sincos infrastructure in the middle end (I think all patches
> are now in the trunk), this speeds up the Polyhedron fatigue test a lot:
> ~28.3s => ~18.3s (35% faster).
>
> This can be seen at the page
> http://www.suse.de/~gcctest/c++bench/polyhedron/polyhedron-summary.txt-fatigue-15.png
> of http://www.suse.de/~gcctest/c++bench/polyhedron/
> (The patch was applied for one day.)
>
> Tobias
>
> Richard Guenther schrieb:
>> As $subject says. The cbrt builtins can be used to expand x**1./3. to
>> cbrt, the other two are on-top of the sincos patches.
>>
>> Bootstrap / regtest running.
>>
>> Ok if the sincos patch(es) go in? How can we tell that the target
>> supports sincos? (I guess we would need a configure check for that?)
>>
It was not clear to me the consequences of the question about needing a
configure check. Has that been addressed?
No, it has not been addressed. As far as I see we do not have infrastructure
in place to have tests on the target system in gcc/ because it wouldn't work
if we are cross-compiling. We would need to do a two-stage compile in
the cross-compiling case as well - first build a cross compiler to be able
to compile/link target configure tests and then after those tests rebuild.
So the canonical way of introducing target dependencies in gcc/ is to
augment the gcc/config/ stuff with target macros/hooks dependent on
the target system.
For builtins, the __builtin_* variant is always available even if the target
does not provide a library implementation (see PR29719 for where this
causes a problem).
For the bare variant we only
have a destinction for TARGET_C99_FUNCTIONS - which doesn't help
in the case of sincos, as that is a (common) extension. Also
TARGET_C99_FUNCTIONS is said to be too broad (see PR30181).
So before going down the route adding TARGET_HAS_SINCOS and
maybe lots of TARGET_HAS_C99_XYZ - are there better suggestions on
how to address the problems above?
Thanks,
Richard.