A compiler for multiple memory models

S. P. Midkiff, J. Lee, D. A. Padua

Research output: Contribution to journalArticle

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.

Original languageEnglish (US)
Pages (from-to)197-220
Number of pages24
JournalConcurrency Computation Practice and Experience
Volume16
Issue number2-3
DOIs
StatePublished - 2004

Keywords

  • Compilers
  • Explicit parallelism
  • Java
  • Memory models
  • Program analysis
  • Program optimization

ASJC Scopus subject areas

  • Software
  • Theoretical Computer Science
  • Computer Science Applications
  • Computer Networks and Communications
  • Computational Theory and Mathematics

Fingerprint Dive into the research topics of 'A compiler for multiple memory models'. Together they form a unique fingerprint.

  • Cite this