What is CMI?
Welcome to CMI the Cross-Module Inliner, from the Flux Research Group at the University of Utah's School of Computing.
CMI is an optimizing frontend for gcc which allows gcc to inline across module boundaries without requiring you to put inline functions in header files or even mark inline functions for inlining.
CMI is part of an ongoing R&D effort. We seek feedback, external users, and collaborators whose experiences and insight will help evolve CMI.
Making programs faster: In its default mode, CMI inlines functions which are small or called just once. This achieves respectable speedups at the cost of some code bloat.
Note that some programs go slower. This tends to happen when there is a single hotspot that has already been so carefully tuned so that any change will make things worse or where the program has many hotspots.
Note that the code size sometimes goes down. This is partly because CMI deletes dead code and partly because inlining isn't a simple space-time tradeoff.
Finally, note that CMI doesn't work on all programs. For example, the SPEC benchmark vortex declares a variable rows as both a pointer and an int. CMI can't resolve conflicts like this.
Using profile data to control code bloat: CMI can also use profiling data obtained from previous runs of your program. This achieves respectable speedups with very little code bloat.
Reducing Stack Size: CMI can be used to optimize for more than just speed and code size. For example, using a stack size analyzer to guide your choice of inlinings, you can reduce the stack requirements of embedded software. (This is described in more detail in Eliminating stack overflow by abstract interpretation. John Regehr, Alastair Reid and Kirk Webb, In Proceedings of the Third International Conference on Embedded Software (EMSOFT'03), Philadelphia, PA, October 15-17 2003.)
Download the distribution of your choice:
To build from source, you will need to install GHC 6.0 (a Haskell compiler) which is available for many platforms from http://haskell.org/ghc,
CMI is released under a GNU public license, version 2.
Problems? Contact the Flux Web Admin.
Last updated January 09, 2005.