public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Matz <matz@suse.de>
To: Alexandre Oliva <aoliva@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PR48866] three alternative fixes
Date: Mon, 30 May 2011 15:35:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1105301524060.9668@wotan.suse.de> (raw)
In-Reply-To: <orlixo1iih.fsf@livre.localdomain>

Hi,

On Mon, 30 May 2011, Alexandre Oliva wrote:

> > 3. expand dominators before dominated blocks, so that DEFs of 
> >    replaceable SSA names are expanded before their uses.  Expand them 
> >    when they're encountered, but not requiring a REG as a result.  
> >    Save the RTL expression that results from the expansion for use in 
> >    debug insns and at the non-debug use.
> 
> This patch addresses some of the problems in 2, avoiding expanding code 
> out of order within a block, and (hopefully) ensuring that, expanding 
> dominators before dominatedblocks, DEFs are expanded before USEs.  

That isn't necessary.  Replaceable SSA_NAMEs are defined in the same BB as 
their use, and hence they're expanded strictly before their use already 
right now.

> There is a theoretical possibility that a USE may be expanded before a 
> DEF, depending on internal details of out-of-ssa,

This can only happen with non-replaceable SSA_NAMEs and I thought you wish 
to deal only with replaceable.

That said, I dislike approach 2 for the same worries you noted.  And with 
the above I don't see why your approach (3) isn't workable without changes 
to the BB order, which should then be a really small patch.  As SSA_NAMEs 
are (fairly) dense it might be better to simply use an array instead of a 
pointer_map for the SSA_NAME->rtx mapping.


Ciao,
Michael.

  reply	other threads:[~2011-05-30 13:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-30 13:25 Alexandre Oliva
2011-05-30 13:34 ` Alexandre Oliva
2011-06-03  1:21   ` Alexandre Oliva
2012-04-09  6:08     ` Alexandre Oliva
2012-06-13  8:09       ` Alexandre Oliva
2011-05-30 14:30 ` Alexandre Oliva
2011-06-03  1:28   ` Alexandre Oliva
2011-06-03  1:37   ` Alexandre Oliva
2011-05-30 14:55 ` Alexandre Oliva
2011-05-30 15:35   ` Michael Matz [this message]
2011-06-01 22:31     ` Alexandre Oliva
2011-06-03  1:34   ` Alexandre Oliva

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=Pine.LNX.4.64.1105301524060.9668@wotan.suse.de \
    --to=matz@suse.de \
    --cc=aoliva@redhat.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).