Re: Data Structure Reorganizing Optimizations

bret@icicle.winternet.com (Bret Indrelee)
Sun, 23 Oct 1994 16:54:17 GMT

          From comp.compilers

Related articles
CProf cache profiling system available david@cs.wisc.edu (1994-10-13)
Data Structure Reorganizing Optimizations [Was: Re: CProf cache profil glew@ichips.intel.com (1994-10-19)
Re: Data Structure Reorganizing Optimizations john@iastate.edu (1994-10-22)
Re: Data Structure Reorganizing Optimizations robertb@HING.LCS.MIT.EDU (1994-10-26)
Re: Data Structure Reorganizing Optimizations johnm@cory.EECS.Berkeley.EDU (1994-10-22)
Re: Data Structure Reorganizing Optimizations stripes@uunet.uu.net (1994-10-27)
Re: Data Structure Reorganizing Optimizations bret@icicle.winternet.com (1994-10-23)
Data Structure Reorganizing Optimizations leichter@zodiac.rutgers.edu (1994-10-31)
Re: Data Structure Reorganizing Optimizations yuri@shimari.cmf.nrl.navy.mil (1994-10-31)
Re: Data Structure Reorganizing Optimizations ddg@cci.com (1994-10-31)
Re: Data Structure Reorganizing Optimizations amos@nsof.co.il (1994-11-01)
Re: Data Structure Reorganizing Optimizations pardo@cs.washington.edu (1994-10-31)
Re: Data Structure Reorganizing Optimizations fjh@munta.cs.mu.OZ.AU (1994-11-02)
[14 later articles]
| List of all articles for this month |

Newsgroups: comp.arch,comp.compilers
From: bret@icicle.winternet.com (Bret Indrelee)
Keywords: optimize
Organization: StarNet Communications, Inc
References: 94-10-108 94-10-141
Date: Sun, 23 Oct 1994 16:54:17 GMT

Andy Glew <glew@ichips.intel.com> wrote:
>I am aware of the K&R rule that structure elements be in increasing
>order of address. But, since the contiguity requirement has been
>dropped, and since different machines have different padding rules,
>what value does the address ordering rule have? Even network header
>code cannot be written portably using structures to access data
>structures placed in memory from DMA devices.


Actually, I've had good luck with just filling my structures with
proper padding in order to use structures for register access. If
the structure is already aligned, I haven't found any compilers that
insert padding.


It may not be strictly compliant code, but it is close enough to
work on several workstations. If you were to allow re-ordering,
this sort of stuff would probably break on a large share of the
workstations.


Even though almost all the workstation venders seem to hate it,
I find that memory mapped I/O is a lot faster to write and debug
than the alternatives I've seen.


If reordering does get into the next rev of ANSI C, I hope they
will also give us the constructs to force alignment to a certain
boundary, check alignment, and also declare something as a
hardware port. All of these things are done in device drivers.
Something a little stronger than the volatile type modifier, that
is.


-Bret
--
Bret Indrelee
bret@winternet.com
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.