From: Rogier Wolff <R.E.Wolff@BitWizard.nl>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch 4/21] fix ARCH_HAS_PREFETCH
Date: Wed, 14 Aug 2002 19:40:19 +0200 [thread overview]
Message-ID: <20020814194019.A31761@bitwizard.nl> (raw)
In-Reply-To: <ajc095$hk1$1@cesium.transmeta.com>
On Tue, Aug 13, 2002 at 03:12:53PM -0700, H. Peter Anvin wrote:
> Followup to: <Pine.NEB.4.44.0208132322340.1351-100000@mimas.fachschaften.tu-muenchen.de>
> By author: Adrian Bunk <bunk@fs.tum.de>
> In newsgroup: linux.dev.kernel
> > >
> > > Because the compiler sees:
> > >
> > > for (i = 0; i < N; i++)
> > > ;
> > >
> > > and it says "ah ha. A busy wait delay loop" and leaves it alone.
> > >
> > > It's actually a special-case inside the compiler to not optimise
> > > away such constructs.
> >
> > Why is this a special case? As long as a compiler can't prove that the
> > computed value of i isn't used later it mustn't optimize it away.
> >
>
> Bullsh*t. It can legitimately transform it into:
>
> i = N;
Right! But people are confusing "practise", "published interface", and
"spec" again.
Published interface in this case is that gcc will not optimize an empty
loop away, as it is often used to generate a timing loop.
Roger.
--
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
* There are old pilots, and there are bold pilots.
* There are also old, bald pilots.
next prev parent reply other threads:[~2002-08-14 17:36 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-11 7:38 [patch 4/21] fix ARCH_HAS_PREFETCH Andrew Morton
2002-08-11 19:49 ` Alan Cox
2002-08-11 18:47 ` Andrew Morton
2002-08-11 18:46 ` Larry McVoy
2002-08-11 19:06 ` Linus Torvalds
2002-08-11 20:07 ` GCC still keeps empty loops? (was: [patch 4/21] fix ARCH_HAS_PREFETCH) Jamie Lokier
2002-08-12 7:45 ` Ralf Baechle
2002-08-13 21:42 ` [patch 4/21] fix ARCH_HAS_PREFETCH Adrian Bunk
2002-08-13 22:12 ` H. Peter Anvin
2002-08-13 22:22 ` Adrian Bunk
2002-08-13 22:42 ` H. Peter Anvin
2002-08-14 17:40 ` Rogier Wolff [this message]
2002-08-14 19:41 ` H. Peter Anvin
2002-08-14 19:57 ` Jamie Lokier
2002-08-14 22:03 ` Daniel Jacobowitz
2002-08-14 20:45 ` Willy Tarreau
2002-08-14 20:58 ` H. Peter Anvin
2002-08-14 21:11 ` Willy Tarreau
2002-08-14 21:13 ` H. Peter Anvin
2002-08-15 1:23 ` Alan Cox
2002-08-15 1:28 ` H. Peter Anvin
2002-08-15 1:37 ` Alan Cox
2002-08-14 22:53 ` David Lang
2002-08-14 23:31 ` Jamie Lokier
2002-08-15 6:44 ` Willy Tarreau
2002-08-15 6:55 ` H. Peter Anvin
[not found] <3D56147E.15E7A98@zip.com.au.suse.lists.linux.kernel>
2002-08-11 9:53 ` Andi Kleen
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=20020814194019.A31761@bitwizard.nl \
--to=r.e.wolff@bitwizard.nl \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.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