skip to main content
10.1145/1244002.1244154acmconferencesArticle/Chapter ViewAbstractPublication PagessacConference Proceedingsconference-collections
Article

Efficient code size reduction without performance loss

Published:11 March 2007Publication History

ABSTRACT

For many embedded applications, program code size is a critical design factor for its relationship with limited memory, energy and communication bandwidth. While pursuing better code redundancy elimination in compilation time, people also began to focus on better encoding. Some RISC processors, such as ARM, MIPS and UniCore, support a 32bit/16bit dual-width instruction set. Mixed code generation is introduced in expectation of achieving both higher code density from the 16-bit instruction set and good performance from the 32-bit one, with little extra cost.

We describe a new fine-grained mixed code generation scheme in this paper. We introduce into the 32-bit ISA a new 16-bit Mode-Changing instruction set which has the following features: firstly, the operation of the instructions are very common in UniCore32 programs and are appropriate to be coded into 16 bits; secondly, they can switch the current processor mode while performing their own operations. We implement the mixed code generation at link time in our compilation toolchain. Our experiments show that this scheme is successful in better encoding a program's computations to reduce code size without sacrificing performance. In addition, there are little modifications to micro-architecture, ensuring good compatibility with the original instruction set architecture.

References

  1. A. Krishnaswamy, R. Gupta. Profile Guided Selection of ARM and Thumb Instructions. ACM SIGPLAN Joint Conference on Languages Compilers and Tools for Embedded Systems & Software and Compilers for Embedded Systems, pp. 55--64 June 2002 Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A. Halambi, A. Shrivastava, P. Biswas, N. Dutt, A. Nicolau. An Efficient Compiler Technique for Code Size Reduction using Reduced Bit-width ISAs. Design Automation and Test in Europe, March 2002 Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. C. Lee, M. Potkonjak and W. H. Mangion-Smith. MediaBench: A Tool for Evaluating and Synthesizing Multimedia and Communications Systems. Proceedings of the 30th Annual International Symposium on Microarchitecture, pp.330--335, Dec. 1997 Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. Burger and T. M. Austin. The Simplescalar Tool Set, Version 2.0. Computer Architecture News, pp. 13--25, June 1997 Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. A. Krishnaswamy, R. Gupta. Enhancing the Performance of 16-bit Code Using Augmenting Instructions. ACM SIGPLAN Conference on Languages Compilers and Tools for Embedded Systems, June 2003 Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. S. Lee, J. Lee, S. Min, J. Hiser and J. W. Davidson, Code Generation for a Dual Instruction Set Processor based on Selective Code Transformation. Proceedings of the 7th International Workshop on Software and Compilers for Embedded Systems, pp.33--48, Sep. 2003Google ScholarGoogle ScholarCross RefCross Ref
  7. UniCore32 ISA and Programming Manual. Technical Report, Microprocessor Research Center of Peking University, 2002Google ScholarGoogle Scholar
  8. L. Goudge, S. Segars. Thumb: Reducing the Cost of 32-bit RISC Performance in Portable and Consumer Applications. Proceedings of the 41st IEEE International Computer Conference, pp. 176, 1996 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. MIPS32 Architecture for Programmers Volume IV-a: The MIPS16 Application Specific Extension to the MIPS32 Architecture. 2001Google ScholarGoogle Scholar
  10. X. Ma, Y. Kwon and H. J. Lee. PARE: Instruction Set Architecture for Efficient Code Size Reduction. Electronics Letters 25th Nov'99 Vol. 35 No. 24 pp. 2098--2099, 1999Google ScholarGoogle Scholar
  11. J. Bunda, D. Fussell, R. Jenevein, W. C. Athas. 16-bit vs. 32-bit Instructions for Pipelined Micro-processors. Proceedings of the 20th Annual International Symposium on Computer Architecture, pp.237--246, 1993 Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. A. Krishnaswamy, R. Gupta. Efficient Use of Invisible Registers in Thumb Code. IEEE/ACM 38th International Symposium on Microarchitecture, Nov. 2005 Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. R. Phelan. Improving ARM Code Density and Performance. Technical report, ARM Limited, 2003Google ScholarGoogle Scholar

Index Terms

  1. Efficient code size reduction without performance loss

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      SAC '07: Proceedings of the 2007 ACM symposium on Applied computing
      March 2007
      1688 pages
      ISBN:1595934804
      DOI:10.1145/1244002

      Copyright © 2007 ACM

      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 March 2007

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      Overall Acceptance Rate1,650of6,669submissions,25%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader