This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [PATCH][RFC]Overloading intrinsics
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- Cc: Martin Liška <mliska at suse dot cz>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- Date: Wed, 31 Oct 2018 10:43:48 +0100
- Subject: Re: [PATCH][RFC]Overloading intrinsics
- References: <d749cd46-e231-1405-5713-ae7d966ff8c1@suse.cz> <CAO9iq9FR2jWY=fS7t=gKg9VAntxmMDy-YGLCCL4B+vgOie-Bzg@mail.gmail.com>
On Wed, Oct 31, 2018 at 9:29 AM Janne Blomqvist
<blomqvist.janne@gmail.com> wrote:
>
> On Mon, Oct 29, 2018 at 3:49 PM Martin Liška <mliska@suse.cz> wrote:
>>
>> Hi.
>>
>> Unlike the C and C++ front-ends, GNU Fortran does not know about
>> vector implementations of math routines provided by GLIBC. This
>> prevents vectorization of many loops which is a frequent cause of
>> performance that is worse than compilers with their own math library
>> such as ICC.
>>
>> The purpose of the patch is to provide a mechanism that will tell Fotran FE
>> which intrinsics have simd cloned in math library.
>>
>> I've been cooperating with Paul and we came to a proof-of-concept that consists
>> of 2 parts (patches):
>>
>> The first patch adds support for inclusion a module via
>> command line. The module will be provided by glibc in order to synchronize which functions
>> are provided by a glibc version. Paul is suggesting to maybe include that into load machinery
>> of IEEE module.
>
>
> Would this module be provided by glibc in source form, and included, or would glibc provide a .mod file?
I think glibc will provide the module in source form and it's build
machinery or distributors build machinery
will likely build a .mod file. An alternative variant would be to
provide the GCC build with a path to the
module source and build that into a GCC specific path (like where the
omp module sits).
> The problem is that the gfortran module format tends to change for every release, so the glibc provided module would then only be compatible with the version glibc was compiled with. I think we should try to avoid such a situation.
Yes, of course.
> Also, I suppose it would also be possible to use this same mechanism to provide a similar module for svml, or other vector math libs? If not shipped as part of gcc, or said math library, maybe as a separate 3rd party project?
I'm not sure that would work unless they provide the functions with
"standard" mangling for OpenMP SIMD.
If they do then yes.
Richard.
> --
> Janne Blomqvist