|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 firstname.lastname@example.org (1992-05-15)|
|Date:||Fri, 15 May 1992 12:46:21 GMT|
Cliff Click (email@example.com) 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
< 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
< 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 firstname.lastname@example.org
Return to the
Search the comp.compilers archives again.