One embodiment disclosed relates to a method of compiling a computer
program from a plurality of files of source code. An inline analysis
determines which call sites in the plurality of files to make inline. An
inline transformation performs the inlining within currently opened
files. The transformer dynamically determines the order of inlines
independent of the analyzer by taking into account the disk input-output
pressure during compilation. The resulting inline order minimizes the
input and output of files from and to disk respectively by considering
the inline affinity between files and maintains the best run-time
performance by preserving the dependences between call sites. During the
inline transformation, a determination of which files to open and close
is made in dependence on an affinity weighting between the files. The
affinity and the dependence relationships are continuously updated in
order to generate the best transformation ordering among call sites that
ensures compile-time scalability and improved run-time performance.