two objections to uglification

Dick Dunn <>
Thu, 1 Jun 89 17:11:16 MDT

          From comp.compilers

Related articles
two objections to uglification (Dick Dunn) (1989-06-01)
| List of all articles for this month |

Date: Thu, 1 Jun 89 17:11:16 MDT
From: Dick Dunn <>

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

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.