From: Aldy Hernandez <aldyh@redhat.com>
To: Mark Mitchell <mark@codesourcery.com>
Cc: Richard Henderson <rth@redhat.com>, gcc@gcc.gnu.org
Subject: Re: pruning unused debugging types (enums/PR23336)
Date: Fri, 18 Nov 2005 20:09:00 -0000 [thread overview]
Message-ID: <20051118200742.GA30215@redhat.com> (raw)
In-Reply-To: <437D7395.8080000@codesourcery.com>
On Thu, Nov 17, 2005 at 10:24:21PM -0800, Mark Mitchell wrote:
> Richard Henderson wrote:
>
> > A solution that comes to mind is to have the front-end add dummy
> > TYPE_DECL nodes to the BLOCK_VARS list of the function's outer-most
> > BLOCK. If the TYPE_DECL node were marked DECL_ARTIFICIAL and had
> > no DECL_NAME, it'd be easy for us to notice that we shouldn't
> > actually emit debug info for the TYPE_DECL itself, but that we
> > should consider its TREE_TYPE to be used.
> >
> > I'm open to better schemes. Perhaps a used-type hash table in
> > the struct function.
>
> I like the idea, but I think a hash table would be better. In fact, I
> think the best choice would be a hash table during compilation of the
> function, transformed into a vector after the closing brace of the
Either way is fine by me. Just to make sure I understand things;
you want me to hack the front-end to fill the hash table every time
it parses a cast or enum type?
For example:
Index: c-parser.c
===================================================================
--- c-parser.c (revision 107115)
+++ c-parser.c (working copy)
@@ -4485,6 +4485,7 @@ c_parser_cast_expression (c_parser *pars
ret.original_code = ERROR_MARK;
return ret;
}
+ add_to_some_hash (TREE_TYPE (groktypename (type_name)));
if (c_parser_next_token_is (parser, CPP_OPEN_BRACE))
return c_parser_postfix_expression_after_paren_type (parser,
Thanks.
next prev parent reply other threads:[~2005-11-18 20:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-17 22:08 Aldy Hernandez
2005-11-17 23:09 ` Richard Henderson
2005-11-18 6:24 ` Mark Mitchell
2005-11-18 20:09 ` Aldy Hernandez [this message]
2005-11-19 1:03 ` Mark Mitchell
2006-02-10 20:03 ` Aldy Hernandez
2006-02-14 2:11 ` Mark Mitchell
2006-02-14 11:52 ` Aldy Hernandez
2006-02-15 2:08 ` Mark Mitchell
2006-02-16 19:42 ` Aldy Hernandez
2006-02-17 23:53 ` Richard Henderson
2006-02-15 13:48 ` Diego Novillo
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=20051118200742.GA30215@redhat.com \
--to=aldyh@redhat.com \
--cc=gcc@gcc.gnu.org \
--cc=mark@codesourcery.com \
--cc=rth@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).