public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: Michael Matz <matz@suse.de>
Cc: Jan Hubicka <jh@suse.cz>, Andi Kleen <ak@suse.de>,
		gcc-patches@gcc.gnu.org
Subject: Re: "+m" constraints bogus?
Date: Wed, 25 Jul 2007 15:59:00 -0000	[thread overview]
Message-ID: <20070725155145.GB27434@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <Pine.LNX.4.64.0707251430191.23011@wotan.suse.de>

Hi,
thanks for pointer!
> here:
> http://gcc.gnu.org/ml/gcc-patches/2003-12/msg01358.html
> 
> It describes the potential problem again, and I know of no changes in 
> reload which would have magically handled matching mem-only constraints.  
> I believe the problem currently only doesn't exist because the 
> gimplification mentioned by Andrew doesn't let +m come through to RTL.  So 
> it would probably be best to ensure that it stays that way, and maybe add 
> an assert instead of the warning, that we don't see matching or inout 
> constraints which don't allow registers.

Perhaps, we however still would need to warn about:
asm __volatile__ ("":"=m"(a):"0"(a));
(which correctly triggers the warning in question)
> 
> For reference, the potential problem in reload is the following: matching 
> constraints might result in invalid operands (address not using the same 
> pseudo in our case, for instance) for which reloads are pushed.  Such 
> pushed reloads can only be satisfied by a register in an appropriate class 
> (the reload reg).  If the alternative doesn't allow any registers such 
> reload can _never_ be satisfied --> boom.  That's the old problem of 
> reload that it can't reload by using memory.

Yep, I am aware of those problems (reload dying in horrible death as
soon as something didn't ended up matching). I was somewhat confused
thinking that gimplifier gimplifies into the pair as in my testcase
above, not the "=m" "m" pair.

I guess we are safe now support them so I would just update the manual
with a simple testcase so we know gimplifier does not break and we won't
re-start emitting the warning?

Honza
> 
> 
> Ciao,
> Michael.

  reply	other threads:[~2007-07-25 15:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200707231815.49723.ak@suse.de>
2007-07-23 17:37 ` Jan Hubicka
2007-07-24 16:51   ` Michael Matz
2007-07-24 18:18     ` Jan Hubicka
2007-07-24 18:53       ` Andrew Pinski
2007-07-25  9:22         ` Jan Hubicka
2007-07-25 13:23       ` Michael Matz
2007-07-25 15:59         ` Jan Hubicka [this message]
2007-07-25 16:02           ` Michael Matz
2007-07-25 16:10             ` Jan Hubicka
2007-07-25 16:11               ` Michael Matz
2007-07-25 18:45                 ` 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=20070725155145.GB27434@atrey.karlin.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --cc=ak@suse.de \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jh@suse.cz \
    --cc=matz@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).