Publication
GCC and GNU Toolchain Developers' Summit 2005
Conference paper
Interprocedural constant propagation and method versioning in GCC
Abstract
In recent years interprocedural dataflow optimization and analysis became a standard part of optimizing compilers. We implemented such an optimization in GCC - interprocedural constant propagation (IPCP), which tries to determine which parameters of given methods are known to be constant at compile-time. In order to implement IPCP we used the interprocedural framework being developed in GCC. We also extended this framework to support versioning (a.k.a. specialization or cloning) of methods, to serve IPCP and other interprocedural optimizations. In this paper we describe both the IPCP algorithm and implementation, as well the versioning support. In addition, we outline future plans for further extensions of IPCP.