[comp.lang.misc] Loop unfolding

pardo@june.cs.washington.edu (David Keppel) (09/01/88)

rik@june.cs.washington.edu (Rik Littlefield) writes:
>[ code not handled by library routines and helped by unrolling]
>[ loop unrolling, structure copy, ... how else? ]

Perhaps I'm dreaming, but we've got all the tools if we want:
* Strong compiler technology.
* Programmer-supplied compiler hints.

Somebody (Chris Torek?) picked up the idea of making assertions on the
code to give ``noalias'' a run for the money.  This same kind of
assertion-driven technology is available to solve data bound problems,
and pragmas can give the compiler a hint that a particular section of
code needs to be worked on.

Those hints and assertions firmly in hand, the code can be passed off
to an optimizing compiler.  Loop unrolling, code hoisting, ... are all
well-understood technologies.  A restricted "best fit" technique may
be used to try *several different* optimizations, generate code for
each of them, count the cost of each generated fragment, then select
the one that does (appears to do) the best job.

That's what compilers are for, isn't it?

    ;-D on  ( My technology is bigger than your technology )  Pardo
-- 
		    pardo@cs.washington.edu
    {rutgers,cornell,ucsd,ubc-cs,tektronix}!uw-beaver!june!pardo