Partial dead code elimination on predicated code regions

This paper presents the design, implementation and experimental evaluation of a practical region-based partial dead code elimination (PDE) algorithm on predicated code in the Open Research Compiler framework. Existing PDE algorithms are not applicable on predicated code due to the existence of if-converted branches in the program. The proposed algorithm processes all PDE candidates in a worklist and considers their partial deadness using predicate partition graphs. Our algorithm operates uniformly on individual hyperblocks as well as regions comprising of basic blocks and hyperblocks. The result of applying our algorithm to a single-entry multiple-exit (SEME) region is optimal: partially dead code cannot be removed without changing the branching structure of the program or potentially introducing new predicate defining instructions. We present statistical evidence about the PDE opportunities in the 17 SPEC95 and SPEC00 integer benchmarks. Our algorithm achieves performance improvements in 12 out of the 17 benchmarks on an Itanium machine at small compilation overheads. Our results indicate that our algorithm can be used as a practical pass before instruction scheduling. Copyright © 2006 John Wiley & Sons, Ltd.

[1]  Scott A. Mahlke,et al.  The superblock: An effective technique for VLIW and superscalar compilation , 1993, The Journal of Supercomputing.

[2]  Richard Johnson,et al.  Analysis techniques for predicated code , 1996, Proceedings of the 29th Annual IEEE/ACM International Symposium on Microarchitecture. MICRO 29.

[3]  Richard E. Hank,et al.  Region-based compilation: an introduction and motivation , 1995, MICRO 1995.

[4]  David I. August,et al.  Systematic compilation for predicated execution , 2000 .

[5]  Scott Mahlke,et al.  Effective compiler support for predicated execution using the hyperblock , 1992, MICRO 1992.

[6]  Rajiv Gupta,et al.  Path profile guided partial dead code elimination using predication , 1997, Proceedings 1997 International Conference on Parallel Architectures and Compilation Techniques.

[7]  Scott A. Mahlke,et al.  IMPACT: an architectural framework for multiple-instruction-issue processors , 1991, ISCA '91.

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

[9]  David I. August,et al.  Accurate and efficient predicate analysis with binary decision diagrams , 2000, MICRO 33.

[10]  Jingling Xue,et al.  Optimal and efficient speculation-based partial redundancy elimination , 2003, International Symposium on Code Generation and Optimization, 2003. CGO 2003..

[11]  Roy Dz-Ching Ju,et al.  Global predicate analysis and its application to register allocation , 1996, Proceedings of the 29th Annual IEEE/ACM International Symposium on Microarchitecture. MICRO 29.

[12]  Mary Lou Soffa,et al.  Complete Removal of Redundant Computations , 1998, ACM-SIGPLAN Symposium on Programming Language Design and Implementation.

[13]  Raymond Lo,et al.  Partial redundancy elimination in SSA form , 1999, TOPL.

[14]  Steven S. Muchnick,et al.  Advanced Compiler Design and Implementation , 1997 .

[15]  Toshiaki Yasue,et al.  A region-based compilation technique for a Java just-in-time compiler , 2003, PLDI '03.

[16]  Rajiv Gupta,et al.  Complete removal of redundant expressions , 1998, PLDI 1998.

[17]  Ken Kennedy,et al.  Conversion of control dependence to data dependence , 1983, POPL '83.

[18]  Gurindar S. Sohi,et al.  Dynamic dead-instruction detection and elimination , 2002, ASPLOS X.

[19]  Kishore N. Menezes,et al.  Wavefront scheduling: path based data representation and scheduling of subgraphs , 1999, MICRO-32. Proceedings of the 32nd Annual ACM/IEEE International Symposium on Microarchitecture.

[20]  Bernhard Steffen,et al.  Partial dead code elimination , 1994, PLDI '94.

[21]  Scott A. Mahlke,et al.  A framework for balancing control flow and predication , 1997, Proceedings of 30th Annual International Symposium on Microarchitecture.

[22]  Yang Liu,et al.  A region-based compilation infrastructure , 2003, Seventh Workshop on Interaction Between Compilers and Computer Architectures, 2003. INTERACT-7 2003. Proceedings..

[23]  Roy Dz-Ching Ju,et al.  Partial Redundancy Elimination on Predicated Code , 2000, SAS.

[24]  Bernhard Steffen,et al.  Optimal code motion: theory and practice , 1994, TOPL.

[25]  Rajiv Gupta,et al.  Partial dead code elimination using slicing transformations , 1997, PLDI '97.

[26]  R. Fox Silence is golden. , 1998, Nursing standard (Royal College of Nursing (Great Britain) : 1987).