public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/94472] New: 400.perlbench is slower when compiled at -O2 with both PGO and LTO on AMD Zen CPUs
@ 2020-04-03 14:54 jamborm at gcc dot gnu.org
  2020-04-28  2:30 ` [Bug ipa/94472] " edlinger at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: jamborm at gcc dot gnu.org @ 2020-04-03 14:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94472

            Bug ID: 94472
           Summary: 400.perlbench is slower when compiled at -O2 with both
                    PGO and LTO on AMD Zen CPUs
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: gcov-profile
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jamborm at gcc dot gnu.org
                CC: hubicka at gcc dot gnu.org, marxin at gcc dot gnu.org
            Blocks: 26163
  Target Milestone: ---
              Host: x86_64-linux
            Target: x86_64-linux

400.perlbench is slower when compiled at -O2 (and generic march/mtune)
with both PGO and LTO when compiled with master (26b3e568a60) than
when built with GCC 9, on Zen2 by 13% and on Zen1 by 7%.  The
performance is comparable on Intel Cascade Lake server CPU.

I attempted bisecting the problems on the Zen2 CPU but was only
partially successful because a lot of the slowdown seemed to have
happened gradually.  The first bigger slowdown - almost 4% - came
with:

  562d1e9556777988ae46c5d1357af2636bc272ea is the first bad commit
  commit 562d1e9556777988ae46c5d1357af2636bc272ea
  Author: Jan Hubicka <hubicka@gcc.gnu.org>
  Date:   Wed Oct 2 16:01:47 2019 +0000

    cif-code.def (MAX_INLINE_INSNS_SINGLE_O2_LIMIT, [...]): New.


            * cif-code.def (MAX_INLINE_INSNS_SINGLE_O2_LIMIT,
            MAX_INLINE_INSNS_AUTO_O2_LIMIT): New.

  ...
    From-SVN: r276469

About the same performance loss was then introduced by:

commit 2925cad2151842daa387950e62d989090e47c91d
Author: Jan Hubicka <hubicka@ucw.cz>
Date:   Thu Oct 3 17:08:21 2019 +0200

    params.def (PARAM_INLINE_HEURISTICS_HINT_PERCENT, [...]): New.

            * params.def (PARAM_INLINE_HEURISTICS_HINT_PERCENT,
            PARAM_INLINE_HEURISTICS_HINT_PERCENT_O2): New.
            * doc/invoke.texi (inline-heuristics-hint-percent,
            inline-heuristics-hint-percent-O2): Document.
            * tree-inline.c (inline_insns_single, inline_insns_auto): Add new
            hint attribute.
            (can_inline_edge_by_limits_p): Use it.


And finally throughout March the benchmark is quite jumpy but finally
ended again ended up about 5% slower than at the beginning of the
month.


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)

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-04-28 13:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-03 14:54 [Bug gcov-profile/94472] New: 400.perlbench is slower when compiled at -O2 with both PGO and LTO on AMD Zen CPUs jamborm at gcc dot gnu.org
2020-04-28  2:30 ` [Bug ipa/94472] " edlinger at gcc dot gnu.org
2020-04-28  2:36 ` edlinger at gcc dot gnu.org
2020-04-28  8:06 ` jamborm at gcc dot gnu.org
2020-04-28  8:36 ` edlinger at gcc dot gnu.org
2020-04-28  8:38 ` jakub at gcc dot gnu.org
2020-04-28  8:41 ` edlinger at gcc dot gnu.org
2020-04-28  8:42 ` edlinger at gcc dot gnu.org
2020-04-28  9:21 ` rguenth at gcc dot gnu.org
2020-04-28  9:22 ` rguenth at gcc dot gnu.org
2020-04-28  9:57 ` hubicka at ucw dot cz
2020-04-28 13:09 ` edlinger 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).