Static vs. dynamic analysis

"Chuck Lins" <chuck_lins@gateway.qm.apple.com>
Fri, 24 Apr 1992 20:08:00 GMT

          From comp.compilers

Related articles
register variables in C. eric@pencom.com (1992-04-22)
Re: register variables in C. dave.howell@ColumbiaSC.NCR.COM (Dave Howell) (1992-04-24)
Static vs. dynamic analysis chuck_lins@gateway.qm.apple.com (Chuck Lins) (1992-04-24)
Re: Static vs. dynamic analysis tmb@ai.mit.edu (1992-04-26)
Re: Static vs. dynamic analysis chambers@cs.washington.edu (1992-04-26)
Re: Static vs. dynamic analysis pardo@cs.washington.edu (1992-04-27)
Re: Static vs. dynamic analysis alex.zatsman@spd.analog.com (1992-05-11)
Re: Static vs. dynamic analysis stephen@estragon.uchicago.edu (1992-05-12)
| List of all articles for this month |
Newsgroups: comp.compilers
From: "Chuck Lins" <chuck_lins@gateway.qm.apple.com>
Keywords: analysis, optimize
Organization: Compilers Central
References: 92-04-108 92-04-125
Date: Fri, 24 Apr 1992 20:08:00 GMT

My general impression (from the literature) is that dynamic information is
usually better for the compiler than static information in producing good
code. The problem with dynamic (so-called trace) information is its
volume - there's lots of it! Especially if you're gathering it for
real-world programs. It doesn't seem cost-effective at present (though I'm
open to being disproved on this).


And there's no guarantee that any particular run is a typical run. Of
course, one tries to choose a typical run, but you can be wrong.


In theory, i could imagine a system where the compiler runs continuously
receiving trace information on each routine as it runs. The compiler
recompiles the routine based on the amortized the cost over the long run.
But this is in theory; i doubt this would be very practical.


I think the goal for static analysis is that it should be based on
empirical evidence from real-world programs. Unfortunately, the
hardware/compiler vendors having this information (eg IBM) keep it a
closely guarded secret. But it's probably unpublishable in the usual
journals due to sheer volume anyway. So the compiler folks implement some
code generation strategy that seems reasonable. Hopefully some bright PhD
student will come along and do a thesis on the technique showing how it
can be improved :-)


And there'll still be special situations that could have been coded better
by hand. I still believe that humans are superior to machines; but
machines can do a lot of the work for the normal cases. Leaves us humans
to do the things we do best - like thinking.


            Chuck Lins, Oberon-2 Paladin. lins@apple.com
--


Post a followup to this message

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