Partial dead code elimination using slicing transformations

  • Authors:
  • Rastislav Bodík;Rajiv Gupta

  • Affiliations:
  • Dept. of Computer Science, University of Pittsburgh, Pittsburgh, PA;Dept. of Computer Science, University of Pittsburgh, Pittsburgh, PA

  • Venue:
  • Proceedings of the ACM SIGPLAN 1997 conference on Programming language design and implementation
  • Year:
  • 1997

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present an approach for optimizing programs that uncovers additional opportunities for optimization of a statement by predicating the statement. In this paper predication algorithms for achieving partial dead code elimination (PDE) are presented. The process of predication embeds a statement in a control flow structure such that the statement is executed only if the execution follows a path along which the value computed by the statement is live. The control flow restructuring performed to achieve predication is expressed through slicing transformations. This approach achieves PDE that is not realizable by existing algorithms. We prove that our algorithm never increases the operation count along any path, and that for acyclic code all partially dead statements are eliminated. The slicing transformation that achieves predication introduces into the program additional conditional branches. These branches are eliminated in a branch deletion step based upon code duplication. We also show how PDE can be used by acyclic schedulers for VLIW processors to reduce critical path lengths along frequently executed paths.