Testing your optimizing compilers

eugene@pioneer.arpa (Eugene Miya N.)
23 May 87 01:01:49 GMT

          From comp.compilers

Related articles
Testing your optimizing compilers eugene@pioneer.arpa (1987-05-23)
| List of all articles for this month |

From: eugene@pioneer.arpa (Eugene Miya N.)
Keywords: Functional testing of software, benchmarking, validation,
Date: 23 May 87 01:01:49 GMT
Original-sender: usenet@ames.UUCP
Organization: NASA Ames Research Center, Moffett Field, CA.

I was wondering about those of you who write compilers. How do you test
your optimizing compilers to make certain 1) that optimzations are
effective, 2) the final results are identical with an unoptimized piece
of code (or at least close), 3) that you don't have dead code in your
compiler, 4) optimizations don't interact to produce "harmful
side-effects [I do not assume a Functional language]?" Just how do you
go about testing your software? I know you should probably use
validation suites for the more standard language compilers, but
optimization appears less frequently tested.

I know about construction from Bill Wulf's book on the subject. One of
Wulf's students has the following nice table summarizing optimzation

%A Samuel P. Harbison
%T A Computer Architecture for the Dynamic Optimization of High-Level
Language Programs
%R CMU-CS-80-143
%I Computer Science Dept., Carnegie-Mellon University
%D September 1980

Table 2-2 Optimization Techniques
Loop manipulations
Constant folding
Constant propagation
CSE Elimination
Code motion
Strength reduction
Register allocations
Evaluation optimizations
Access mode determination
Variable packing
Tree transformations

I would like to make this a private discussion, please write me
directly. I will summarize only when an individual contributer gives me
authority (I'll even sign non-disclosure on this one.). Please try to
say at least a little which I could report back to the group.

--eugene miya
    NASA Ames Research Center
    "You trust the `reply' command with all those different mailers out there?"
    "Send mail, avoid follow-ups. If enough, I'll summarize."
[This is a fascinating question -- my experience is that optimizing compilers
are usually not well debugged. I've run into a fair number where it turned
out that some optimizations never happened, but since the output code gave
the correct results, nobody noticed for a long time. -John]

Post a followup to this message

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