Re: Data Structure Reorganizing Optimizations

pardo@cs.washington.edu (David Keppel)
Wed, 9 Nov 1994 05:41:56 GMT

          From comp.compilers

Related articles
[8 earlier articles]
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)
Re: Data Structure Reorganizing Optimizations jeremy@sour.sw.oz.au (1994-11-02)
Re: Data Structure Reorganizing Optimizations prochak@cibadiag.com (1994-11-02)
Re: Data Structure Reorganizing Optimizations pardo@cs.washington.edu (1994-11-09)
Re: Data Structure Reorganizing Optimizations kendall@pot.East.Sun.COM (1994-11-05)
Re: Data Structure Reorganizing Optimizations praetorius@figs.enet.dec.com (1994-11-09)
Re: Data Structure Reorganizing Optimizations pjensen@csi.compuserve.com (1994-11-11)
Re: Data Structure Reorganizing Optimizations glew@ichips.intel.com (1994-11-13)
Re: Data Structure Reorganizing Optimizations glew@ichips.intel.com (1994-11-13)
Re: Data Structure Reorganizing Optimizations monnier@di.epfl.ch (1994-11-14)
[5 later articles]
| List of all articles for this month |
Newsgroups: comp.arch,comp.compilers
From: pardo@cs.washington.edu (David Keppel)
Keywords: C, optimize, design
Organization: Computer Science & Engineering, U. of Washington, Seattle
References: 94-10-108 94-10-207
Date: Wed, 9 Nov 1994 05:41:56 GMT

>>[Structure reordering operations?]


ddg@cci.com (D. Dale Gulledge) writes:
>[Completely rearranging the actual layout may not be possible
> in the general case.]


A few thoughts: to do structure reorganization you either need to


  - Change the programmer-visible language rules
  - Implement cleverly so the programmer sees behavior "as if"
      it was implemented according to the language rules (e.g.,
      all struct elements in ascending order).


Since we don't get to play with the language rules, we have to make do
with the second. C rules allow a programmer to take a pointer to a
structure element and use that pointer out of context of the structure.
That makes a variety of cases hard to implement efficiently.


Even the easier cases get hard when control passes across optimization
boundaries. These cases make things like whole-program optimizers much
more effective than single-file optimizers or single-procedure
optimizers.


Another detail is that programs still ultimately communicates with the
outside world, which means that even ``whole program'' optimization has
boundaries. If no structs or pointers into them are used for external
communication, everything is fine. If the structs are communicated
externally, a reorganized struct must be converted to the standard
representation before the external communication.


;-D on ( New World Reorder ) Pardo
--


Post a followup to this message

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