Bug 92584 - A 454.calculix optimization opportunity
Summary: A 454.calculix optimization opportunity
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 10.0
: P3 normal
Target Milestone: ---
Assignee: Richard Biener
URL:
Keywords: missed-optimization
: 92632 (view as bug list)
Depends on:
Blocks: spec
  Show dependency treegraph
 
Reported: 2019-11-19 13:48 UTC by Martin Liška
Modified: 2019-11-25 08:40 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2019-11-20 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liška 2019-11-19 13:48:58 UTC
Richi, I noticed the following graph:
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=8.170.0

I noticed that the speed drop back on the trunk happened since r278281.
Would you be interested in what loop optimization made the difference?
Comment 1 rguenther@suse.de 2019-11-19 14:24:21 UTC
On Tue, 19 Nov 2019, marxin at gcc dot gnu.org wrote:

> I noticed that the speed drop back on the trunk happened since r278281.
> Would you be interested in what loop optimization made the difference?

Well, the revs probably caused changes in (early) unrolling with the
better performance seen with less unrolling.  We know that even more
unrolling will increase performance though.

Not sure what you are asking?
Comment 2 Martin Liška 2019-11-20 08:18:55 UTC
(In reply to rguenther@suse.de from comment #1)
> On Tue, 19 Nov 2019, marxin at gcc dot gnu.org wrote:
> 
> > I noticed that the speed drop back on the trunk happened since r278281.
> > Would you be interested in what loop optimization made the difference?
> 
> Well, the revs probably caused changes in (early) unrolling with the
> better performance seen with less unrolling.  We know that even more
> unrolling will increase performance though.

Ok, so the benchmark likes unrolling :)

> 
> Not sure what you are asking?

My question is simple: Can we somehow tweak our defaults so that we can speed up calculix. Note that the speed up is 2x.
Comment 3 rguenther@suse.de 2019-11-20 08:49:01 UTC
On Wed, 20 Nov 2019, marxin at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92584
> 
> --- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
> (In reply to rguenther@suse.de from comment #1)
> > On Tue, 19 Nov 2019, marxin at gcc dot gnu.org wrote:
> > 
> > > I noticed that the speed drop back on the trunk happened since r278281.
> > > Would you be interested in what loop optimization made the difference?
> > 
> > Well, the revs probably caused changes in (early) unrolling with the
> > better performance seen with less unrolling.  We know that even more
> > unrolling will increase performance though.
> 
> Ok, so the benchmark likes unrolling :)
> 
> > 
> > Not sure what you are asking?
> 
> My question is simple: Can we somehow tweak our defaults so that we can speed
> up calculix. Note that the speed up is 2x.

I've tried multiple times to no avail ... :/  But yeah.  I'll have another
look ;)  It's gfortran.dg/reassoc_4.f btw. IIRC.  See also the
--param adjustment therein ... Honza lowered the param at some point,
regressing things.
Comment 4 Martin Liška 2019-11-20 09:01:04 UTC
> 
> I've tried multiple times to no avail ... :/  But yeah.  I'll have another
> look ;)  It's gfortran.dg/reassoc_4.f btw. IIRC.  See also the
> --param adjustment therein ... Honza lowered the param at some point,
> regressing things.

Hehe, that's good that we have it isolated as a test-case.
Comment 5 Richard Biener 2019-11-20 09:37:21 UTC
(In reply to Martin Liška from comment #4)
> > 
> > I've tried multiple times to no avail ... :/  But yeah.  I'll have another
> > look ;)  It's gfortran.dg/reassoc_4.f btw. IIRC.  See also the
> > --param adjustment therein ... Honza lowered the param at some point,
> > regressing things.
> 
> Hehe, that's good that we have it isolated as a test-case.

Ah, FDO.  Well, the train run is completely different from the ref one so
FDO performance is notoriously bad for calculix.
Comment 6 Martin Liška 2019-11-25 08:40:08 UTC
*** Bug 92632 has been marked as a duplicate of this bug. ***