This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Compilation flags in libgfortran
- From: Igor Zamyatin <izamyatin at gmail dot com>
- To: Janne Blomqvist <blomqvist dot janne at gmail dot com>
- Cc: gcc mailing list <gcc at gcc dot gnu dot org>, Yuri Rumyantsev <ysrumyan at gmail dot com>, Fortran List <fortran at gcc dot gnu dot org>
- Date: Wed, 16 Oct 2013 13:20:20 +0400
- Subject: Re: Compilation flags in libgfortran
- Authentication-results: sourceware.org; auth=none
- References: <CAKdSQZk4gBwLOXPNL+Z+Nc8476S0acuFMKYS3QLG=hkzzLCqbQ at mail dot gmail dot com> <CAO9iq9FutEU=PCABsjEBVFX4Hj3V76+DDwbOt8TMuFmzOyQwiQ at mail dot gmail dot com>
Thanks a lot for the explanation!
I can take care of the benchmarking but only on Intel hardware... Do
you think that possble changes according those results would be
acceptable?
Thanks,
Igor
On Tue, Oct 15, 2013 at 11:46 PM, Janne Blomqvist
<blomqvist.janne@gmail.com> wrote:
> On Tue, Oct 15, 2013 at 4:58 PM, Igor Zamyatin <izamyatin@gmail.com> wrote:
>> Hi All!
>>
>> Is there any particular reason that matmul* modules from libgfortran
>> are compiled with -O2 -ftree-vectorize?
>
> Yes, testing showed that it improved performance compared to the
> default options. See the thread starting at
>
> http://gcc.gnu.org/ml/fortran/2005-11/msg00366.html
>
> In the almost 8 years (!!) since the patch was merged, I believe the
> importance of vectorization for utilizing current processors has only
> increased.
>
> [snip]
>
>> Why not just use O3 for those modules?
>
> Back when the change was made, -ftree-vectorize wasn't enabled by -O3.
> IIRC I did some tests, and -O3 didn't really improve things beyond
> what "-O2 -funroll-loops -ftree-vectorize" already did. That was a
> while ago however, so if somebody (*wink*) would care to redo the
> benchmarks things might look different with today's GCC on today's
> hardware.
>
> Hope this helps,
>
> --
> Janne Blomqvist