Repository logo

Infoscience

  • English
  • French
Log In
Logo EPFL, École polytechnique fédérale de Lausanne

Infoscience

  • English
  • French
Log In
  1. Home
  2. Academic and Research Output
  3. Journal articles
  4. Optimizing Data Structures in High-Level Programs New Directions for Extensible Compilers based on Staging
 
research article

Optimizing Data Structures in High-Level Programs New Directions for Extensible Compilers based on Staging

Rompf, Tiark  
•
Sujeeth, Arvind K.
•
Amin, Nada  
Show more
2013
Acm Sigplan Notices

High level data structures are a cornerstone of modern programming and at the same time stand in the way of compiler optimizations. In order to reason about user or library-defined data structures, compilers need to be extensible. Common mechanisms to extend compilers fall into two categories. Frontend macros, staging or partial evaluation systems can be used to programmatically remove abstraction and specialize programs before they enter the compiler. Alternatively, some compilers allow extending the internal workings by adding new transformation passes at different points in the compile chain or adding new intermediate representation (IR) types. None of these mechanisms alone is sufficient to handle the challenges posed by high level data structures. This paper shows a novel way to combine them to yield benefits that are greater than the sum of the parts. Instead of using staging merely as a front end, we implement internal compiler passes using staging as well. These internal passes delegate back to program execution to construct the transformed IR. Staging is known to simplify program generation, and in the same way it can simplify program transformation. Defining a transformation as a staged IR interpreter is simpler than implementing a low-level IR to IR transformer. With custom IR nodes, many optimizations that are expressed as rewritings from IR nodes to staged program fragments can be combined into a single pass, mitigating phase ordering problems. Speculative rewriting can preserve optimistic assumptions around loops. We demonstrate several powerful program optimizations using this architecture that are particularly geared towards data structures: a novel loop fusion and deforestation algorithm, array of struct to struct of array conversion, object flattening and code generation for heterogeneous parallel devices. We validate our approach using several non trivial case studies that exhibit order of magnitude speedups in experiments.

  • Details
  • Metrics
Type
research article
DOI
10.1145/2480359.2429128
Web of Science ID

WOS:000318629900042

Author(s)
Rompf, Tiark  
Sujeeth, Arvind K.
Amin, Nada  
Brown, Kevin J.
Jovanovic, Vojin  
Lee, Hyoukjoong
Jonnalagedda, Manohar  
Olukotun, Kunle
Odersky, Martin  
Date Issued

2013

Publisher

Assoc Computing Machinery

Published in
Acm Sigplan Notices
Volume

48

Issue

1

Start page

497

End page

510

Subjects

Design

•

Languages

•

Performance

•

Staging

•

Code Generation

•

Data Structures

•

Extensible Compilers

Editorial or Peer reviewed

REVIEWED

Written at

EPFL

EPFL units
LAMP1  
Available on Infoscience
October 1, 2013
Use this identifier to reference this record
https://infoscience.epfl.ch/handle/20.500.14299/95983
Logo EPFL, École polytechnique fédérale de Lausanne
  • Contact
  • infoscience@epfl.ch

  • Follow us on Facebook
  • Follow us on Instagram
  • Follow us on LinkedIn
  • Follow us on X
  • Follow us on Youtube
AccessibilityLegal noticePrivacy policyCookie settingsEnd User AgreementGet helpFeedback

Infoscience is a service managed and provided by the Library and IT Services of EPFL. © EPFL, tous droits réservés