public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Michael Matz <matz@suse.de>
To: Aldy Hernandez <aldyh@redhat.com>
Cc: Richard Guenther <richard.guenther@gmail.com>,
	Andrew MacLeod <amacleod@redhat.com>,
	"Joseph S. Myers" <joseph@codesourcery.com>,
	Richard Henderson <rth@redhat.com>,
	gcc-patches <gcc-patches@gcc.gnu.org>, Jeff Law <law@redhat.com>
Subject: Re: [cxx-mem-model] disallow load data races (1 of some)
Date: Fri, 25 Mar 2011 15:27:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1103251613580.19760@wotan.suse.de> (raw)
In-Reply-To: <4D8C9140.3020506@redhat.com>

Hi,

On Fri, 25 Mar 2011, Aldy Hernandez wrote:

> > But speculative loads are never a problem.  So I'd like to avoid 
> > cluttering GCC code with stuff to avoid them.  I honestly don't care 
> > about diagnostic tools that fail to see if a value read is used or 
> > not.
> 
> Frankly, I agree.  The standard (and the aforementioned paper) says that 
> load data races are disallowed...
> 
> "If we had hypothetical hardware (or a virtual machine) that aborted the
> program when a race was detected, compilers would not be allowed to introduce
> potentially racing loads... even if the result of the load were unused would
> change the semantics of the program. Although such environments are not
> commonplace, they have certainly been proposed, and may well turn out to be
> very useful."
> 
> ...but, if there's no hardware for it, I see no need for spending time on
> this.

Even if there was such (IMO useless) hardware, or somebody would waste his 
time in writing such (equally useless) virtual machine that can detect 
fabricated problems somebody invented for some standard that never are 
going to be problems in the real world, we shouldn't feel obliged to 
uglify GCC for that.

(OTOH my opinion about the new c++ memory model is known ;) )


Ciao,
Michael.

  reply	other threads:[~2011-03-25 15:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-24 17:33 Aldy Hernandez
2011-03-24 19:58 ` Richard Henderson
2011-03-24 21:31   ` Aldy Hernandez
2011-03-24 21:51     ` Joseph S. Myers
2011-03-24 23:57       ` Andrew MacLeod
2011-03-25 10:03         ` Richard Guenther
2011-03-25 12:58           ` Aldy Hernandez
2011-03-25 15:27             ` Michael Matz [this message]
2011-03-25 15:33               ` Jeff Law
2011-03-25 15:35                 ` Jakub Jelinek
2011-03-25 15:46                   ` Richard Guenther
2011-03-29 16:52                     ` Aldy Hernandez
2011-03-31 13:12         ` Jeff Law
2011-03-31 13:32           ` Richard Guenther
2011-03-31 13:32             ` Jeff Law
2011-03-31 21:07               ` Michael Matz

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.1103251613580.19760@wotan.suse.de \
    --to=matz@suse.de \
    --cc=aldyh@redhat.com \
    --cc=amacleod@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=law@redhat.com \
    --cc=richard.guenther@gmail.com \
    --cc=rth@redhat.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).