This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][RFC]Overloading intrinsics


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]