public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [RFA] [PATCH] [PR tree-optimization/68619] Avoid direct cfg cleanups in tree-ssa-dom.c [1/3]
Date: Wed, 09 Dec 2015 08:31:00 -0000	[thread overview]
Message-ID: <5667E6EE.1060802@redhat.com> (raw)
In-Reply-To: <CAFiYyc3LT16MaxHYzPdeDZAqPUA8G+bd=1P_U8Qo7h02403VVA@mail.gmail.com>

On 12/08/2015 07:27 AM, Richard Biener wrote:
>>
>> I wonder if it makes more sense to integrate this with the
>> domwalker itself.  Add a constructor flag to it and do everything
>> in itself.  By letting the before_dom_children return a taken edge
>> (or NULL if unknown) it can drive the outgoing edge marking. And
>> the domwalk worker would simply not recurse to dom children for
>> unreachable blocks.
>
> So interface-wise do
[ ... ]
Close :-)

If skip_unreachable_blocks is true, then we want the walker to 
initialize EDGE_EXECUTABLE automatically.  So we drop the member 
initialization and constructor body from domwalk.h and instead have a 
ctor in domwalk.c where we can initialize the private members and set 
EDGE_EXECUTABLE as needed.

My first iteration let the clients clear EDGE_EXECUTABLE as they found 
conditionals that could be optimized.  That was pretty clean and 
localized in sccvn & dom.

If we have the before_dom_children return the taken edge, then we have 
to twiddle all the clients due to the api change in before_dom_children. 
  .  There's ~18 in total, so it's not too bad.

2 of the 18 clearly need to use the skip_unreachable_blocks capability 
(dom and sccvn).  2 others might be able to use it (tree-ssa-pre.c and 
tree-ssa-propagate.c)  I converted dom and sccvn, but not pre and the 
generic propagation engine.

I can submit the iteration which lets clients clear EDGE_EXECUTABLE, or 
the iteration where the clients return the taken edge (or NULL) from the 
before_dom_children callback.

Either is fine with me, so if you have a preference, let me know.

jeff

  reply	other threads:[~2015-12-09  8:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-08  6:15 Jeff Law
2015-12-08 14:23 ` Richard Biener
2015-12-08 14:27   ` Richard Biener
2015-12-09  8:31     ` Jeff Law [this message]
2015-12-09 10:45       ` Richard Biener
2015-12-08 23:00   ` Jeff Law
2015-12-08 15:36 ` Trevor Saunders
2015-12-09  0:44   ` 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=5667E6EE.1060802@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --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).