rcd@ico.ISC.com (Dick Dunn) (06/02/89)
I see a couple of likely objections to "uglification" in the sense of partial compilation as suggested in some recent articles. First, I think that reducing higher-level control structures to the "equivalent" conditional and unconditional transfers might lose useful information. Seems to me that you want to know that a loop was written with a looping construct because it suggests giving extra attention to the interior of the loop...execution frequency is likely to be higher. But maybe you can give that sort of attention to any region bounded by a backward control transfer. How do folks doing highly-optimizing compilers feel about losing the higher-level indications of what's going on? The other idea that bothers me is performing some "machine-independent optimizations" in the translation to ANDF. I heard Bill Wulf say "there is no such thing as a machine-independent optimization" and while I don't take quite that extreme a view, he's got a good point. Some examples: - inlining short procedures--may expand code size enough to swell critical regions of code beyond cache size - retaining common subexpressions--may cause register spills (in fact, note that these are really opposites of one another--one is code replication; the other is a coalescing!) - loop unrolling--causes code swelling as above, also very diffi- cult to guess overhead to find right amount of unrolling. --- Dick Dunn UUCP: {ncar,nbires}!ico!rcd (303)449-2870 -- Send compilers articles to compilers@ima.isc.com or, perhaps, Levine@YALE.EDU Plausible paths are { decvax | harvard | yale | bbn}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request