public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Aldy Hernandez <aldyh@redhat.com>
Cc: Jan Hubicka <hubicka@ucw.cz>, Jason Merrill <jason@redhat.com>,
		gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch 10/10] debug-early merge: compiler proper
Date: Fri, 22 May 2015 11:45:00 -0000	[thread overview]
Message-ID: <CAFiYyc2-WK5WaNoUcBUgbtcW=0P3wvFrJkP5Zb9USSbUCHOQ_g@mail.gmail.com> (raw)
In-Reply-To: <555D0071.9000607@redhat.com>

On Wed, May 20, 2015 at 11:45 PM, Aldy Hernandez <aldyh@redhat.com> wrote:
> On 05/20/2015 05:01 PM, Jan Hubicka wrote:
>>>
>>>
>>> commit 8824b5ecba26cef065e47b34609c72677c3c36fc
>>> Author: Aldy Hernandez <aldyh@redhat.com>
>>> Date:   Wed May 20 16:31:14 2015 -0400
>>>
>>>      Set DECL_IGNORED_P on temporary arrays created in the switch
>>>      conversion pass.
>>>
>>> diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c
>>> index 6b68a16..a4bcdba 100644
>>> --- a/gcc/tree-switch-conversion.c
>>> +++ b/gcc/tree-switch-conversion.c
>>> @@ -1097,6 +1097,7 @@ build_one_array (gswitch *swtch, int num, tree
>>> arr_index_type,
>>>         DECL_ARTIFICIAL (decl) = 1;
>>>         TREE_CONSTANT (decl) = 1;
>>>         TREE_READONLY (decl) = 1;
>>> +      DECL_IGNORED_P (decl) = 1;
>>>         varpool_node::finalize_decl (decl);
>>
>>
>> This looks obvious enough to me.  Technically speaking the array type
>> constructed
>> probalby should be TREE_ARTIFICAIL, but probably it does not matter.

Fine to commit to trunk btw.

>
> Yeah, that's what I thought.  I ignored the type because it won't make it to
> the debugging back end if we stop things at the DECL itself.
>
> FWIW, Ada is filled with these temporaries and/or types that should really
> be ignored, and are currently causing grief.
>
>> If you grep for finalize_decl, there are several other calls:
>> asan.c:      varpool_node::finalize_decl (var);
>> asan.c:      varpool_node::finalize_decl (var);
>> cgraphbuild.c:      varpool_node::finalize_decl (decl);
>> cgraphunit.c:    - varpool_finalize_decl
>> cgraphunit.c:   varpool_node::finalize_decl (decl);
>> cgraphunit.c:varpool_node::finalize_decl (tree decl)
>> coverage.c:           varpool_node::finalize_decl (var);
>> coverage.c:  varpool_node::finalize_decl (var);
>
>
> Etc etc.
>
> Hmmm, I bet mainline is generating dwarf for all this.  I don't feel
> comfortable touching all this (ok, I'm lazy), but it would seem like almost
> all of these calls would benefit from DECL_IGNORED_P.  Perhaps we could add
> an argument to finalize_decl() and do it in there.

The only issue are in passes using build_decl directly.  I guess we'd want
a middle-end-ish "create new global static" similar to what we have for
locals (create_tmp_var).  Some of the callers above already set DECL_IGNORED_P
properly.

Richard.

> Aldy
>
>
>> coverage.c:  varpool_node::finalize_decl (fn_info_ary);
>> coverage.c:  varpool_node::finalize_decl (gcov_info_var);
>> omp-low.c:        varpool_node::finalize_decl (t);
>> omp-low.c:        varpool_node::finalize_decl (t);
>> omp-low.c:        varpool_node::finalize_decl (decl);
>> omp-low.c:      varpool_node::finalize_decl (vars_decl);
>> omp-low.c:      varpool_node::finalize_decl (funcs_decl);
>> passes.c:           varpool_node::finalize_decl (decl);
>> tree-chkp.c:  varpool_node::finalize_decl (var);
>> tree-chkp.c:  varpool_node::finalize_decl (bnd_var);
>> tree-profile.c:  varpool_node::finalize_decl (ic_void_ptr_var);
>> tree-profile.c:  varpool_node::finalize_decl (ic_gcov_type_ptr_var);
>> tree-switch-conversion.c:      varpool_node::finalize_decl (decl);
>> ubsan.c:  varpool_node::finalize_decl (decl);
>> ubsan.c:  varpool_node::finalize_decl (var);
>> ubsan.c:      varpool_node::finalize_decl (array);
>> varasm.c:  varpool_node::finalize_decl (decl);
>> varpool.c:   Unlike finalize_decl function is intended to be used
>> varpool.c:  varpool_node::finalize_decl (decl);
>>
>> I would say most of them needs similar treatment (I am not 100% sure about
>> OMP
>> ones that may be user visible)
>>
>> Honza
>>>
>>>
>>>         fetch = build4 (ARRAY_REF, value_type, decl, tidx, NULL_TREE,
>
>

  parent reply	other threads:[~2015-05-22 11:26 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-08  0:41 Aldy Hernandez
2015-05-18 11:06 ` Richard Biener
2015-05-18 14:47   ` Jan Hubicka
     [not found]   ` <555CAD35.5040304@redhat.com>
2015-05-20 21:03     ` Aldy Hernandez
2015-05-20 21:11       ` Jan Hubicka
2015-05-20 22:11         ` Aldy Hernandez
2015-05-22  9:00           ` Eric Botcazou
2015-05-22 11:45           ` Richard Biener [this message]
2015-05-22 13:41             ` Aldy Hernandez
2015-05-22 11:26     ` Richard Biener
2015-05-22 14:29       ` Aldy Hernandez
2015-05-27 13:18         ` Richard Biener
2015-05-27 12:50     ` Jason Merrill
2015-05-28 20:12       ` Aldy Hernandez
2015-05-28 20:54         ` Jason Merrill
2015-05-28 21:01           ` Jan Hubicka
2015-05-28 21:10             ` Jason Merrill
2015-05-28 21:16               ` Jan Hubicka
2015-05-29 12:07           ` Richard Biener
2015-05-29 19:33           ` Aldy Hernandez
2015-05-29 19:40             ` Richard Biener
2015-05-29 19:49               ` Jason Merrill
2015-05-31  7:53                 ` Aldy Hernandez
2015-05-31 22:14                   ` Jason Merrill
2015-06-01  8:03                     ` Richard Biener
2015-06-01  8:04                       ` Richard Biener
2015-06-01 15:43                         ` Aldy Hernandez
2015-06-01 17:01                           ` Richard Biener
2015-06-01 17:42                             ` Aldy Hernandez
2015-06-02  8:13                               ` Richard Biener
2015-06-02 19:25                                 ` Aldy Hernandez
2015-05-29 19:47             ` Jason Merrill
2015-05-28 21:31       ` Aldy Hernandez
2015-05-29  6:33         ` Jason Merrill

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='CAFiYyc2-WK5WaNoUcBUgbtcW=0P3wvFrJkP5Zb9USSbUCHOQ_g@mail.gmail.com' \
    --to=richard.guenther@gmail.com \
    --cc=aldyh@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --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).