From: Jason Merrill <jason@redhat.com>
To: Aldy Hernandez <aldyh@redhat.com>,
Richard Biener <richard.guenther@gmail.com>,
Jan Hubicka <hubicka@ucw.cz>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch 10/10] debug-early merge: compiler proper
Date: Thu, 28 May 2015 20:54:00 -0000 [thread overview]
Message-ID: <55677C05.6040302@redhat.com> (raw)
In-Reply-To: <5567643C.1020306@redhat.com>
On 05/28/2015 02:53 PM, Aldy Hernandez wrote:
> On 05/27/2015 08:39 AM, Jason Merrill wrote:
>> On 05/20/2015 11:50 AM, Aldy Hernandez wrote:
>
>>> + /* Fill in the size of variable-length fields in late dwarf. */
>>> + if (TREE_ASM_WRITTEN (type)
>>> + && !early_dwarf_dumping)
>>> + {
>>> + tree member;
>>> + for (member = TYPE_FIELDS (type); member; member = DECL_CHAIN
>>> (member))
>>> + fill_variable_array_bounds (TREE_TYPE (member));
>>> + return;
>>> + }
>>
>> Why is this happening in late dwarf? I'm concerned that front-end
>> information that is necessary to do this might be lost by that point.
>
> I thought only after the optimizations had run their course would we be
> guaranteed to have accurate bound information. At least, that's what my
> experience showed.
Hmm, I'm don't know why optimizations would change the representation of
the array type.
>>> + /* Variable-length types may be incomplete even if
>>> + TREE_ASM_WRITTEN. For such types, fall through to
>>> + gen_array_type_die() and possibly fill in
>>> + DW_AT_{upper,lower}_bound attributes. */
>>> + if ((TREE_CODE (type) != ARRAY_TYPE
>>> + && TREE_CODE (type) != RECORD_TYPE
>>> + && TREE_CODE (type) != UNION_TYPE
>>> + && TREE_CODE (type) != QUAL_UNION_TYPE)
>>> + || (TYPE_SIZE (type)
>>> + && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST))
>>
>> Similarly, why check for INTEGER_CST here?
>
> The INTEGER_CST check was supposed to mean "we have bound information
> already, no need to look further".
>
> I guess we could have a variable length bound that does not decay to a
> constant.
Right. I would expect that to usually be the case with VLAs.
> Perhaps I could check the presence of a cached DIE with a
> type DIE containing a DW_TAG_subrange_type *and*
> DW_AT_{lower,upper}_bound ??. Basically I just want to add bound
> information, if available and not already present.
>
> Suggestions?
I'm still not sure why we can't just emit bound info in early dwarf.
Can you be more specific about the optimization thing?
Jason
next prev parent reply other threads:[~2015-05-28 20:35 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
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 [this message]
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=55677C05.6040302@redhat.com \
--to=jason@redhat.com \
--cc=aldyh@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=richard.guenther@gmail.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).