Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/174675.178041acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article
Free access

Call forwarding: a simple interprocedural optimization technique for dynamically typed languages

Published: 01 February 1994 Publication History

Abstract

This paper discusses call forwarding, a simple interprocedural optimization technique for dynamically typed languages. The basic idea behind the optimization is straightforward: find an ordering for the “entry actions” of a procedure, and generate multiple entry points for the procedure, so as to maximize the savings realized from different call sites bypassing different sets of entry actions. We show that the problem of computing optimal solutions to arbitrary call forwarding problems is NP-complete, and describe an efficient greedy algorithm for the problem. Experimental results indicate that (i) this algorithm is effective, in that the solutions produced are generally close to optimal; and (ii) the resulting optimization leads to significant performance improvements for a number of benchmarks tested.

References

[1]
A. Appel, Compiling with Continuations, Cambridge University Press, 1992.
[2]
A. V. Aho, R. Sethi and J. D. Ullman, Compilers - Principles, Techniques and Tools, Addison-Wesley, 1986.
[3]
T. Ball and J. Larus, "Optimally Profiling and Tracing Programs", Proc. 19th. A CM Symp. on Principles of Programming Languages, Albuquerque, NM, Jan. 1992, pp. 59-70.
[4]
M. Carlsson and J. Widen, SICStus Prolog User's Manual, Swedish Institute of Computer Science, Oct. 1988.
[5]
C. Chambers and D. Ungar, "Iterative Type Analysis and Extended Message Splitting: Optimizing Dynamically Typed Object-Oriented Programs", Proc. SIGPLAN '90 Conference on Programming Language Design and implementation, White Plains, NY, June 1990, pp. 150-164. SIG- PLAN Notices vol. 25 no. 6.
[6]
C. Chambers, D. Ungar and E. Lee, "An Efficient Implementation of SELF, A Dynamically Typed Object-Oriented Language Based on Prototypes", Proc. OOPSLA '89, New Orleans, LA, 1989, pp. 49-7O.
[7]
S. K. Debray, "A Simple Code Improvement Scheme for Prolog", J. Logic Programming, vol. 13 no. 1, May 1992, pp. 57-88.
[8]
M. R. G arey and D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP- Completeness, Freeman, New York, 1979.
[9]
M. R. Garey, D. S. Johnson, and L. Stockmeyer, "Some Simplified NP-complete Graph Problems", Theoretical Computer Science vol. 1, pp. 237-267, 1976.
[10]
A. Goldberg and D. Robson, Smalltalk-80: The Language and its Implementation, Addison-Wesley, 1983.
[11]
D. Gudeman, K. De Bosschere, and S. K. Debray, "jc : An Efficient and Portable Implementation of Janus", Proc. Joint International Conference and Symposium on Logic Programming, Washington DC, Nov. 1992. MIT Press.
[12]
A. Mari~n, G. janssens, A. Mulkers, and M. Bruynooghe, "The Impact of Abstract Interpretation: An Experiment in Code Generation", Proc. Sixth International Conference on Logic Programming, Lisbon, June 1989, pp. 33-47. MIT Press.
[13]
V. Saraswat, K. Kahn, and J. Levy, "Janus: A step towards distributed constraint programming", in Proc. 1990 North A memcan Conference on Logic Programming, Austin, TX, Oct. 1990, pp. 431-446. MIT Press.
[14]
J. T. Schwartz, R. B. K. Dewar, E. Dubinsky, and E. Schonberg, Programming with Sets: An Introduction to SETL, Springer-Verlag, 1986.
[15]
G. L. Steele Jr., Common Lisp: The Language, Digital Press, 1984.
[16]
A. Taylor, "Removal of Dereferencing and Trailing in Prolog Compilation", Proc. Sixth International Conference on Logic Programming, Lisbon, June 1989, pp. 48-60. MIT Press.
[17]
K. Ueda, "Guarded Horn Clauses", in Concurrent Prolog: Collected Papers, vol. 1, ed. E. Shapiro, pp. 140-156, 1987. MIT Press.
[18]
P. Van Roy, Can Logic Programming Execute as Fast as Imperative Programming?, PhD Dissertation, University of California, Berkeley, Nov. 1990.
[19]
D. W. Wall, "Predicting Program Behavior Using Real or Estimated Profiles", Proc. SIGPLAN-91 Conf. on Programming Language Design and Implementation, June 1991, pp. 59-70.

Cited By

View all

Index Terms

  1. Call forwarding: a simple interprocedural optimization technique for dynamically typed languages

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    POPL '94: Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages
    February 1994
    492 pages
    ISBN:0897916360
    DOI:10.1145/174675
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    Sponsors

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 01 February 1994

    Permissions

    Request permissions for this article.

    Check for updates

    Qualifiers

    • Article

    Conference

    POPL94

    Acceptance Rates

    POPL '94 Paper Acceptance Rate 39 of 173 submissions, 23%;
    Overall Acceptance Rate 824 of 4,130 submissions, 20%

    Upcoming Conference

    POPL '25

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)46
    • Downloads (Last 6 weeks)5
    Reflects downloads up to 03 Oct 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2005)Generalized boxings, congruences and partial inliningStatic Analysis10.1007/3-540-58485-4_38(147-161)Online publication date: 8-Jun-2005
    • (1997)Lambda-splittingACM SIGPLAN Notices10.1145/258949.25896032:8(112-124)Online publication date: 1-Aug-1997
    • (1997)On Delphi lemmas and other memoing techniques for deterministic logic programsThe Journal of Logic Programming10.1016/S0743-1066(96)00105-730:2(145-163)Online publication date: Feb-1997
    • (1996)Polyvariant detection of uninitialized arguments of prolog predicatesThe Journal of Logic Programming10.1016/0743-1066(96)00050-728:3(217-229)Online publication date: Sep-1996
    • (1995)Abstract interpretation and low-level code optimizationProceedings of the 1995 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation10.1145/215465.215571(111-121)Online publication date: 23-Jun-1995
    • (1994)Call Forwarding: A Simple Low-Level Code Optimization TechniqueImplementations of Logic Programming Systems10.1007/978-1-4615-2690-2_6(77-88)Online publication date: 1994

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Get Access

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media