A higher-order strategy for eliminating common subexpressions

R. Daniel Resler, Victor Winter

Research output: Contribution to journalArticle

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.

Original languageEnglish (US)
Pages (from-to)341-364
Number of pages24
JournalComputer Languages, Systems and Structures
Volume35
Issue number4
DOIs
Publication statusPublished - Dec 1 2009

    Fingerprint

Keywords

  • Common subexpression elimination
  • Distributed data problem
  • Higher-order strategies
  • Program transformation
  • Rewriting
  • Strategic programming

ASJC Scopus subject areas

  • Software
  • Computer Networks and Communications

Cite this