• Documents
  • Authors
  • Tables
  • Other Seers ▼
    RefSeer AckSeer CollabSeer SeerSeer
  • Log in
  • Sign up
  • MetaCart

CiteSeerX logo

Advanced Search Include Citations
Advanced Search Include Citations | Disambiguate

Compiling Standard ML For Efficient Execution On Modern Machines (1994)

by Zhong Shao
Add To MetaCart

Tools

Sorted by:
Results 11 - 13 of 13

Efficient and safe-for-space closure conversion

by Zhong Shao, Andrew W. Appel - ACM TOPLAS
"... Modern compilers often implement function calls (or returns) in two steps: first, a “closure ” environment is properly installed to provide access for free variables in the target program fragment; second, the control is transferred to the target by a “jump with arguments (or results). ” Closure con ..."
Abstract - Cited by 1 (0 self) - Add to MetaCart
Modern compilers often implement function calls (or returns) in two steps: first, a “closure ” environment is properly installed to provide access for free variables in the target program fragment; second, the control is transferred to the target by a “jump with arguments (or results). ” Closure conversion—which decides where and how to represent closures at runtime—is a crucial step in the compilation of functional languages. This paper presents a new algorithm that exploits the use of compile-time control and data flow information to optimize function calls. By extensive closure sharing and allocating as many closures in registers as possible, our new closure-conversion algorithm reduces heap allocation by 36 % and memory fetches for local and global variables by 43%; and improves the already efficient code generated by an earlier version of the Standard ML of New Jersey compiler by about 17 % on a DECstation 5000. Moreover, unlike most other approaches, our new closure-allocation scheme satisfies the strong safe-for-space-complexity rule, thus achieving good asymptotic space usage.

Using Program Structure to Guide Optimization in the Presence of First-Class Functions.

by David Tarditi , 1994
"... Compilers for functional languages such as Standard ML can do a good job compiling programs, especially programs that perform symbolic computation. However, they often do a poor job on programs in a wide range of real-world application domains, such as systems programming and scientific computing. O ..."
Abstract - Add to MetaCart
Compilers for functional languages such as Standard ML can do a good job compiling programs, especially programs that perform symbolic computation. However, they often do a poor job on programs in a wide range of real-world application domains, such as systems programming and scientific computing. One reason for this is that these compilers are not sensitive to program structure, that is, recursions ("loops"), the code executed during the evaluation of a recursive function ("loop bodies"), and recursive-function nesting ("loop nesting"). In part, this is because determining the code executed during evaluation of a recursive function and determining recursive-function nesting is difficult when functions are first-class values. The body of a recursive function may simply be a call to an unknown function. Recursivefunction nesting can be difficult to determine because functions may be passed off to be used elsewhere. However, even in situations where the program structure is easy to determine, the traditional emphasis on compiling function calls well instead of compiling recursions well has led to compilers that simply ignore recursions. In my thesis, I propose to demonstrate that it is practical for a realistic compiler to determine the structure of functional programs and to show that compilers for functional languages need to be sensitive to this information to do a good job compiling systems and scientific programs. Furthermore, I will show that being sensitive to program structure improves compilation of symbolic programs as well.

Consultant

by Lukasz Ziarek, Stephen Weeks, Suresh Jagannathan , 2004
"... Abstract. For functional programs, unboxing aggregate data structures such as tuples removes memory indirections and frees dead components of the decoupled structures. To explore the consequences of such optimizations in a whole-program compiler, this paper presents a tuple flattening transformation ..."
Abstract - Add to MetaCart
Abstract. For functional programs, unboxing aggregate data structures such as tuples removes memory indirections and frees dead components of the decoupled structures. To explore the consequences of such optimizations in a whole-program compiler, this paper presents a tuple flattening transformation and a framework that allows the formal study and comparison of different flattening schemes. We present our transformation over functional SSA, a simply-typed, monomorphic language and show that the transformation is type-safe. The flattening algorithm defined by our transformation has been incorporated into MLton, a wholeprogram, optimizing compiler for SML. Experimental results indicate that aggressive tuple flattening can lead to substantial improvements in runtime performance, a reduction in code size, and a decrease in total allocation without a significant increase in compilation time.
The National Science Foundation
  • About CiteSeerX
  • Submit Documents
  • Privacy Policy
  • Help
  • Data
  • Source
  • Contact Us

Developed at and hosted by The College of Information Sciences and Technology

© 2007-2010 The Pennsylvania State University