Partial Inlining Using Local Graph Rewriting
Description
Inlining is an important optimization technique in any modern compiler, though the description of this technique in the literature is informal and vague. We describe a technique for inlining, designed to work on a flow graph of instructions of intermediate code.
Our technique uses local graph rewriting, making the semantic correctness of this technique obvious. In addition, we prove that the algorithm terminates.
As a direct result of the preservation of the semantics of the program after each local rewriting step, the algorithm can stop after any iteration, resulting in a partial inlining of the called function. Such partial inlining can be advantageous in order to avoid the inlining of code that is not performance critical, in particular for creating arguments and calls to error-signaling functions.
Files
partial-inlining.pdf
Files
(587.4 kB)
Name | Size | Download all |
---|---|---|
md5:28d68aa5cfbd21de463c1c2418b677e8
|
587.4 kB | Preview Download |