Path: utzoo!attcan!uunet!dino!sharkey!msuinfo!news From: riordanmr@clvax1.cl.msu.edu (Mark Riordan) Newsgroups: comp.arch Subject: Inlining subroutines at link time Message-ID: <1990Jul3.194348.21178@msuinfo.cl.msu.edu> Date: 3 Jul 90 19:43:48 GMT Sender: news@msuinfo.cl.msu.edu Organization: Michigan State University Lines: 34 I just came across a CDC NOS/VE manual describing a facility to inline FORTRAN routines after compilation (essentially during linking). I no longer have access to a NOS/VE system, so I don't know how well this works, but it seems like a fairly unique feature to me. Have you folks ever heard of a similar system? I quote from the April 88 revision of the Control Data NOS/VE Object Code Management guide: "The AFTERBURN_OBJECT_TEXT command improves the execution time of FORTRAN Version 1 and Version 2 programs by inlining subprograms. Inlining a subprogram places the statements of the subprogram in the code where the routine is called. Inlining subprograms is an optimization process that trades space for execution time. Modules with inlined subprograms are larger, yet they execute faster because they avoid call and return instructions, which increase execution time. The afterburner works on bound modules and can be thought of as an extension to the binding process. A bound module is the usual input to the afterburner, but if an object file is used, all modules in the file are bound into one module named NEW. The output from the afterburner is a new module, with subprograms, or modules, expanded inline. The afterburner requires no source code changes. Existing programs or subroutines can have subprograms expanded inline without changing the program or subroutine. For example, a FORTRAN program can expand a math library routine inline without recompiling. Since afterburning occurs as a separate step after compilation, compilation time is not affected. The afterburned performs a cost/benefit analysis to determine if a specific routine should be brought inline. If a subroutine is called in two places, it might be profitable to inline the subroutine in one instance and not the other."