|small C++ classes email@example.com (Werner Geurts) (1997-12-12)|
|Re: small C++ classes firstname.lastname@example.org (Jason Merrill) (1997-12-13)|
|Re: small C++ classes email@example.com (Jason Merrill) (1997-12-15)|
|Re: small C++ classes firstname.lastname@example.org (Shankar Unni) (1997-12-19)|
|From:||Shankar Unni <email@example.com>|
|Date:||19 Dec 1997 00:15:41 -0500|
|Organization:||Powertel Global, Inc.|
Werner Geurts wrote:
> I am looking for information on storage allocation for small C++
> classes like point or complex, that contain only a few scalar data
> members. Are there any C++ compilers that allocate (the members of)
> such object to the register set instead of to memory? Under what
> conditions can this be done? During which compilation step can this
> be done?
> I am looking for pointers to papers or other resources that describe
> this optimisation.
Several compilers do some form of this optimization. Many split small
structures with simple layouts (one or two word-size fields) into
individual values when passing the structure by value. This also applies
to simple C++ classes like "complex", and to Fortran (-90?) structures
Likewise, such objects can also be kept in registers for their lifetime
with some basic analysis.
The KAI compiler does these things, as does SGI's 7.x compilers that I
know of, and quite probably many others as well..
Benchmarks like OOPACK test these styles of optimizations on typical
Shankar Unni Powertel Global, Inc.
(650) 259-1700 firstname.lastname@example.org
(650) 259-1702 (fax) email@example.com
Return to the
Search the comp.compilers archives again.