A compiler for multiple memory models: Research Articles

  • Authors:
  • S. P. Midkiff;J. Lee;D. A. Padua

  • Affiliations:
  • School of Electrical and Computer Engineering, Purdue University, West Lafayette, IN 47905-2305, U.S.A.;School of Computer Science and Engineering, Seoul National University, Seoul, Korea;Department of Computer Science, University of Illinois at Urbana-Champaign, Urbana-Champaign, IL 61801, U.S.A.

  • Venue:
  • Concurrency and Computation: Practice & Experience - Compilers for Parallel Computers
  • Year:
  • 2004

Quantified Score

Hi-index 0.01

Visualization

Abstract

The design of consistency models for both hardware and software is a difficult task. For a programming language, it is particularly difficult because the target audience for a high-level programming language is much wider than the target audience for a machine language, making usability a more important criterion. Exacerbating this problem is the reality that the programming language community has little experience designing programming language consistency models, and therefore each new attempt is very much a voyage into uncharted territory. A concrete example of the difficulties of the task is the current Java Memory Model. Although designed to be easy to use by Java programmers, it is poorly understood and at least one common idiom (the ‘double check idiom’) to exploit the model is unsafe. In this paper, we describe the design of an optimizing Java compiler that will accept either as input or as an interface implementation a consistency model for the code to be compiled. The compiler will use Shasha and Snir's delay set analysis, and our CSSA program representation to provide a canonical representation for the effects of different consistency models on optimizations and analysis. The compiler will serve as a testbed to prototype new memory models, and to measure the effects of different memory models on program performance. Copyright © 2004 John Wiley & Sons, Ltd.