[Bug tree-optimization/86702] [9 Regression] SPEC CPU2006 400.perlbench, CPU2017 500.perlbench_r ~3% performance drop after r262247

2018-08-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86702

Martin Liška  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Martin Liška  ---
Should be fixed now, please reopen it it still exists.

[Bug tree-optimization/86702] [9 Regression] SPEC CPU2006 400.perlbench, CPU2017 500.perlbench_r ~3% performance drop after r262247

2018-08-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86702

--- Comment #5 from Martin Liška  ---
Author: marxin
Date: Mon Aug 27 12:17:54 2018
New Revision: 263877

URL: https://gcc.gnu.org/viewcvs?rev=263877&root=gcc&view=rev
Log:
Fix probabilities for jump table (PR tree-optimization/86702).

2018-08-27  Martin Liska  

PR tree-optimization/86702
* tree-switch-conversion.c (jump_table_cluster::emit):
Make probabilities even for values in jump table
according to number of cases handled.
(switch_decision_tree::compute_cases_per_edge): Pass
argument to reset_out_edges_aux function.
(switch_decision_tree::analyze_switch_statement): Likewise.
* tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
Make it static.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-switch-conversion.c
trunk/gcc/tree-switch-conversion.h

[Bug tree-optimization/86702] [9 Regression] SPEC CPU2006 400.perlbench, CPU2017 500.perlbench_r ~3% performance drop after r262247

2018-08-02 Thread alexander.nesterovskiy at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86702

--- Comment #4 from Alexander Nesterovskiy  ---
I've noticed performance regressions on different targets and with different
compilation options, not only highly optimized like "-march=skylake-avx512
-Ofast -flto -funroll-loops" but with "-O2" too.
The simplest case is 500.perlbench_r with "-O2" on Broadwell executed in one
copy.

Performance drop is not in a particular place but "spread" over whole
S_regmatch function which is really big.
My guess was that loosing of these probabilities affects passes that follows
tree-switchlower1.
And it is what I see in generated assembly - some different spilling/filling
and different order of blocks.

[Bug tree-optimization/86702] [9 Regression] SPEC CPU2006 400.perlbench, CPU2017 500.perlbench_r ~3% performance drop after r262247

2018-08-02 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86702

--- Comment #3 from Martin Liška  ---
I must confirm that probabilities are lost, but as the switch will end up as
jump table, so they are not used..

[Bug tree-optimization/86702] [9 Regression] SPEC CPU2006 400.perlbench, CPU2017 500.perlbench_r ~3% performance drop after r262247

2018-08-02 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86702

--- Comment #2 from Martin Liška  ---
Can you please provide info about affected target and precise options used?

[Bug tree-optimization/86702] [9 Regression] SPEC CPU2006 400.perlbench, CPU2017 500.perlbench_r ~3% performance drop after r262247

2018-07-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86702

Richard Biener  changed:

   What|Removed |Added

Version|unknown |9.0
   Target Milestone|--- |9.0

[Bug tree-optimization/86702] [9 Regression] SPEC CPU2006 400.perlbench, CPU2017 500.perlbench_r ~3% performance drop after r262247

2018-07-27 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86702

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-07-27
 CC||marxin at gcc dot gnu.org
 Blocks||26163
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org
Summary|[8/9 Regression] SPEC   |[9 Regression] SPEC CPU2006
   |CPU2006 400.perlbench,  |400.perlbench, CPU2017
   |CPU2017 500.perlbench_r ~3% |500.perlbench_r ~3%
   |performance drop after  |performance drop after
   |r262247 |r262247
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Thanks for the report, I'll take a look. If it's really caused by the revision,
then it's only 9 regression.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163
[Bug 26163] [meta-bug] missed optimization in SPEC (2k17, 2k and 2k6 and 95)