This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Linux and aliasing?
- To: "David S. Miller" <davem at redhat dot com>
- Subject: Re: Linux and aliasing?
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Sat, 05 Jun 1999 21:02:27 +0200
- CC: mark at codesourcery dot com, ak at muc dot de, law at cygnus dot com, jbuck at Synopsys dot COM, torvalds at transmeta dot com, craig at jcb-sc dot com, chip at perlsupport dot com, egcs at egcs dot cygnus dot com
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <18757.928523657@upchuck.cygnus.com> <37591A00.ACE54339@moene.indiv.nluug.nl> <19990605152349.A1923@fred.muc.de> <19990605104107T.mitchell@codesourcery.com> <199906051803.LAA15436@pizda.davem.net>
David S. Miller wrote:
> From: mark@codesourcery.com
> Date: Sat, 05 Jun 1999 10:41:07 -0700
> Furthermoe, I bet that by now, if all this energy had been spent
> fixing the code in the kernel, you'd have made good headway on some
> of the most prominent data structures. Yes, this will be a tedious
> chore, but it's an easy one: you enclose things in a union,
> compile, see what doesn't, fix it, and go on.
> What seems to be ignored are the future maintenance costs incurred by
> this set of changes to the kernel, as if "do it and get it over right
> now" is some triviality. Effort has been expended already to make
> attempts to do this (mentioned here by Andi Klein who did a run at it
> for the networking), and the findings made there support the
> non-triviality claim, in Andi's case he tossed the work midstream due
> to the non-stop overwhelming accumulation of issues.
If these issues are so pervasive, isn't it easier to use the compiler
flag -fno-strict-aliasing and document *that* ?
I mean, if this sort of trickery permeates the Linux kernel, you won't
get any mileage out of the new optimization anyway, so you could just as
well disable it.
[ Before anyone thinks *I* am a language purist: I know and have been
contributing code to our Numerical Weather Prediction programs that
willfully break Fortran alias assumptions. We get away by it because
it is mostly of the form "two arrays overlap completely", which -
up till now - doesn't seem to be fouled up by optimization passes in
existing Fortran compilers. That doesn't mean that I would beat a
compiler vendor over the head with a blunt object *before* I would
have checked that our sloppiness is not the cause of our troubles ]
--
Toon Moene (toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
GNU Fortran: http://world.std.com/~burley/g77.html