Please see the copyright notice below. Installation instructions are below too. This is a SUIF 1.1.2 / 1.3.0.5 pass to inline subroutines. It seems to work pretty well, but definitely has not been tested in all cases, so be careful. I've only used it in a Solaris environment. Input is a SUIF file or linked fileset, typically .spd, that has been run through "porky -no-call-expr". It is assumed that the input is High SUIF; it might work OK with Low SUIF, but I haven't tested that case. The operation of this pass can be broken into three distinct functions: 1) determining if it is desired to inline at a call site, 2) determining if it is legal to inline at a call site, and 3) performing the inlining transformation. Optionally, globalization of variables will be performed to make inlining legal at a site where it would otherwise not be legal. You will probably want to adjust (1) for your own purposes. Right now the pass looks at command-line options to determine which filters to apply. There are some useful subroutines that will tell you things about a call site or callee (whether any of the parameters are constant, whether the call site is inside a loop, etc.). Some of these routines optionally use memoization, which might save some time with big procedures; it's currently a compile time choice. If you wish to inline procedures across SUIF file boundaries, all SUIF files must be supplied simultaneously, and they must be a linked fileset (see the linksuif man page). This pass reads all procedures into memory simultaneously, so you might run into problems compiling very large benchmarks. Bug fixes & improvements are welcome. Send me a note if you want me to put you on the list announcing new releases. Acknowledgements: My support comes from DARPA and Synopsys. URL: http://brass.cs.berkeley.edu/~timothyc/inline/ - Tim Callahan ------------------------------------------------------------ BUILDING AND INSTALLING This should be familiar if you've built SUIF passes of your own or from third parties. 1) I'm assuming you have the appropriate environment variables set for SUIF -- in particular, $SUIFHOME and $COMPILER_NAME 2) Untar the distribution wherever you want; it creates an inline/ subdirectory. 3) 'cd' into the inline/ subdirectory and type 'make' 4) This should result in an executable named 'inline'. Typing 'make install' will put it into the SUIF binary directory ($SUIFHOME/$MACHINE/bin/). But you don't have to put it there; you can put it any directory in your path, e.g. ~/bin. FYI, this has been successfully compiled with SunOS 5.5.1 and 5.7, gcc 2.7.2 and 2.8.1. TESTING There is a simple program test.c, and two Makefile targets, 'test' and 'testclean'. Typing 'make test' will generate two output C files, test.inl.c (after inlining) and test.opt.c (after porky exploits the new optimzation opportunities). ------------------------------------------------------------ COPYRIGHT NOTICE Copyright (C) 1999. The Regents of the University of California (Regents). All Rights Reserved. Permission to use, copy, modify, and distribute this software and its documentation for educational, research, and not-for-profit purposes, without fee and without a signed licensing agreement, is hereby granted, provided that the above copyright notice, this paragraph and the following two paragraphs appear in all copies, modifications, and distributions. Contact The Office of Technology Licensing, UC Berkeley, 2150 Shattuck Avenue, Suite 510, Berkeley, CA 94720-1620, (510) 643-7201, for commercial licensing opportunities. Created by Timothy J. Callahan, Computer Science Division, Department of Electrical Engineering and Computer Science, University of California, Berkeley. IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.