Techniques for cross-module in-lining are disclosed. In an embodiment,
in-lining is done in conjunction with a 3-phase compiler including a
front-end phase, an IPA (Inter-Procedural Analysis) phase, and a back-end
phase. The front-end phase processes the source code in various modules
and provides the intermediate representations of such source code. The
IPA phase determines whether a function should be in-lined, and, if so,
provides in-line transformation instructions for the back-end phase to
execute. The back-end phase executes the instructions provided by the
IPA, which, in effect, transforms the in-lining code.