[gnu.gcc] loop unwinder

ds65+@ANDREW.CMU.EDU (Daniel Stodolsky) (10/15/88)

Has there been any thought to building a loop unwinder into GCC? For small
{for,while,until} loops, unwinding can be
a real win in terms of reduced overhead. It is also adventageous on pipelined
machines where a jump messes up the pipeline.  Clearly, the usefulness of this
depends on the processor, cache, etc.  A flag to heurstically unwind 'small'
loops analagous to -finline-functions would be helpful, especially to people
porting numerical method codes.  The decision of how many times to unwind the
loop (or to do so at all) would be machine dependent. This would help making
portable, fast numerical codes. A constant dilema in numerical codes is how
much you should unwind in source code. Unwinding times 8 is good for some
machines, but processors with a small I-cache get hurt, etc.

Also,  a compiler flag to do all float only expression arithemtic as float
arithmetic instead of double arithmetic would be good.  Thought this certainly
not standard, it would be helpful. Another GCC extension?

Daniel Stodolsky
EDRC (Engineering Design Research Center)
Carneige-Mellon University