Change search
ReferencesLink to record
Permanent link

Direct link
Modular cloning
Number of Authors: 1
2008 (English)Report (Other academic)
Abstract [en]

In this paper we deal with the problem of making context dependent interprocedural optimizations (where the legality of optimizing a function depends on properties of the callers of the function) effective and compatible with (a form of) separate compilation. We improve effectiveness by cloning, generating several versions of a single function optimized for different call sites. We attack the separate compilation problem, that code can not be generated until all calls of a function are known, by splitting the compilation process into two phases. The first phase analyses the modules one at a time in bottom-up dependency order ('main' is processed last) and produces code in an intermediate language where the constructs targeted by the optimization are annotated to control the application of the optimization. In cases where the legality of an optimization depends on properties of the callers of the function, these annotations can take the form of annotation variables which become extra formal parameters. The second phase traverses the modules in top-down dependency order, removing all of these extra parameters by specialization. We illustrate our approach with an integrated programming analysis and transformation system featuring a context sensitive type based analysis, cloning with sharing of identical clones and a modular implementation allowing for the compilation of large programs. The system implements cheap eagerness and redundant eval elimination for a lazy functional language.

Place, publisher, year, edition, pages
Swedish Institute of Computer Science , 2008, 1. , 13 p.
SICS Technical Report, ISSN 1100-3154 ; 2008:07
Keyword [en]
Modular compilation, cheap eagerness, cloning, static analysis, type inference, functional programming, optimization, program transformation
National Category
Computer and Information Science
URN: urn:nbn:se:ri:diva-22491OAI: diva2:1042056
Available from: 2016-10-31 Created: 2016-10-31

Open Access in DiVA

fulltext(262 kB)4 downloads
File information
File name FULLTEXT01.pdfFile size 262 kBChecksum SHA-512
Type fulltextMimetype application/pdf
fulltext(386 kB)0 downloads
File information
File name FULLTEXT02.psFile size 386 kBChecksum SHA-512
Type fulltextMimetype application/postscript

Computer and Information Science

Search outside of DiVA

GoogleGoogle Scholar
Total: 4 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

Total: 6 hits
ReferencesLink to record
Permanent link

Direct link