Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!hsdndev!cmcl2!lanl!cochiti.lanl.gov!jlg From: jlg@cochiti.lanl.gov (Jim Giles) Newsgroups: comp.lang.c Subject: Re: low level optimization Message-ID: <21868@lanl.gov> Date: 19 Apr 91 00:23:05 GMT References: <21660@lanl.gov> <1991Apr17.225944.15261@zoo.toronto.edu> <1991Apr18.190403.29049@Think.COM> <21846@lanl.gov> <1991Apr18.233807.19552@zoo.toronto.edu> Sender: news@lanl.gov Organization: Los Alamos National Laboratory Lines: 30 In article <1991Apr18.233807.19552@zoo.toronto.edu>, henry@zoo.toronto.edu (Henry Spencer) writes: |> In article <21846@lanl.gov> jlg@lanl.gov (Jim Giles) writes: |> >if the user chooses only to recompile one file and not any of the others |> >(which is allowed by the "may" clause), the implementation _must_ allow |> >this to be linked with the previously translated files to produce a |> >program. |> |> Of course, it may not run as fast as if he had compiled them all together. I see that I'm going to have to give a specific example. Suppose that functions A and B are in two separate files. Suppose that I compile them 'together' in some way (that is, the compiler makes some use of internal knowledge of B while translating A and vice-versa). Now, suppose I _change_ A and retranslate just A (I do _not_ retranslate B). The standard requires that I still be able to link both into a single program. If the translation of B made any _profitable_ use of internal information about A, then that information is obsolete (and probably downright _wrong_) after A has been changed. Yet, the standard requires that the new version of A still be usable with the previously translated B. Either the use the translator made of the interprocedural analysis was trivial, or B will contain unsafe optimizations - the only third way is if 'translation' does not include code generation (which will subsequently be done by some post-translation tool: like the loader - just like I keep saying). I don't understand why you continue to hang on like grim death to the fiction that dependent compilation satisfies the requirements of the standard. J. Giles