Nothing Special   »   [go: up one dir, main page]

skip to main content
article

Fast and flexible instruction selection with on-demand tree-parsing automata

Published: 11 June 2006 Publication History

Abstract

Tree parsing as supported by code generator generators like BEG, burg, iburg, lburg and ml-burg is a popular instruction selection method. There are two existing approaches for implementing tree parsing: dynamic programming, and tree-parsing automata; each approach has its advantages and disadvantages. We propose a new implementation approach that combines the advantages of both existing approaches: we start out with dynamic programming at compile time, but at every step we generate a state for a tree-parsing automaton, which is used the next time a tree matching the state is found, turning the instruction selector into a fast tree-parsing automaton. We have implemented this approach in the Gforth code generator. The implementation required little effort and reduced the startup time of Gforth by up to a factor of 2.5.

References

[1]
A. Balachandran, D. M. Dhamdhere, and S. Biswas. Efficient retargetable code generation using bottom-up tree pattern matching. Computer Languages, 15(3):127--140, 1990.
[2]
David R. Chase. An improvement to bottom-up tree pattern matching. In Fourteenth Annual ACM Symposium on Principles of Programming Languages, pages 168--177, 1987.
[3]
M. Anton Ertl and David Gregg. Combining stack caching with dynamic superinstructions. In Interpreters, Virtual Machines and Emulators (IVME '04), pages 7--14, 2004.
[4]
Helmut Emmelmann, Friedrich-Wilhelm Schröer, and Rudolf Landwehr. BEG - a generator for efficient back ends. In SIGPLAN '89 Conference on Programming Language Design and Implementation, pages 227--237, 1989.
[5]
Christopher W. Fraser and David R. Hanson. A retargetable compiler for ANSI C. SIGPLAN Notices, 26(10):29--43, October 1991.
[6]
Christopher W. Fraser and Robert R. Henry. Hard-coding bottom-up code generation tables to save time and space. Software-Practice and Experience, 21(1):1--12, January 1991.
[7]
Christopher Fraser and David Hanson. A Retargetable C compiler: Design and Implementation. Benjamin/Cummings Publishing, 1995.
[8]
Christopher W. Fraser, Robert R. Henry, and Todd A. Proeb-sting. BURG - fast optimal instruction selection and tree parsing. SIGPLAN Notices, 27(4):68--76, April 1992.
[9]
Christopher W. Fraser, David R. Hanson, and Todd A. Proebsting. Engineering a simple, efficient code generator generator. ACM Letters on Programming Languages and Systems, 1993.
[10]
Jan Heering, Paul Klint, and Jan Reekers. Incremental generation of parsers. IEEE Transactions on Software Engineering, 16(12):1344--1351, December 1990.
[11]
Eduardo Pelegrí-Llopart and Susan L. Graham. Optimal code generation for expression trees: An application of the BURS theory. In Fifteenth Annual ACM Symposium on Principles of Programming Languages, pages 294--308, 1988.
[12]
Todd A. Proebsting. BURS automata generation. ACM Transactions on Programming Languages and Systems, 17(3):461--486, May 1995.
[13]
Eric Schnarr and James R. Larus. Fast out-of-order processor simulation using memoization. In Architectural Support for Programming Languages and Operating Systems (ASPLOS-VIII), pages 283--294, 1998.

Cited By

View all
  • (2015)Modeling Universal Instruction SelectionPrinciples and Practice of Constraint Programming10.1007/978-3-319-23219-5_42(609-626)Online publication date: 13-Aug-2015
  • (2018)Fast and flexible instruction selection with constraintsProceedings of the 27th International Conference on Compiler Construction10.1145/3178372.3179501(93-103)Online publication date: 24-Feb-2018
  • (2017)Complete and Practical Universal Instruction SelectionACM Transactions on Embedded Computing Systems10.1145/312652816:5s(1-18)Online publication date: 27-Sep-2017
  • Show More Cited By

Index Terms

  1. Fast and flexible instruction selection with on-demand tree-parsing automata

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 41, Issue 6
    Proceedings of the 2006 PLDI Conference
    June 2006
    426 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1133255
    Issue’s Table of Contents
    • cover image ACM Conferences
      PLDI '06: Proceedings of the 27th ACM SIGPLAN Conference on Programming Language Design and Implementation
      June 2006
      438 pages
      ISBN:1595933204
      DOI:10.1145/1133981
    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]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 11 June 2006
    Published in SIGPLAN Volume 41, Issue 6

    Check for updates

    Author Tags

    1. automaton
    2. dynamic programming
    3. instruction selection
    4. lazy
    5. tree parsing

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)3
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 03 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2015)Modeling Universal Instruction SelectionPrinciples and Practice of Constraint Programming10.1007/978-3-319-23219-5_42(609-626)Online publication date: 13-Aug-2015
    • (2018)Fast and flexible instruction selection with constraintsProceedings of the 27th International Conference on Compiler Construction10.1145/3178372.3179501(93-103)Online publication date: 24-Feb-2018
    • (2017)Complete and Practical Universal Instruction SelectionACM Transactions on Embedded Computing Systems10.1145/312652816:5s(1-18)Online publication date: 27-Sep-2017
    • (2008)Generalized instruction selection using SSA-graphsACM SIGPLAN Notices10.1145/1379023.137566343:7(31-40)Online publication date: 12-Jun-2008
    • (2008)Generalized instruction selection using SSA-graphsProceedings of the 2008 ACM SIGPLAN-SIGBED conference on Languages, compilers, and tools for embedded systems10.1145/1375657.1375663(31-40)Online publication date: 12-Jun-2008
    • (2007)Optimal chain rule placement for instruction selection based on SSA graphsProceedingsof the 10th international workshop on Software & compilers for embedded systems10.1145/1269843.1269857(91-100)Online publication date: 20-Apr-2007
    • (2006)Effective compiler generation by architecture descriptionACM SIGPLAN Notices10.1145/1159974.113467141:7(145-152)Online publication date: 14-Jun-2006
    • (2006)Effective compiler generation by architecture descriptionProceedings of the 2006 ACM SIGPLAN/SIGBED conference on Language, compilers, and tool support for embedded systems10.1145/1134650.1134671(145-152)Online publication date: 14-Jun-2006

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media