This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/82567] [6/7/8] gfortran takes a long time to compile a simple implied-do with -Optimization.
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 17 Oct 2017 09:41:38 +0000
- Subject: [Bug fortran/82567] [6/7/8] gfortran takes a long time to compile a simple implied-do with -Optimization.
- Auto-submitted: auto-generated
- References: <bug-82567-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82567
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Component|middle-end |fortran
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
This is value-numbering running into --param sccvn-max-alias-queries-per-access
(default 1000). If you shrink this value compile-time gets faster if you
increase it it gets slower.
And yes, this is because value-numbering of the memory state of the function
is quadratic in the number of stores and loads.
The FE should apply some more sensible cost model when deciding to "unroll"
the array operation. In this case it's code-size prohibitive.
The middle-end behaves as designed (limiting itself with respect to
compile-time).