public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/94495] [10 Regression] Debug info size growth since r10-7515-g2c0fa3ecf70d199a
Date: Mon, 06 Apr 2020 17:07:48 +0000	[thread overview]
Message-ID: <bug-94495-4-lsjbd6rZQN@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-94495-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Can be also reproduced with
void bar (int, int, int, int, int, int, int, int, int, int, int, int *);

int
foo (int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, int
k)
{
  int z[64];
  if (a > 37)
    bar (a, b, c, d, e, f, g, h, i, j, k, z);
  if (__builtin_expect (b, 0))
    bar (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0);
  return a + b + c;
}

The difference at -O2 -g -dA in the assembly is (when ignoring debug info):
        # DEBUG g => [argp]
        # DEBUG k => [argp+0x20]
        # DEBUG j => [argp+0x18]
        # DEBUG a => di
        # DEBUG b => si
        # DEBUG c => dx
        # DEBUG d => cx
        # DEBUG h => [argp+0x8]
        # DEBUG e => r8
        # DEBUG i => [argp+0x10]
        # DEBUG f => r9
...
 .LVL4:
+       # DEBUG h => [sp+0x10]
+       # DEBUG i => [sp+0x18]
+       # DEBUG j => [sp+0x20]
+       # DEBUG k => [sp+0x28]
        # DEBUG c => entry_value
 # SUCC: EXIT [always]  count:1073741824 (estimated locally)
        ret
 .LVL5:
+       # DEBUG k => [argp+0x20]
        # DEBUG a => bx
        # DEBUG b => si
        # DEBUG c => dx
        # DEBUG d => cx
        # DEBUG e => r8
        # DEBUG f => r9
+       # DEBUG h => [argp+0x8]
+       # DEBUG i => [argp+0x10]
+       # DEBUG j => [argp+0x18]
i.e. at the end of epilogue we don't find the argp equivalence for some reason,
which means we unnecessarily use location list when it is something that can be
expressed directly in the DIEs.  Will have a look tomorrow.

  parent reply	other threads:[~2020-04-06 17:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-06  7:44 [Bug debug/94495] New: " marxin at gcc dot gnu.org
2020-04-06  7:44 ` [Bug debug/94495] " marxin at gcc dot gnu.org
2020-04-06  8:01 ` jakub at gcc dot gnu.org
2020-04-06 11:58 ` rguenth at gcc dot gnu.org
2020-04-06 13:14 ` marxin at gcc dot gnu.org
2020-04-06 13:34 ` marxin at gcc dot gnu.org
2020-04-06 17:07 ` jakub at gcc dot gnu.org [this message]
2020-04-08 15:25 ` jakub at gcc dot gnu.org
2020-04-09  9:33 ` jakub at gcc dot gnu.org
2020-04-09 19:21 ` cvs-commit at gcc dot gnu.org
2020-04-10  8:46 ` schwab@linux-m68k.org
2020-04-10 10:27 ` marxin at gcc dot gnu.org
2020-04-10 10:33 ` jakub at gcc dot gnu.org
2020-04-10 11:08 ` schwab@linux-m68k.org
2020-04-10 15:03 ` jakub at gcc dot gnu.org
2020-04-11  5:34 ` cvs-commit at gcc dot gnu.org
2020-04-14  9:29 ` jakub at gcc dot gnu.org
2020-04-15  5:41 ` marxin 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-94495-4-lsjbd6rZQN@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).