public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/108086] internal compiler error: in set_accesses, at rtl-ssa/internals.inl:449
Date: Thu, 15 Dec 2022 10:30:52 +0000	[thread overview]
Message-ID: <bug-108086-4-OsVWHxy26K@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-108086-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Samples: 877K of event 'cycles:u', Event count (approx.): 779618998855          
Overhead       Samples  Command  Shared Object     Symbol                       
  52.64%        461458  cc1plus  cc1plus           [.] ggc_internal_alloc
   3.18%         27836  cc1plus  cc1plus           [.] bitmap_set_bit
   2.66%         23374  cc1plus  cc1plus           [.]
hash_table<hash_map<tree_
   2.37%         20813  cc1plus  cc1plus           [.] insert_decl_map
   1.57%         13954  cc1plus  cc1plus           [.]
hash_table<hash_map<tree_
   1.55%         13852  cc1plus  [unknown]         [k] 0xffffffffad200b47
   1.30%         11443  cc1plus  cc1plus           [.] copy_bb

 callgraph ipa passes               : 238.97 ( 79%)  31.98 ( 96%) 270.98 ( 81%)
12908M ( 90%)
 integration                        :  80.40 ( 27%)  19.17 ( 57%)  99.91 ( 30%)
11659M ( 81%)
 tree eh                            :  23.57 (  8%)   0.05 (  0%)  23.65 (  7%)
  153M (  1%)
 tree operand scan                  : 134.50 ( 45%)  12.74 ( 38%) 146.64 ( 44%)
  892M (  6%)

I think this is the "known" issue of always-inline functions calling
always-inline functions, eventually leading to some exponential growth in size
of the callgraph, size estimation and code.  We fail to elide the intermediate
functions early (and re-use the body for the last inline instance).

It's often better to use the flatten attribute on the outermost function
implementing a computation kernel.

A smaller "main" program is

void bar(__m512i *);
void foo(__m512i *input)
{
  __m512i transVecs[64];
  Transpose<0>::_transpose(input, transVecs);
  bar (transVecs);
}

Reducing 64 to 32 (also in the templates) makes it compile almost instantly
but still

 callgraph ipa passes               :  11.74 ( 84%)   3.00 ( 91%)  14.74 ( 85%)
 1617M ( 92%)
 integration                        :   6.88 ( 49%)   1.75 ( 53%)   8.63 ( 50%)
 1460M ( 83%)
 tree operand scan                  :   3.04 ( 22%)   1.17 ( 35%)   4.31 ( 25%)
  113M (  7%)

I can halve the operand scan time.

  parent reply	other threads:[~2022-12-15 10:30 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13 18:40 [Bug c++/108086] New: " jonas.keller@uni-bielefeld.de
2022-12-13 18:42 ` [Bug c++/108086] " jonas.keller@uni-bielefeld.de
2022-12-13 18:43 ` jonas.keller@uni-bielefeld.de
2022-12-13 18:43 ` jonas.keller@uni-bielefeld.de
2022-12-14  8:35 ` [Bug rtl-optimization/108086] " rguenth at gcc dot gnu.org
2022-12-14  8:47 ` rguenth at gcc dot gnu.org
2022-12-14 10:53 ` marxin at gcc dot gnu.org
2022-12-15 10:30 ` rguenth at gcc dot gnu.org [this message]
2022-12-15 10:32 ` cvs-commit at gcc dot gnu.org
2022-12-15 17:43 ` cvs-commit at gcc dot gnu.org
2022-12-16  8:30 ` cvs-commit at gcc dot gnu.org
2022-12-16  9:29 ` cvs-commit at gcc dot gnu.org
2022-12-16 11:27 ` [Bug rtl-optimization/108086] [11/12/13 Regression] " rguenth at gcc dot gnu.org
2022-12-16 11:32 ` rguenth at gcc dot gnu.org
2022-12-16 12:06 ` cvs-commit at gcc dot gnu.org
2022-12-16 18:21 ` rsandifo at gcc dot gnu.org
2023-02-02 10:41 ` rsandifo at gcc dot gnu.org
2023-02-02 14:53 ` cvs-commit at gcc dot gnu.org
2023-04-03  8:57 ` [Bug rtl-optimization/108086] [11/12 " cvs-commit at gcc dot gnu.org
2023-04-14 13:15 ` [Bug rtl-optimization/108086] [11 " hubicka at gcc dot gnu.org
2023-05-29 10:07 ` jakub at gcc dot gnu.org
2024-02-19 13:43 ` rguenth at gcc dot gnu.org
2024-06-04 12:48 ` cvs-commit at gcc dot gnu.org
2024-06-04 12:50 ` rsandifo at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-108086-4-OsVWHxy26K@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).