Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Subject: Re: low level optimization
Message-ID: <1991Apr18.180623.5721@zoo.toronto.edu>
Date: Thu, 18 Apr 1991 18:06:23 GMT
References: <andand.671719926@cia.docs.uu.se> <15828@smoke.brl.mil> <21527@lanl.gov> <15870@smoke.brl.mil> <21660@lanl.gov> <1991Apr17.225944.15261@zoo.toronto.edu> <21812@lanl.gov>
Organization: U of Toronto Zoology

In article <21812@lanl.gov> jlg@cochiti.lanl.gov (Jim Giles) writes:
>|> [...]                                           You do interprocedural
>|> analysis across all source files supplied to a single invocation of the
>|> compiler,  [...]
>
>And, if you subsequently change _some_ of those source files?  What 
>then?  Under this model, you'd have to recompile _all_ the others 
>that were originally compiled together...

Correct.  Arranging to do this is pretty trivial with something like make.
Of course, having to do it is a nuisance.  Using some sort of intermediate
form as the basis for interprocedural analysis could bypass *some* of the
overhead, but having to reprocess all the relevant code to some extent is
really rather fundamental to interprocedural optimization.

>... I'm just pointing out that it _does_ violate the
>standards of both Fortran and C which are defined to be separately
>compiled...

I can't speak for Fortran, but please cite chapter and verse out of X3.159
when you say this about C.  You are, simply, wrong.  You are confusing the
characteristics of specific implementations with what is mandated by the
standard.  There is *nothing* in ANSI C which demands classical separate
compilation or prevents interprocedural analysis.
-- 
And the bean-counter replied,           | Henry Spencer @ U of Toronto Zoology
"beans are more important".             |  henry@zoo.toronto.edu  utzoo!henry
