A methodology for procedure cloning

Keith D. Cooper, Mary Hall, Ken Kennedy

Computer Languages · 1993 · 121 citations · 18 references

Concepts

TL;DR

Procedure cloning is an interprocedural transformation where the compiler creates specialized copies of procedure bodies, dividing incoming calls between the original and clones to allow better optimization. This paper presents a three-phase algorithm for deciding when to clone a procedure. The algorithm avoids unnecessary code growth by considering how information exposed by cloning will be used during optimization, under assumptions that bound its running time and code expansion.

Abstract

Procedure cloning is an interprocedural transformation where the compiler creates specialized copies of procedure bodies. The compiler divides incoming calls between the original procedure and its copies. By carefully partitioning the calls, the compiler ensures that each clone inherits an environment that allows for better code optimization. This paper presents a three-phase algorithm for deciding when to clone a procedure. The algorithm seeks to avoid unnecessary code growth by considering how the information exposed by cloning will be used during optimization. We present a set of assumptions that bound both the algorithm's running time and code expansion.

References

18