Results 1 -
6 of
6
Secrets of the Glasgow Haskell Compiler inliner
- Journal of Functional Programming
, 1999
"... Higher-order languages, such as Haskell, encourage the programmer to build abstractions by composing functions. A good compiler must inline many of these calls to recover an efficiently executable program. In principle, inlining is dead simple: just replace the call of a function by an instance of i ..."
Abstract
-
Cited by 39 (5 self)
- Add to MetaCart
Higher-order languages, such as Haskell, encourage the programmer to build abstractions by composing functions. A good compiler must inline many of these calls to recover an efficiently executable program. In principle, inlining is dead simple: just replace the call of a function by an instance of its body. But any compilerwriter will tell you that inlining is a black art, full of delicate compromises that work together to give good performance without unnecessary code bloat. The purpose of this paper is, therefore, to articulate the key lessons we learned from a full-scale "production" inliner, the one used in the Glasgow Haskell compiler. We focus mainly on the algorithmic aspects, but we also provide some indicative measurements to substantiate the importance of various aspects of the inliner. 1 Introduction One of the trickiest aspects of a compiler for a functional language is the handling of inlining. In a functional-language compiler, inlining subsumes several other optimisatio...
A Survey of Adaptive Optimization in Virtual Machines
- PROCEEDINGS OF THE IEEE, 93(2), 2005. SPECIAL ISSUE ON PROGRAM GENERATION, OPTIMIZATION, AND ADAPTATION
, 2004
"... Virtual machines face significant performance challenges beyond those confronted by traditional static optimizers. First, portable program representations and dynamic language features, such as dynamic class loading, force the deferral of most optimizations until runtime, inducing runtime optimiza ..."
Abstract
-
Cited by 26 (5 self)
- Add to MetaCart
Virtual machines face significant performance challenges beyond those confronted by traditional static optimizers. First, portable program representations and dynamic language features, such as dynamic class loading, force the deferral of most optimizations until runtime, inducing runtime optimization overhead. Second, modular
A Comparative Study of Static and Profile-Based Heuristics for Inlining
- In 2000 ACM SIGPLAN Workshop on Dynamic and Adaptive Compilation and Optimization (DYNAMO ’00
, 2000
"... In this paper, we present a comparative study of static and profile-based heuristics for inlining. Our motivation for this study is to use the results to design the best inlining algorithm that we can for the Jalapeño dynamic optimizing compiler for Java [6]. We use a well-known approximation algori ..."
Abstract
-
Cited by 22 (1 self)
- Add to MetaCart
In this paper, we present a comparative study of static and profile-based heuristics for inlining. Our motivation for this study is to use the results to design the best inlining algorithm that we can for the Jalapeño dynamic optimizing compiler for Java [6]. We use a well-known approximation algorithm for the knapsack problem as a common "meta-algorithm" for the inlining heuristics studied in this paper. We present performance results for an implementation of these inlining heuristics in the Jalapeño dynamic optimizing compiler. Our performance results show that the inlining heuristics studied in this paper can lead to significant speedups in execution time (up to 1.68×) even with modest limits on code size expansion (at most 10%).
A Comparative Study of Static and Dynamic Heuristics for Inlining
, 2000
"... In this paper, we present a comparative study of static and dynamic heuristics for inlining. We introduce inlining plans as a formal representation for nested inlining decisions made by an inlining heuristic. We use a well-known approximation algorithm for the knapsack problem as a common "metaalg ..."
Abstract
-
Cited by 21 (7 self)
- Add to MetaCart
In this paper, we present a comparative study of static and dynamic heuristics for inlining. We introduce inlining plans as a formal representation for nested inlining decisions made by an inlining heuristic. We use a well-known approximation algorithm for the knapsack problem as a common "metaalgorithm " for the static and dynamic inlining heuristics studied in this paper. We present performance results for an implementation of these inlining heuristics in the Jalape~no dynamic optimizing compiler for Java. Our performance results show that the inlining heuristics studied in this paper can lead to significant speedups in execution time (up to 1.68\Theta) even with modest limits on code size expansion (at most 10%). # pages excluding title page & bibliography = 15 # pages used by figures and tables = 4 # pages of text = 11 Dynamo '00 submission Page 0 Privileged material --- please do not distribute 1
Visualizing Partial Evaluation
, 1998
"... ing with credit is permitted. To copy otherwise, to republish, to post on servers, to redistribute to lists, or to use any component of this work in other works, requires prior specific permission and/or a fee. Permissions may be requested from Publications Dept, ACM Inc., 1515 Broadway, New York, N ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
ing with credit is permitted. To copy otherwise, to republish, to post on servers, to redistribute to lists, or to use any component of this work in other works, requires prior specific permission and/or a fee. Permissions may be requested from Publications Dept, ACM Inc., 1515 Broadway, New York, NY 10036 USA, fax +1 (212) 869-0481, or permissions@acm.org. 2 \Delta O. Waddell and R. K. Dybvig ---The effects of different binding-time annotations and partial evaluation strategies can be compared by highlighting portions of the original source code for which different residual code is produced. ---It is possible to inspect the specific information on which a particular transformation decision is based. For example, if the partial evaluator is resourcebounded [Danvy et al. 1996; Debray 1997], resource constraints that prevent a particular expression from unfolding can be displayed. ---Information about the compile- and run-time effects of partial evaluation is available for display, inc...
Reducing Code Size Through Address Register Assignment
"... In DSP processors, minimizing the amount of address calculations is critical for reducing code size and improving performance, since studies of programs have shown that instructions that manipulate address registers constitute a significant portion of the overall instruction count (up to 55%). This ..."
Abstract
- Add to MetaCart
In DSP processors, minimizing the amount of address calculations is critical for reducing code size and improving performance, since studies of programs have shown that instructions that manipulate address registers constitute a significant portion of the overall instruction count (up to 55%). This work presents a compiler-based optimization strategy to “reduce the code size in embedded systems.” Our strategy maximizes the use of indirect addressing modes with postincrement/decrement capabilities available in DSP processors. These modes can be exploited by ensuring that successive references to variables access consecutive memory locations. To achieve this spatial locality, our approach uses both access pattern modification (program code restructuring) and memory storage reordering (data layout restructuring). Experimental results on a set of benchmark codes show the effectiveness of our solution and indicate that our approach outperforms the previous approaches to the problem. In addition to resulting in significant reductions in instruction memory (storage) requirements, the proposed technique improves execution time.

