public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Richard Biener <rguenther@suse.de>
Cc: Alan Lawrence <alan.lawrence@arm.com>,
	gcc-patches@gcc.gnu.org,        jakub@redhat.com
Subject: Re: [PATCH] Empty redirect_edge_var_map after each pass and function
Date: Wed, 02 Dec 2015 14:14:00 -0000	[thread overview]
Message-ID: <565EFCA7.5080905@redhat.com> (raw)
In-Reply-To: <alpine.LSU.2.11.1512020928180.4884@t29.fhfr.qr>

On 12/02/2015 01:33 AM, Richard Biener wrote:
>> Right.  So the question I have is how/why did DOM leave anything in the map.
>> And if DOM is fixed to not leave stuff lying around, can we then assert that
>> nothing is ever left in those maps between passes?  There's certainly no good
>> reason I'm aware of why DOM would leave things in this state.
>
> It happens not only with DOM but with all passes doing edge redirection.
> This is because the map is populated by GIMPLE cfg hooks just in case
> it might be used.  But there is no such thing as a "start CFG manip"
> and "end CFG manip" to cleanup such dead state.
Sigh.

>
> IMHO the redirect-edge-var-map stuff is just the very most possible
> unclean implementation possible. :(  (see how remove_edge "clears"
> stale info from the map to avoid even more "interesting" stale
> data)
>
> Ideally we could assert the map is empty whenever we leave a pass,
> but as said it triggers all over the place.  Even cfg-cleanup causes
> such stale data.
>
> I agree that the patch is only a half-way "solution", but a full
> solution would require sth more explicit, like we do with
> initialize_original_copy_tables/free_original_copy_tables.  Thus
> require passes to explicitely request the edge data to be preserved
> with a initialize_edge_var_map/free_edge_var_map call pair.
>
> Not appropriate at this stage IMHO (well, unless it turns out to be
> a very localized patch).
So maybe as a follow-up to aid folks in the future, how about a 
debugging verify_whatever function that we can call manually if 
debugging a problem in this space.  With a comment indicating why we 
can't call it unconditionally (yet).


jeff

  reply	other threads:[~2015-12-02 14:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-01 18:34 Alan Lawrence
2015-12-01 22:38 ` Jeff Law
2015-12-02  8:33   ` Richard Biener
2015-12-02 14:14     ` Jeff Law [this message]
2015-12-03 12:49       ` Alan Lawrence
2015-12-03 12:58         ` Richard Biener
2015-12-03 13:07           ` Richard Biener
2015-12-03 14:49           ` Alan Lawrence
2015-12-03 14:56             ` Richard Biener
2015-12-02  8:36 ` Richard Biener
2015-12-02 14:15   ` Jeff Law

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=565EFCA7.5080905@redhat.com \
    --to=law@redhat.com \
    --cc=alan.lawrence@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=rguenther@suse.de \
    /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).