skip to main content
10.1145/1772954.1772980acmconferencesArticle/Chapter ViewAbstractPublication PagescgoConference Proceedingsconference-collections
research-article

Integrated instruction selection and register allocation for compact code generation exploiting freeform mixing of 16- and 32-bit instructions

Published: 24 April 2010 Publication History

Abstract

For memory constrained embedded systems code size is at least as important as performance. One way of increasing code density is to exploit compact instruction formats, e.g. ARM Thumb, where the processor either operates in standard or compact instruction mode. The ARCompact ISA considered in this paper is different in that it allows freeform mixing of 16- and 32-bit instructions without a mode switch. Compact 16-bit instructions can be used anywhere in the code given that additional register constraints are satisfied. In this paper we present an integrated instruction selection and register allocation methodology and develop two approaches for mixed-mode code generation: a simple opportunistic scheme and a more advanced feedback-guided instruction selection scheme. We have implemented a code generator targeting the ARCompact ISA and evaluated its effectiveness against the ARC750D embedded processor and the EEMBC benchmark suite. On average, we achieve a code size reduction of 16.7% across all benchmarks whilst at the same time improving performance by on average 17.7%.

References

[1]
ACE Associated Computer Experts bv. CoSy compiler development system. http://www.ace.nl, retrieved 12 August 2009.
[2]
\textscArc International. Arc750D Core. http://www.arc.com, retrieved 12 August 2009.
[3]
\textscArm Ltd. Arm Cortex-M3. http://www.arm.com, retrieved 12 August 2009.
[4]
Árpád Beszédes, Rudolf Ferenc, Tibor Gyimóthy, André Dolenc, and Karsisto, Konsta. Survey of code-size reduction methods. ACM Computing Surveys, Vol. 35, No. 3, pp. 223--267, 2003.
[5]
John Bunda, Don Fussell, W.C. Athas, and Roy Jenevein. 16-bit vs. 32-bit instructions for pipelined microprocessors. SIGARCH Computer Architecture News, Vol. 21, No. 2, pp. 237--246, 1993.
[6]
http://electronicdesign.com/Articles/Index.cfm?ArticleID=5267 Dave Bursky. Nonvolatile Memory: More Than A Flash In The Pan. In electronic design, http://electronicdesign.com, ED Online ID 5267, July 2003.
[7]
The Embedded Microprocessor Benchmark Consortium. Eembc Benchmark Suite. http://www.eembc.org, retrieved 12 August 2009.
[8]
Richard A. Fuhler, Thomas J. Pennello, Michael Lee Jalkut, and Peter Warnes. Method and Apparatus for Compiling Instructions for a Data Processor. United States Patent US 7278137B1, Oct. 2, 2007.
[9]
http://portal.acm.org/citation.cfm?id=882452.874375 A. Halambi, A. Shrivastava, P. Biswas, N. Dutt, A. Nicolau. An Efficient Compiler Technique for Code Size Reduction Using Reduced Bit-Width ISAs. In Proceedings of the Conference on Design, Automation and Test in Europe (DATE), p. 402, 2002.
[10]
Arvind Krishnaswamy and Rajiv Gupta. http://portal.acm.org/citation.cfm?id=859697 Profile guided selection of Arm and Thumb instructions. ACM SIGPLAN Notices, Vol. 32, No. 7, pp. 56--64, 2002.
[11]
Arvind Krishnaswamy and Rajiv Gupta. Mixed-width instruction sets. Communications of the ACM, Vol. 46, No. 8, pp. 47--52, 2003.
[12]
http://portal.acm.org/citation.cfm?id=1234677 Sheayun Lee, Jaejin Lee, Chang Park, Sang Min. Selective code transformation for dual instruction set processors. ACM Transactions on Embedded Computing Systems, Vol. 6, No. 2, 2007.
[13]
Mips Technologies. microMips Instruction Set Architecture. MD00690, Revision 01.00, October 2009.
[14]
Richard Phelan. Improving Arm Code Density and Performance -- New Thumb Extensions to the Arm Architecture. Arm Thumb-2 Core Technology Whitepaper, June 2003.
[15]
Jim Turley. Code compression under the microscope. In Embedded Systems Design, http://www.embedded.com, retrieved 12 August 2009.
[16]
Liu Xianhua, Zhang Jiyu, Cheng Xu. http://portal.acm.org/citation.cfm?id=1244154 Efficient code size reduction without performance loss. In Proceedings of the ACM Symposium on Applied Computing (SAC), pp. 666--672, 2007.

Cited By

View all
  • (2023)Register Allocation for Compressed ISAs in LLVMProceedings of the 32nd ACM SIGPLAN International Conference on Compiler Construction10.1145/3578360.3580261(122-132)Online publication date: 17-Feb-2023
  • (2022)RollBin: reducing code-size via loop rerolling at binary levelProceedings of the 23rd ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, and Tools for Embedded Systems10.1145/3519941.3535072(99-110)Online publication date: 14-Jun-2022
  • (2022)Loop Rolling for Code Size Reduction2022 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)10.1109/CGO53902.2022.9741256(217-229)Online publication date: 2-Apr-2022
  • Show More Cited By

Index Terms

  1. Integrated instruction selection and register allocation for compact code generation exploiting freeform mixing of 16- and 32-bit instructions

    Recommendations

    Comments

    Please enable JavaScript to view thecomments powered by Disqus.

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    CGO '10: Proceedings of the 8th annual IEEE/ACM international symposium on Code generation and optimization
    April 2010
    300 pages
    ISBN:9781605586359
    DOI:10.1145/1772954
    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

    In-Cooperation

    • IEEE CS uArch

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 24 April 2010

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. ARCompact
    2. code size
    3. dual instruction set architecture
    4. instruction selection
    5. register allocation
    6. variable-length instructions

    Qualifiers

    • Research-article

    Conference

    CGO '10

    Acceptance Rates

    Overall Acceptance Rate 312 of 1,061 submissions, 29%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)6
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 14 Sep 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2023)Register Allocation for Compressed ISAs in LLVMProceedings of the 32nd ACM SIGPLAN International Conference on Compiler Construction10.1145/3578360.3580261(122-132)Online publication date: 17-Feb-2023
    • (2022)RollBin: reducing code-size via loop rerolling at binary levelProceedings of the 23rd ACM SIGPLAN/SIGBED International Conference on Languages, Compilers, and Tools for Embedded Systems10.1145/3519941.3535072(99-110)Online publication date: 14-Jun-2022
    • (2022)Loop Rolling for Code Size Reduction2022 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)10.1109/CGO53902.2022.9741256(217-229)Online publication date: 2-Apr-2022
    • (2019)Function merging by sequence alignmentProceedings of the 2019 IEEE/ACM International Symposium on Code Generation and Optimization10.5555/3314872.3314892(149-163)Online publication date: 16-Feb-2019
    • (2019)A Comparative Analysis of HPL-PD and MIPS Architectures by Using Integrated Approach for IS and RA for Exploiting ILPInternational Journal of Service Science, Management, Engineering, and Technology10.4018/IJSSMET.201904010410:2(59-70)Online publication date: 1-Apr-2019
    • (2019)Combinatorial Register Allocation and Instruction SchedulingACM Transactions on Programming Languages and Systems10.1145/333237341:3(1-53)Online publication date: 2-Jul-2019
    • (2019)Function Merging by Sequence Alignment2019 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)10.1109/CGO.2019.8661174(149-163)Online publication date: Feb-2019
    • (2014)Exploiting function similarity for code size reductionACM SIGPLAN Notices10.1145/2666357.259781149:5(85-94)Online publication date: 12-Jun-2014
    • (2014)Exploiting function similarity for code size reductionProceedings of the 2014 SIGPLAN/SIGBED conference on Languages, compilers and tools for embedded systems10.1145/2597809.2597811(85-94)Online publication date: 12-Jun-2014

    View Options

    Get Access

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media