A higher-order strategy for eliminating common subexpressions

  • Authors:
  • R. Daniel Resler;Victor Winter

  • Affiliations:
  • Computer Science Department, Virginia Commonwealth University, School of Engineering, 601 West Main Street, Richmond, VA 23284, USA;Computer Science Department, University of Nebraska at Omaha, Omaha, NE 68182, USA

  • Venue:
  • Computer Languages, Systems and Structures
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

Optimizing compilers often perform an operation known as common subexpression elimination to improve code efficiency. Typically this is accomplished either by pruning a directed acyclic graph to replace eliminated subexpressions by memory fetches of stored values or by using partial-redundancy elimination, a data-flow analysis method. In this paper a higher-order strategic method is presented that rewrites expression trees to eliminate common subexpressions using equivalences in the lambda calculus. This approach offers several advantages-it is intuitive, transformations can be defined and applied within a high-level rewrite system, and it uses transformations for which correctness preservation can be proven.