Related articles |
---|
PC Compilers do more than propagate constants and hoist code STOODLEY@TOROLAB6.VNET.IBM.COM (1992-05-15) |
Re: PC Compilers do more than propagate constants and hoist code moss@cs.umass.edu (1992-05-15) |
Newsgroups: | comp.compilers |
From: | STOODLEY@TOROLAB6.VNET.IBM.COM |
Keywords: | MSDOS, optimize |
Organization: | Compilers Central |
Date: | Fri, 15 May 1992 12:46:21 GMT |
Cliff Click (cliffc@cs.rice.edu) writes:
< Compilers for supercomputers routinely distinguish between such loops
< (i.e. the 3 iteration loop being a candidate for unrolling). Also the
< live range of variables are often split around loops, so that variables
< are kept in registers in the loop, but perhaps in memory outside of the
< loop.
<
< PC compilers are now doing constant propagation and loop-invariant code
< motion, but aren't (that I know of) splitting live ranges up to avoid
< loads inside of loops. This could be a big win on machines with few
< registers.
<
< I'm not familiar with the quality of workstation compilers; I use gcc 2.1
< which looks to do about the same as the PC compilers.
I'm not sure which "PC" compilers Cliff is referring to, but I should like
to mention that the C Set/2 32-bit compiler for OS/2 2.0 does loop
unrolling. In addition, its local and global register assigners consider
register assignment to be simply a problem in live range splitting and
therefore do their very best to get loads out of loops and variables into
registers. Of course, there aren't very many registers on the X86 machine,
so it is more often impossible to get rid of all the loads than it is on
other architectures where a more generous supply of registers is available.
The compiler also does significant interprocedural analysis, prologue and
epilogue shrink wrapping, switch analysis, etc. (certainly too many to list
here). e-mail me if you're really interested.
In my experience, Watcom and Microsoft compilers also split live ranges to
improve loop performance, as well as a host of other optimizations above
and beyond constant propagation and loop invariant code motion--and have
been doing so for years.
Workstation compilers are generally of even higher sophistication.
Many are state of the art.
Kevin Stoodley stoodley@torolab6.vnet.ibm.com
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.