public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/64425] New: [5 Regression] r219076 causes 36% tramp3d slowdown
@ 2014-12-28 9:30 trippels at gcc dot gnu.org
2014-12-28 9:38 ` [Bug ipa/64425] " trippels at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-12-28 9:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64425
Bug ID: 64425
Summary: [5 Regression] r219076 causes 36% tramp3d slowdown
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ipa
Assignee: unassigned at gcc dot gnu.org
Reporter: trippels at gcc dot gnu.org
CC: hubicka at gcc dot gnu.org
Seen on ppc64. Before r219076:
% g++ -Ofast -w tramp3d-v4.cpp
% ./a.out --cartvis 1.0 0.0 --rhomin 1e-8 -n 20
Time spent in iteration: 2.40742
After r219076:
% g++ -Ofast -w tramp3d-v4.cpp
% ./a.out --cartvis 1.0 0.0 --rhomin 1e-8 -n 20
Time spent in iteration: 3.77864
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ipa/64425] [5 Regression] r219076 causes 36% tramp3d slowdown
2014-12-28 9:30 [Bug ipa/64425] New: [5 Regression] r219076 causes 36% tramp3d slowdown trippels at gcc dot gnu.org
@ 2014-12-28 9:38 ` trippels at gcc dot gnu.org
2014-12-28 19:02 ` hjl.tools at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-12-28 9:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64425
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
On my x86_64 machine it's worse: 2.93392 vs. 5.84974.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ipa/64425] [5 Regression] r219076 causes 36% tramp3d slowdown
2014-12-28 9:30 [Bug ipa/64425] New: [5 Regression] r219076 causes 36% tramp3d slowdown trippels at gcc dot gnu.org
2014-12-28 9:38 ` [Bug ipa/64425] " trippels at gcc dot gnu.org
@ 2014-12-28 19:02 ` hjl.tools at gmail dot com
2015-01-04 16:37 ` hubicka at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2014-12-28 19:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64425
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hjl.tools at gmail dot com
Target Milestone|--- |5.0
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
There is also a correctness issue. On Linux/x32, r219076 caused:
FAIL: 23_containers/unordered_set/insert/hash_policy.cc execution test
FAIL: 23_containers/unordered_set/max_load_factor/robustness.cc execution test
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ipa/64425] [5 Regression] r219076 causes 36% tramp3d slowdown
2014-12-28 9:30 [Bug ipa/64425] New: [5 Regression] r219076 causes 36% tramp3d slowdown trippels at gcc dot gnu.org
2014-12-28 9:38 ` [Bug ipa/64425] " trippels at gcc dot gnu.org
2014-12-28 19:02 ` hjl.tools at gmail dot com
@ 2015-01-04 16:37 ` hubicka at gcc dot gnu.org
2015-01-04 16:51 ` trippels at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-01-04 16:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64425
--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Yep, I looked into this before comitting the patch. I have tracked it down to
inlining of function UniformRectilinearMesh<MeshTraits<3, double,
UniformRectilinearTag, CartesianTag, 3> >::cellPosition(Loc<3> const&) const:
inline PointType_t cellPosition(const Loc_t &loc) const
{
PointType_t point;
for (int i=0; i<dimensions; i++)
point(i) = origin()(i) + spacings()(i)
* (loc[i].first() - physicalCellDomain()[i].first() + 0.5);
return point;
}
this function is somewhat evil: dimensons is a small compile time constant and
the loop unrolls completely into quite simple code. This is however not done
prior inlining. Inliner thus think that the function is 168 instructions and
the speedup for inlining accounts only removing some of this-> references,
overall 9%.
As an effect of various roundoff errors being eliminated by the sreal code, the
functions sinks down in the priority queue quite a bit bellow the
inline-unit-growth cutoff. There seems to be no issues with priority
calculation, just the functions looks bit uncool for inlining and got lucky in
the old model (that was for years tested on tramp3d)
The patch I sent for simplification of priority queue solves the failure:
https://gcc.gnu.org/ml/gcc-patches/2015-01/msg00004.html
The patch seem win in general on benchmarks I tested (it is big win for tramp3d
so I can reduce unit growth to 15%) I however would like first the testers to
get restarted after vacations and there is one regression I want to analyze
first in my testing.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ipa/64425] [5 Regression] r219076 causes 36% tramp3d slowdown
2014-12-28 9:30 [Bug ipa/64425] New: [5 Regression] r219076 causes 36% tramp3d slowdown trippels at gcc dot gnu.org
` (2 preceding siblings ...)
2015-01-04 16:37 ` hubicka at gcc dot gnu.org
@ 2015-01-04 16:51 ` trippels at gcc dot gnu.org
2015-01-12 9:28 ` hubicka at gcc dot gnu.org
2015-01-12 10:18 ` trippels at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-01-04 16:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64425
--- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
I've tested the patch, too.
There were two issues.
1) on ppc64:
(after training)
trippels@gcc2-power8 ~ % ~/gcc_test/usr/local/bin/g++ -Ofast -fprofile-use -w
tramp3d-v4.cpp
tramp3d-v4.cpp:64206:1: internal compiler error: in edge_badness, at
ipa-inline.c:1030
}
^
0x110330ff edge_badness
../../gcc/gcc/ipa-inline.c:1030
0x11039083 update_edge_key
../../gcc/gcc/ipa-inline.c:1059
0x11039083 inline_small_functions
../../gcc/gcc/ipa-inline.c:1634
0x1103b0af ipa_inline
../../gcc/gcc/ipa-inline.c:2175
0x1103b0af execute
../../gcc/gcc/ipa-inline.c:2548
Please submit a full bug report,
with preprocessed source if appropriate.
2) Firefox PGO/LTO build on x86_64 segfaults on start.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ipa/64425] [5 Regression] r219076 causes 36% tramp3d slowdown
2014-12-28 9:30 [Bug ipa/64425] New: [5 Regression] r219076 causes 36% tramp3d slowdown trippels at gcc dot gnu.org
` (3 preceding siblings ...)
2015-01-04 16:51 ` trippels at gcc dot gnu.org
@ 2015-01-12 9:28 ` hubicka at gcc dot gnu.org
2015-01-12 10:18 ` trippels at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-01-12 9:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64425
--- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Author: hubicka
Date: Mon Jan 12 09:28:15 2015
New Revision: 219452
URL: https://gcc.gnu.org/viewcvs?rev=219452&root=gcc&view=rev
Log:
PR ipa/63967
PR ipa/64425
* ipa-inline.c (compute_uninlined_call_time,
compute_inlined_call_time): Use counts for extra precision when
needed possible.
(big_speedup_p): Fix formating.
(RELATIVE_TIME_BENEFIT_RANGE): Remove.
(relative_time_benefit): Remove.
(edge_badness): Turn DECL_DISREGARD_INLINE_LIMITS into hint;
merge guessed and read profile paths.
(inline_small_functions): Count only !optimize_size functions into
initial size; be more lax about sanity check when profile is used;
be sure to update inlined function profile when profile is read.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-inline.c
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ipa/64425] [5 Regression] r219076 causes 36% tramp3d slowdown
2014-12-28 9:30 [Bug ipa/64425] New: [5 Regression] r219076 causes 36% tramp3d slowdown trippels at gcc dot gnu.org
` (4 preceding siblings ...)
2015-01-12 9:28 ` hubicka at gcc dot gnu.org
@ 2015-01-12 10:18 ` trippels at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-01-12 10:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64425
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Fixed. Thanks. Even -flto is fine now.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-01-12 10:18 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-28 9:30 [Bug ipa/64425] New: [5 Regression] r219076 causes 36% tramp3d slowdown trippels at gcc dot gnu.org
2014-12-28 9:38 ` [Bug ipa/64425] " trippels at gcc dot gnu.org
2014-12-28 19:02 ` hjl.tools at gmail dot com
2015-01-04 16:37 ` hubicka at gcc dot gnu.org
2015-01-04 16:51 ` trippels at gcc dot gnu.org
2015-01-12 9:28 ` hubicka at gcc dot gnu.org
2015-01-12 10:18 ` trippels at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).