low level optimization

cs450a03 at uc780.umd.edu cs450a03 at uc780.umd.edu
Fri Apr 19 09:32:01 AEST 1991


Joe English writes:
   [about inter-procedural optimization]
>What happens, then, if you compile foo.c and bar.c together, and
>later change and recompile bar.c alone?  foo.o (or its equivalent)
>might have been optimized to use information that's no longer valid.
>Does the Standard say that it's OK for an implementation to require
>recompilation of foo.c at this point?

It might be worth pointing out that if a compiler was designed with
the option of doing inter-procedural analysis, and if that option were
used, there would be no need to have generated a "foo.o" in the first
place.

Note that I'm not saying that there would be no intermediate files,
just that they should not be confusable with intermediate files used
for independent compilation.

Also note that I'm not saying that the compiler couldn't generate
"foo.o" -- maybe somebody would throw in a switch to gratuiously
create independent object files even though compiling with
inter-procedural optimization turned on.

Finally, note that I know of no such compiler, and I'm not about to
write one.

Raul Rockwell



More information about the Comp.lang.c mailing list