Deutsch   English   Français   Italiano  
<jwvser449xz.fsf-monnier+comp.arch@gnu.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Stefan Monnier <monnier@iro.umontreal.ca>
Newsgroups: comp.arch
Subject: Re: Memory ordering
Date: Tue, 03 Dec 2024 18:37:41 -0500
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <jwvser449xz.fsf-monnier+comp.arch@gnu.org>
References: <vfono1$14l9r$1@dont-email.me> <vh4530$2mar5$1@dont-email.me>
	<-rKdnTO4LdoWXKj6nZ2dnZfqnPWdnZ2d@supernews.com>
	<vh5t5b$312cl$2@dont-email.me>
	<5yqdnU9eL_Y_GKv6nZ2dnZfqn_GdnZ2d@supernews.com>
	<2024Nov15.082512@mips.complang.tuwien.ac.at>
	<vh7ak1$3cm56$1@dont-email.me> <20241115152459.00004c86@yahoo.com>
	<vh8bn7$3j6ql$1@dont-email.me> <vhb2dc$73fe$1@dont-email.me>
	<vhct2q$lk1b$2@dont-email.me>
	<2024Nov17.161752@mips.complang.tuwien.ac.at>
	<vhh16e$1lp5h$1@dont-email.me>
	<2024Dec3.100144@mips.complang.tuwien.ac.at>
	<vin2rp$3ofc$1@dont-email.me>
	<3aa9f0a3d3dde86193abb1c01e52d03a@www.novabbs.org>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Wed, 04 Dec 2024 00:37:42 +0100 (CET)
Injection-Info: dont-email.me; posting-host="c66a6dbeddf801ae87a9f94174194f38";
	logging-data="454688"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18jtin+IHYBRt8eXrYREh9N8NYykzZHXX4="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:cOXgE12H5u/a3nEmhM7D06krs4I=
	sha1:+fS5HrwcvlfiUfZNT0USloNtqIs=
Bytes: 2064

>>                                           If there are places
>> in the code it doesn't know this can't happen it won't optimize
>> across it, more or less.
>
> The problem is HOW to TELL the COMPILER that these memory references
> are "more special" than normal--when languages give few mechanisms.

We could start with something like

    critical_region {
      ...
    }

such that the compiler must refrain from any code motion within
those sections but is free to move things outside of those sections as if
execution was singlethreaded.


        Stefan