From: Jeff Law <law@redhat.com>
To: Nathan Froyd <froydnj@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] cleanup gcse.c:canon_modify_mem_list
Date: Mon, 04 Apr 2011 18:01:00 -0000 [thread overview]
Message-ID: <4D9A0765.6020901@redhat.com> (raw)
In-Reply-To: <20110404014451.GA16239@nightcrawler>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 04/03/11 19:44, Nathan Froyd wrote:
> The patch below converts gcse.c:canon_modify_mem_list to hold VECs
> instead of EXPR_LIST rtxes. I am ambivalent about the use of VECs in
> canon_modify_mem_list; they will waste some memory compared to the
> linked list scheme present before, though I'm not sure how much. It
> would depend on the average chain length, etc. I'm happy to use an
> linked list datastructure instead, allocated out of an
> alloc_pool (better statistics!) or even gcse's private obstack if folks
> think that would be better. Moving things out of GC memory and
> eliminating a use of EXPR_LIST has to be considered a good thing,
> though...
I've got no strong opinions on all this stuff -- except that blindly
moving stuff out of GC memory isn't necessarily a good thing. It really
depends on the lifetime of the objects.
Assuming the memory list stuff in gcse doesn't have a lifetime outside
of GCSE and is thus easily tracked, then I've got no fundamental
objection to the change.
>
> Doing this required addressing an odd little comment in
> record_last_mem_set_info:
>
> if (CALL_P (insn))
> {
> /* Note that traversals of this loop (other than for free-ing)
> will break after encountering a CALL_INSN. So, there's no
> need to insert a pair of items, as canon_list_insert does. */
> canon_modify_mem_list[bb] =
> alloc_INSN_LIST (insn, canon_modify_mem_list[bb]);
> bitmap_set_bit (blocks_with_calls, bb);
> }
>
> This is all well and good, except that the only real traversal of
> canon_modify_mem_list (compute_transp) doesn't check for CALL_INSNs.
It's possible (likely?) the implementation changed over time and the
comment wasn't properly updated. Unfortunate, but it does happen.
> + canon_modify_mem_list = GCNEWVEC (VEC(modify_pair,heap) *,
> + last_basic_block);
nit; You're missing some whitespace here (after the VEC).
OK. Please install,
Thanks,
Jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJNmgdkAAoJEBRtltQi2kC7QagH/AkchggJ4C7SU2AasolDyQqn
tcQowd5zBmiYFujY9+UgIL6Wh6AVU/Ls452c96MVKKWcDi8kIW0y3tzlls5yYbKW
/XtvuzPU9zhya672mjTNktD3mPFj4qKtAO7PsjCh375uvkSknSXCAP9B5O9nQPbR
BdaaAHv4gLgrpIokFTxk5455/7BGMCNJ0/O91PR4Jyithc2wZsz6Me4AFg+aMZG/
t+Vq7+6D5kALiXrrn2UNzrGefE6i6HdbacP6drOaDI1XNmI8Se4NgiE/JQfkvKty
1i4MVGW2IJrMax7fCKLhIRErQxEgfGQVfOLk5WkQXSzxfvILLu1bkdTTLKTr6t0=
=tTk7
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2011-04-04 18:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-04 1:45 Nathan Froyd
2011-04-04 18:01 ` Jeff Law [this message]
2011-04-05 11:44 ` Nathan Froyd
2011-04-05 12:22 ` Richard Earnshaw
2011-04-05 12:30 ` Nathan Froyd
2011-04-05 12:55 ` Richard Earnshaw
2011-04-05 13:08 ` Jeff Law
2011-04-05 14:40 ` Richard Earnshaw
2011-04-05 18:10 ` Mike Stump
2011-04-05 19:18 ` Joseph S. Myers
2011-04-05 19:51 ` Nathan Froyd
2011-04-05 16:19 ` Jeff Law
2011-04-04 15:42 Steven Bosscher
2011-04-04 15:50 ` Nathan Froyd
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=4D9A0765.6020901@redhat.com \
--to=law@redhat.com \
--cc=froydnj@codesourcery.com \
--cc=gcc-patches@gcc.gnu.org \
/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).