low level optimization

Barry Margolin barmar at think.com
Fri Apr 19 15:50:02 AEST 1991


In article <21846 at lanl.gov> jlg at lanl.gov (Jim Giles) writes:
>The standard _allows_ the _USER_ to decide whether to compile separately
>or together.  In the standard, the word "may" applies to user choices,
>the corresponding constraint on implementations is that it _must_ work
>correctly when the user chooses to exercise the feature.  In this case,
>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.

Once you invoke the implementation's extension that does inter-module
optimization (why does everyone keep calling this interprocedural analysis?
that usually refers to optimization across procedures within the same
file), you have ventured outside the scope of the standard, just as if you
had invoked a compiler option that enables some implementation-specific
feature.

Rather than referring specifically to files, the standard probably should
have described the behavior in terms of "translation units", which could
encompass multiple source files.  This would have allowed multifile
compilation to be defined in the standard, rather than making it an
extension, and then the semantics would be covered by the section you
quoted.
--
Barry Margolin, Thinking Machines Corp.

barmar at think.com
{uunet,harvard}!think!barmar



More information about the Comp.lang.c mailing list