A methodology for procedure cloning

  • Authors:
  • Keith D Cooper;Mary W Hall;Ken Kennedy

  • Affiliations:
  • Department of Computer Science, Rice University, Houston, TX 77251, U.S.A.;Center for Integrated Systems, Stanford University, Stanford, CA 94305, U.S.A.;Department of Computer Science, Rice University, Houston, TX 77251, U.S.A.

  • Venue:
  • Computer Languages
  • Year:
  • 1993

Quantified Score

Hi-index 0.00

Visualization

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.