(j3.2006) Compilation cascades

Van Snyder Van.Snyder at jpl.nasa.gov
Wed Aug 27 13:52:28 EDT 2008


Van Snyder wrote:

> We compare .mod files to avoid compilation cascades.
> 
> I noticed that if I add a PRINT statement to a module procedure, several
> processors produce a different .mod file.
> 
> This seems a bit bizarre.  Is it really necessary?
> 
> Some processors put a time stamp in the .mod file, but we've figured out
> how to get around that.

Robert Corbett commented

! Some compilers put representations of the code for module procedures
! in the .mod files they generate.  This allows inlining module
! procedures, which are often short.  It is not necessary, but it can
! be a big performance advantage.  Of course, if you use such a compiler,
! the compilation cascades are pretty much necessary for correct
! operation.  If a module procedure that has been inlined has been
! modified, all files that include procedure references that
! reference one of the module procedures must be recompiled.

That would explain why the .mod file would be different no matter what
change I make.  Why would the .mod file be different only if I inserted
a PRINT statement (or deleted them all)?

-- 
Van Snyder                    |  What fraction of Americans believe 
Van.Snyder at jpl.nasa.gov       |  Wrestling is real and NASA is fake?
Any alleged opinions are my own and have not been approved or
disapproved by JPL, CalTech, NASA, the President, or anybody else.



More information about the J3 mailing list