From: Diego Novillo <dnovillo@google.com>
To: Jan Hubicka <jh@suse.cz>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: Put scope blocks on a diet
Date: Tue, 24 Jul 2007 19:23:00 -0000 [thread overview]
Message-ID: <46A64F4E.30908@google.com> (raw)
In-Reply-To: <20070724180235.GM24519@kam.mff.cuni.cz>
On 7/24/07 2:02 PM, Jan Hubicka wrote:
> * gimple-low.c (lower_stmt): When not doing debugging, don't save
> info about block.
> * tree-ssa-live.c: Include debug.h and flags.h.
> (mark_scope_block_unused): New function.
> (remove_unused_scope_block_p): New function.
> (remove_unused_locals): Remove unused blocks too.
OK with a few minor changes
> Index: gimple-low.c
> ===================================================================
> --- gimple-low.c (revision 126859)
> +++ gimple-low.c (working copy)
> @@ -210,7 +210,9 @@ lower_stmt (tree_stmt_iterator *tsi, str
> {
> tree stmt = tsi_stmt (*tsi);
>
> - if (EXPR_HAS_LOCATION (stmt) && data)
> + if (EXPR_HAS_LOCATION (stmt) && data
&& data on the next line
> tree t = *tp;
> + char const c = TREE_CODE_CLASS (TREE_CODE (t));
Hmm? TREE_CODE_CLASS is of type enum tree_code_class.
>
> +/* Mark the scope block SCOPE and is subblocks unused when they can be
s/is/its/
> +
> +/* Look if the block is dead (by possibly elliminating it's dead subblocks)
s/elliminating/eliminating/
s/it's/its/
> + and return true if so.
> + Block is declared dead if:
> + 1) No statements are associated with it.
> + 2) Declares no live variables
> + 3) All subblocks are dead
> + or there is precisely one subblocks and the block
> + has same abstract origin as outer block and declares
> + no variables, so it is pure wrapper.
> + When we are not outputting full debug info, we also elliminate dead variables
> + out of scope blocks to let them to be recycled by GGC and to save copying work
> + done by the inliner.
> +*/
Closing comment on previous line.
> + mark_scope_block_unused (DECL_INITIAL (current_function_decl));
Comment before '/* Assume every block in the function is unused. */'
next prev parent reply other threads:[~2007-07-24 19:13 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-24 18:20 Jan Hubicka
2007-07-24 19:23 ` Diego Novillo [this message]
2007-08-02 8:59 ` Alexandre Oliva
2007-08-02 23:13 ` Alexandre Oliva
2007-08-03 8:29 ` Jan Hubicka
2007-08-06 20:11 ` Jan Hubicka
2007-08-16 19:04 ` Alexandre Oliva
2007-10-03 17:01 ` Alexandre Oliva
2007-10-03 17:27 ` Jan Hubicka
2007-10-05 18:26 ` Alexandre Oliva
2007-10-03 18:19 ` Richard Guenther
2007-10-07 22:37 ` Jan Hubicka
2007-10-08 5:53 ` Michael Matz
2007-10-08 7:13 ` Jan Hubicka
2007-10-08 7:46 ` Michael Matz
2007-10-09 21:09 ` Alexandre Oliva
2007-10-10 8:08 ` Alexandre Oliva
2007-10-10 8:20 ` Alexandre Oliva
2007-10-10 8:46 ` Jan Hubicka
2007-10-11 6:20 ` Alexandre Oliva
2007-10-11 8:39 ` Richard Guenther
2007-10-11 22:12 ` Jan Hubicka
2007-10-12 1:33 ` Alexandre Oliva
2007-10-12 6:14 ` Jan Hubicka
2007-11-27 17:37 ` Richard Guenther
2007-11-27 20:39 ` Mark Mitchell
2007-11-27 21:34 ` Alexandre Oliva
2007-11-27 21:59 ` Mark Mitchell
2007-11-27 23:14 ` Jan Hubicka
2007-11-28 1:10 ` Alexandre Oliva
2007-11-28 1:15 ` Richard Guenther
2007-11-28 1:17 ` Mark Mitchell
2007-11-28 8:12 ` Alexandre Oliva
2007-11-28 9:34 ` Mark Mitchell
2007-11-29 10:14 ` Alexandre Oliva
2007-11-28 8:54 ` Alexandre Oliva
2007-11-27 22:08 ` Richard Guenther
2007-11-28 1:08 ` Alexandre Oliva
2007-11-28 1:10 ` Richard Guenther
2007-11-28 3:28 ` Alexandre Oliva
2007-11-28 14:30 ` Richard Guenther
2007-11-28 20:51 ` Mark Mitchell
2007-11-28 23:10 ` Richard Guenther
2007-11-28 23:21 ` Mark Mitchell
2007-11-29 1:26 ` Richard Guenther
2007-11-29 9:56 ` Alexandre Oliva
2007-11-29 17:01 ` Jan Hubicka
2007-11-29 18:29 ` Mark Mitchell
2007-11-29 19:43 ` Richard Guenther
2007-11-29 21:29 ` Mark Mitchell
2007-11-30 11:14 ` Alexandre Oliva
2007-11-29 21:36 ` Jan Hubicka
2007-11-29 21:38 ` Mark Mitchell
2007-11-29 22:06 ` Jan Hubicka
2007-11-29 22:34 ` Mark Mitchell
2007-11-30 1:02 ` Richard Guenther
2007-11-28 23:02 ` Alexandre Oliva
2007-11-28 23:15 ` Richard Guenther
2007-11-29 10:16 ` Alexandre Oliva
2007-11-29 13:36 ` Richard Guenther
2007-11-30 10:53 ` Alexandre Oliva
2007-11-29 17:30 ` Jan Hubicka
2007-12-15 21:59 ` Alexandre Oliva
2007-12-18 11:50 ` Jan Hubicka
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=46A64F4E.30908@google.com \
--to=dnovillo@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jh@suse.cz \
/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).