* [Bug tree-optimization/57218] [4.8/4.9 Regression] Excessive inlining even at -Os
2013-05-08 18:24 [Bug tree-optimization/57218] New: Excessive inlining even at -Os amylaar at gcc dot gnu.org
@ 2013-05-10 8:49 ` rguenth at gcc dot gnu.org
2013-05-10 10:49 ` hubicka at gcc dot gnu.org
` (14 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-05-10 8:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57218
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-05-10
CC| |hubicka at gcc dot gnu.org
Target Milestone|--- |4.8.1
Summary|Excessive inlining even at |[4.8/4.9 Regression]
|-Os |Excessive inlining even at
| |-Os
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.
Deciding on inlining of small functions. Starting with size 47.
Enqueueing calls of std.isra.0/8.
Estimating body: std.isra.0/8
Known to be false: not inlined, op1 changed, op2 changed
size:11 time:20
Estimating body: std.isra.0/8
Known to be false: not inlined, op1 changed, op2 changed
size:11 time:20
Estimating body: std.isra.0/8
Known to be false: not inlined, op1 changed, op2 changed
size:11 time:20
enqueuing call __sinit/1 -> std.isra.0/8, badness -36092160
enqueuing call __sinit/1 -> std.isra.0/8, badness -36092160
enqueuing call __sinit/1 -> std.isra.0/8, badness -36092160
Enqueueing calls of __sinit/1.
Estimating body: std.isra.0/8
Known to be false: not inlined, op1 changed, op2 changed
size:11 time:20
Considering std.isra.0 with 21 size
to be inlined into __sinit in newlib/libc/stdio/findfp.c:79
Estimated growth after inlined into all is +0 insns.
Estimated badness is -36092160, frequency 0.39.
Badness calculation for __sinit/1 -> std.isra.0/8
size growth 7, time 20 big_speedup
-36092160: guessed profile. frequency 0.389000, benefit 23.529411%, time
w/o inlining 34, time w inlining 26 overall growth 0 (current) 0 (original)
Accounting size:7.00, time:2.72 on predicate:(op0[ref offset:
640] == 0)
Processing frequency std.isra.0
Called by __sinit that is normal or hot
Inlined into __sinit which now has time 26 and size 33,net change of +7.
So the reason is that it can eliminate the body of 'std' after inlining
it three times and it computes that the cost of doing that (3 * 7 is
the same as the cost of the offline body).
And that's because
ptr_1(D)->_p = 0B;
freq:1.00 size: 1 time: 1
50% will be eliminated by inlining
Accounting size:0.50, time:0.50 on predicate:(not inlined)
Accounting size:0.50, time:0.50 on predicate:(true)
ptr_1(D)->_r = 0;
freq:1.00 size: 1 time: 1
50% will be eliminated by inlining
Accounting size:0.50, time:0.50 on predicate:(not inlined)
Accounting size:0.50, time:0.50 on predicate:(true)
...
the inliner thinks that it is likely that initializations via parameters
are eliminated by inlining:
Inline summary for std.isra.0/8 inlinable
self time: 29
global time: 0
self size: 21
global size: 0
self stack: 0
global stack: 0
size:7.000000, time:7.000000, predicate:(true)
size:10.000000, time:9.000000, predicate:(not inlined)
calls:
memset/3 function body not available
loop depth: 0 freq:1000 size: 4 time: 13 callee size: 0 stack: 0
op1 is compile time invariant
op2 is compile time invariant
not sure why we have that (not inlined) predicate size stuff but use
'self size' when accounting against inlining multiple times.
The above seems to suggest that GCC will _always_ inline a function
with just initializers twice when the body can be eliminated then.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/57218] [4.8/4.9 Regression] Excessive inlining even at -Os
2013-05-08 18:24 [Bug tree-optimization/57218] New: Excessive inlining even at -Os amylaar at gcc dot gnu.org
2013-05-10 8:49 ` [Bug tree-optimization/57218] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
@ 2013-05-10 10:49 ` hubicka at gcc dot gnu.org
2013-05-31 10:59 ` jakub at gcc dot gnu.org
` (13 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-05-10 10:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57218
--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Yep, it is just heuristic here. We may get more cureful at -Os (i.e. not so
optimistic about the optimization oppurtunities), but last time I played with
this it actually resulted in code size increase at Mozilla and -Os.
LLVM is doing kind of oposite heuristic tracking when function gets address of
local variable as a parameter and anticipate SRA then. I suppose I can give
this a try even though it will miss all the optimization of dynamically
allocated objects...
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/57218] [4.8/4.9 Regression] Excessive inlining even at -Os
2013-05-08 18:24 [Bug tree-optimization/57218] New: Excessive inlining even at -Os amylaar at gcc dot gnu.org
2013-05-10 8:49 ` [Bug tree-optimization/57218] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
2013-05-10 10:49 ` hubicka at gcc dot gnu.org
@ 2013-05-31 10:59 ` jakub at gcc dot gnu.org
2013-10-16 9:49 ` jakub at gcc dot gnu.org
` (12 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-05-31 10:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57218
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.8.1 |4.8.2
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.1 has been released.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/57218] [4.8/4.9 Regression] Excessive inlining even at -Os
2013-05-08 18:24 [Bug tree-optimization/57218] New: Excessive inlining even at -Os amylaar at gcc dot gnu.org
` (2 preceding siblings ...)
2013-05-31 10:59 ` jakub at gcc dot gnu.org
@ 2013-10-16 9:49 ` jakub at gcc dot gnu.org
2013-10-30 12:19 ` rguenth at gcc dot gnu.org
` (11 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-10-16 9:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57218
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.8.2 |4.8.3
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.2 has been released.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/57218] [4.8/4.9 Regression] Excessive inlining even at -Os
2013-05-08 18:24 [Bug tree-optimization/57218] New: Excessive inlining even at -Os amylaar at gcc dot gnu.org
` (3 preceding siblings ...)
2013-10-16 9:49 ` jakub at gcc dot gnu.org
@ 2013-10-30 12:19 ` rguenth at gcc dot gnu.org
2014-05-22 9:04 ` [Bug tree-optimization/57218] [4.8/4.9/4.10 " rguenth at gcc dot gnu.org
` (10 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-10-30 12:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57218
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/57218] [4.8/4.9/4.10 Regression] Excessive inlining even at -Os
2013-05-08 18:24 [Bug tree-optimization/57218] New: Excessive inlining even at -Os amylaar at gcc dot gnu.org
` (4 preceding siblings ...)
2013-10-30 12:19 ` rguenth at gcc dot gnu.org
@ 2014-05-22 9:04 ` rguenth at gcc dot gnu.org
2014-12-19 13:28 ` [Bug tree-optimization/57218] [4.8/4.9/5 " jakub at gcc dot gnu.org
` (9 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-05-22 9:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57218
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.8.3 |4.8.4
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 4.8.3 is being released, adjusting target milestone.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/57218] [4.8/4.9/5 Regression] Excessive inlining even at -Os
2013-05-08 18:24 [Bug tree-optimization/57218] New: Excessive inlining even at -Os amylaar at gcc dot gnu.org
` (5 preceding siblings ...)
2014-05-22 9:04 ` [Bug tree-optimization/57218] [4.8/4.9/4.10 " rguenth at gcc dot gnu.org
@ 2014-12-19 13:28 ` jakub at gcc dot gnu.org
2015-06-23 8:20 ` [Bug tree-optimization/57218] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
` (8 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-19 13:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57218
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.8.4 |4.8.5
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.4 has been released.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/57218] [4.8/4.9/5/6 Regression] Excessive inlining even at -Os
2013-05-08 18:24 [Bug tree-optimization/57218] New: Excessive inlining even at -Os amylaar at gcc dot gnu.org
` (6 preceding siblings ...)
2014-12-19 13:28 ` [Bug tree-optimization/57218] [4.8/4.9/5 " jakub at gcc dot gnu.org
@ 2015-06-23 8:20 ` rguenth at gcc dot gnu.org
2015-06-26 19:57 ` [Bug tree-optimization/57218] [4.9/5/6 " jakub at gcc dot gnu.org
` (7 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-23 8:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57218
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.8.5 |4.9.3
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
The gcc-4_8-branch is being closed, re-targeting regressions to 4.9.3.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/57218] [4.9/5/6 Regression] Excessive inlining even at -Os
2013-05-08 18:24 [Bug tree-optimization/57218] New: Excessive inlining even at -Os amylaar at gcc dot gnu.org
` (7 preceding siblings ...)
2015-06-23 8:20 ` [Bug tree-optimization/57218] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
@ 2015-06-26 19:57 ` jakub at gcc dot gnu.org
2015-06-26 20:27 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 19:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57218
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.3 has been released.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/57218] [4.9/5/6 Regression] Excessive inlining even at -Os
2013-05-08 18:24 [Bug tree-optimization/57218] New: Excessive inlining even at -Os amylaar at gcc dot gnu.org
` (8 preceding siblings ...)
2015-06-26 19:57 ` [Bug tree-optimization/57218] [4.9/5/6 " jakub at gcc dot gnu.org
@ 2015-06-26 20:27 ` jakub at gcc dot gnu.org
2020-03-12 11:58 ` [Bug ipa/57218] [8/9/10 " jakub at gcc dot gnu.org
` (5 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57218
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.9.3 |4.9.4
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug ipa/57218] [8/9/10 Regression] Excessive inlining even at -Os
2013-05-08 18:24 [Bug tree-optimization/57218] New: Excessive inlining even at -Os amylaar at gcc dot gnu.org
` (9 preceding siblings ...)
2015-06-26 20:27 ` jakub at gcc dot gnu.org
@ 2020-03-12 11:58 ` jakub at gcc dot gnu.org
2021-06-01 8:05 ` [Bug ipa/57218] [9/10/11/12 " rguenth at gcc dot gnu.org
` (4 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-12 11:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57218
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.3 |9.4
--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 9.3.0 has been released, adjusting target milestone.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug ipa/57218] [9/10/11/12 Regression] Excessive inlining even at -Os
2013-05-08 18:24 [Bug tree-optimization/57218] New: Excessive inlining even at -Os amylaar at gcc dot gnu.org
` (10 preceding siblings ...)
2020-03-12 11:58 ` [Bug ipa/57218] [8/9/10 " jakub at gcc dot gnu.org
@ 2021-06-01 8:05 ` rguenth at gcc dot gnu.org
2021-09-05 17:24 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01 8:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57218
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.4 |9.5
--- Comment #17 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug ipa/57218] [9/10/11/12 Regression] Excessive inlining even at -Os
2013-05-08 18:24 [Bug tree-optimization/57218] New: Excessive inlining even at -Os amylaar at gcc dot gnu.org
` (11 preceding siblings ...)
2021-06-01 8:05 ` [Bug ipa/57218] [9/10/11/12 " rguenth at gcc dot gnu.org
@ 2021-09-05 17:24 ` pinskia at gcc dot gnu.org
2022-05-27 9:34 ` [Bug ipa/57218] [10/11/12/13 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-05 17:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57218
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Last reconfirmed|2018-02-03 00:00:00 |2021-9-5
--- Comment #18 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So looking at LLVM, at -Oz, the inlining is not done but at -Os it is.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug ipa/57218] [10/11/12/13 Regression] Excessive inlining even at -Os
2013-05-08 18:24 [Bug tree-optimization/57218] New: Excessive inlining even at -Os amylaar at gcc dot gnu.org
` (12 preceding siblings ...)
2021-09-05 17:24 ` pinskia at gcc dot gnu.org
@ 2022-05-27 9:34 ` rguenth at gcc dot gnu.org
2022-06-28 10:30 ` jakub at gcc dot gnu.org
2023-07-07 10:29 ` [Bug ipa/57218] [11/12/13/14 " rguenth at gcc dot gnu.org
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27 9:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57218
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.5 |10.4
--- Comment #19 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug ipa/57218] [10/11/12/13 Regression] Excessive inlining even at -Os
2013-05-08 18:24 [Bug tree-optimization/57218] New: Excessive inlining even at -Os amylaar at gcc dot gnu.org
` (13 preceding siblings ...)
2022-05-27 9:34 ` [Bug ipa/57218] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:30 ` jakub at gcc dot gnu.org
2023-07-07 10:29 ` [Bug ipa/57218] [11/12/13/14 " rguenth at gcc dot gnu.org
15 siblings, 0 replies; 17+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57218
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.4 |10.5
--- Comment #20 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug ipa/57218] [11/12/13/14 Regression] Excessive inlining even at -Os
2013-05-08 18:24 [Bug tree-optimization/57218] New: Excessive inlining even at -Os amylaar at gcc dot gnu.org
` (14 preceding siblings ...)
2022-06-28 10:30 ` jakub at gcc dot gnu.org
@ 2023-07-07 10:29 ` rguenth at gcc dot gnu.org
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57218
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.5 |11.5
--- Comment #21 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.
^ permalink raw reply [flat|nested] 17+ messages in thread