public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Jason Merrill <jason@redhat.com>
Cc: Aldy Hernandez <aldyh@redhat.com>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [debug-early] reuse variable DIEs and fix their context
Date: Fri, 29 Aug 2014 09:09:00 -0000	[thread overview]
Message-ID: <CAFiYyc2im+prFg_iSM_j_VEhhJ1EEpqzxEEfoENUm8-r0JJ4UA@mail.gmail.com> (raw)
In-Reply-To: <53FF8DBA.9010605@redhat.com>

On Thu, Aug 28, 2014 at 10:14 PM, Jason Merrill <jason@redhat.com> wrote:
> On 08/28/2014 03:13 PM, Richard Biener wrote:
>>>>
>>>> knowledge of scopes and such, only available in the FE.  Is there a
>>>> generic way of determining if a DECL is in global scope?
>>
>>
>> Via DECL_CONTEXT and the global scope macro predicate.  Eventually not
>> enough to detect class scope statics.
>
>
> !decl_function_context should do the trick.

Yeah, that might work.  But I suppose we want proper ordering even
for a namespace hierarchy, that is, output dwarf for the namespace
which will output its siblings.

That is, dwarf2out.c currently kind-of supports both, first create
DIEs for the context which will usually create DIEs for its siblings
or first create siblings which will either end up in the limbo-list
or get a context DIE via force_decl/type_die (see get_context_die).

IMHO the best would be to create DIEs top-down controlled
by frontends and also populate context DIEs from the frontends
and not by walking some sibling list from dwarf2out.c.

Frontends already "announce" some types/decls to dwarf2out.c
by means of calling rest_of_decl_compilation or rest_of_type_compilation
(only for TYPE_DECLs).  So it's mostly a matter of adding similar calls
for scopes and global decls.  The calls should be debug_hook calls
of course, not these weird rest_of_*_compilation stuff.

Richard.

> Jason
>

  reply	other threads:[~2014-08-29  9:09 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-27  2:43 Aldy Hernandez
2014-08-28 13:58 ` Richard Biener
2014-08-28 17:35   ` Aldy Hernandez
2014-08-28 18:01     ` Jason Merrill
2014-08-28 19:13       ` Richard Biener
2014-08-28 20:14         ` Jason Merrill
2014-08-29  9:09           ` Richard Biener [this message]
2014-09-03 17:55       ` Aldy Hernandez
2014-09-04 10:42         ` Richard Biener
2014-09-05  2:38           ` Aldy Hernandez
2014-09-05  9:00             ` Richard Biener
2014-09-09  0:01               ` Aldy Hernandez
2014-09-09  9:16                 ` Richard Biener
2014-09-12  0:51                   ` Aldy Hernandez
2014-09-12  8:13                     ` Richard Biener
2014-09-12 15:15                     ` Jason Merrill
2014-09-12 17:11                       ` Aldy Hernandez
2014-09-12 17:33                         ` Jason Merrill
2014-09-12 17:48                           ` Aldy Hernandez
2014-09-12 17:56                             ` Jason Merrill
2014-09-16 15:49                               ` Aldy Hernandez
2014-09-15  9:32                         ` Richard Biener
2014-09-15 18:46                           ` Jason Merrill
2014-12-18 19:26                       ` Aldy Hernandez
2014-12-19 11:20                         ` Richard Biener
2014-12-19 18:58                           ` Jan Hubicka
2014-12-19 19:01                             ` Jan Hubicka
2014-12-19 19:02                               ` Aldy Hernandez
2014-12-19 19:31                                 ` Jason Merrill
2014-12-19 19:50                                   ` Jan Hubicka
2014-12-20 10:09                                   ` Aldy Hernandez
2015-01-08 12:24                                     ` Richard Biener
2014-12-19 19:03                             ` Aldy Hernandez
2014-09-04 17:53         ` H.J. Lu
2014-09-04 17:54           ` Aldy Hernandez
2014-09-04 18:23             ` Richard Biener
2014-09-04 18:35               ` Aldy Hernandez
2014-09-04 18:38                 ` Christophe Lyon
2014-09-04 19:42                 ` Jan-Benedict Glaw
2015-01-08 15:20 Aldy Hernandez

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=CAFiYyc2im+prFg_iSM_j_VEhhJ1EEpqzxEEfoENUm8-r0JJ4UA@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=aldyh@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    /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).