Using profile information to assist classic code optimizations

This paper describes the design and implementation of an optimizing compiler that automatically generates profile information to assist classic code optimizations. This compiler contains two new components, an execution profiler and a profile‐based code optimizer, which are not commonly found in traditional optimizing compilers. The execution profiler inserts probes into the input program, executes the input program for several inputs, accumulates profile information and supplies this information to the optimizer. The profile‐based code optimizer uses the profile information to expose new optimization opportunities that are not visible to traditional global optimization methods. Experimental results show that the profile‐based code optimizer significantly improves the performance of production C programs that have already been optimized by a high‐quality global code optimizer.

[1]  Joseph A. Fisher,et al.  Trace Scheduling: A Technique for Global Microcode Compaction , 1981, IEEE Transactions on Computers.

[2]  P ChangPohua,et al.  Using profile information to assist classic code optimizations , 1991 .

[3]  T. M. Conte,et al.  Comparing software and hardware schemes for reducing the cost of branches , 1989, ISCA '89.

[4]  David W. Wall,et al.  Global register allocation at link time , 1986, SIGPLAN '86.

[5]  Susan L. Graham,et al.  Gprof: A call graph execution profiler , 1982, SIGPLAN '82.

[6]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[7]  John R. Ellis,et al.  Bulldog: A Compiler for VLIW Architectures , 1986 .

[8]  W. W. Hwu,et al.  Achieving high instruction cache performance with an optimizing compiler , 1989, ISCA '89.

[9]  Vivek Sarkar,et al.  Partitioning and Scheduling Parallel Programs for Multiprocessing , 1989 .

[10]  Susan L. Graham,et al.  An execution profiler for modular programs , 1983, Softw. Pract. Exp..

[11]  Wen-mei W. Hwu,et al.  Control flow optimization for supercomputer scalar processing , 1989, ICS '89.

[12]  Karl Pettis,et al.  Profile guided code positioning , 1990, PLDI '90.

[13]  Wen-mei W. Hwu,et al.  Trace Selection For Compiling Large C Application Programs To Microcode , 1988, [1988] Proceedings of the 21st Annual Workshop on Microprogramming and Microarchitecture - MICRO '21.

[14]  Vivek Sarkar,et al.  Determining average program execution times and their variance , 1989, PLDI '89.

[15]  情報処理学会 The 13th Annual International Symposium on Computer Architecture, June 2-5, 1986, Tokyo, Japan : conference proceedings , 1986 .