Using Algebraic Transformations to Optimize Expression Evaluation in Scientific Code

  • Authors:
  • Julien Zory;Fabien Coelho

  • Affiliations:
  • -;-

  • Venue:
  • PACT '98 Proceedings of the 1998 International Conference on Parallel Architectures and Compilation Techniques
  • Year:
  • 1998

Quantified Score

Hi-index 0.00

Visualization

Abstract

Algebraic properties such as associativity or distributivity allow the manipulation of a set of mathematically equivalent expressions. However, as shown in this paper, the cost of evaluating such expressions on a computer is not constant within this domain. We suggest the use of algebraic transformations to improve the performance of computationally intensive applications on modern computer architectures. We claim that taking into account instruction-level parallelism and the new capabilities of processors when applying these transformations leads to large run-time improvements. Due to a combinatorial explosion, associative-commutative pattern-matching techniques cannot systematically be used in this context. Thus, we introduce two performance enhancing algorithms providing factorization and multiply-add extraction heuristics and choice criteria based on a simple cost model. This paper describes our approach and a first implementation. Experiments on real code, including an excerpt from SPEC FP95, are very promising since we automatically obtain the same results as manual transformations, with a performance improvement by a factor of up to 3.