A modular memory optimization for synchronous data-flow languages
Authors:
Open Access
- 12 June 2012
- conference paper
- Published by Association for Computing Machinery (ACM)
- p. 51-60
Abstract
The generation of efficient sequential code for synchronous data-flow languages raises two intertwined issues: control and memory optimization. While the former has been extensively studied, for instance in the compilation of Lustre and Signal, the latter has only been addressed in a restricted manner. Yet, memory optimization becomes a pressing issue when arrays are added to such languages. This article presents a two-level solution to the memory optimization problem. It combines a compile-time optimization algorithm, reminiscent of register allocation, paired with language annotations on the source given by the designer. Annotations express in-place modifications and control where allocation is performed. Moreover, they allow external functions performing in-place modifications to be safely imported. Soundness of annotations is guaranteed by a semilinear type system and additional scheduling constraints. A key feature is that annotations for well-typed programs do not change the semantics of the language: removing them may lead to less efficient code but will not alter the semantics. The method has been implemented in a new compiler for a LUSTRE-like synchronous language extended with hierarchical automata and arrays. Experiments show that the proposed approach removes most of the unnecessary array copies, resulting in faster code that uses less memory.Keywords
This publication has 17 references indexed in Scilit:
- Formal verification of a realistic compilerCommunications of the ACM, 2009
- Scheduling Tasks to Maximize Usage of Aggregate Variables in Place2009
- The synchronous languages 12 years laterProceedings of the IEEE, 2003
- Compile‐time copy eliminationSoftware: Practice and Experience, 1993
- Synchronous programming with events and relations: the SIGNAL language and its semanticsScience of Computer Programming, 1991
- How to make destructive updates less destructive1991
- Generating efficient code from data-flow programs1991
- Linear logicTheoretical Computer Science, 1987
- Register allocation via coloringComputer Languages, 1981
- New methods to color the vertices of a graphCommunications of the ACM, 1979