Code Generation for a Dual Instruction Set Processor Based on Selective Code Transformation

  • Sheayun Lee
  • Jaejin Lee
  • Sang Lyul Min
  • Jason Hiser
  • Jack W. Davidson
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2826)


Code size is an important design constraint in cost-sensitive embedded systems, since the amount of available memory is often limited. This constraint motivates dual instruction set processors, which support a reduced instruction set with a smaller instruction length in addition to a normal instruction set. This dual instruction set provides an effective mechanism for code size reduction. However, the code size reduction comes at the price of degraded performance because a program compiled into the reduced instruction set executes a larger number of instructions than the same program compiled into the normal instruction set. Motivated by this observation, we propose a technique that can be used to enable a flexible tradeoff between the code size and execution time of a program by using the two instruction sets selectively for different parts of a program. Our proposed approach determines the instruction set to be used for each basic block using a path-based profitability analysis, so that the execution time of the resulting program is minimized while the code size constraint is satisfied. The results from our experiments verify that the tradeoff relationship exists between a program’s code size and execution time, and further indicate that the proposed technique can effectively exploit this tradeoff to improve performance within the given code size budget.


Execution Time Basic Block Mode Switch Code Size Benchmark Program 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Halambi, A., Shrivastava, A., Biswas, P., Dutt, N., Nicolau, A.: An efficient compiler technique for code size reduction using reduced bit-width ISAs. In: Proceedings of the DATE (Design, Automation and Test in Europe), Paris, France (March 2002)Google Scholar
  2. 2.
    Furber, S.: ARM System Architecture. Addison-Wesley, Reading (1996); ISBN: 0-201-40352-8Google Scholar
  3. 3.
    Kissel, K.: MIPS16: High-density MIPS for the embedded market. Technical report, Silicon Graphics MIPS Group (1997)Google Scholar
  4. 4.
    ARC Cores. The ARCtangent-A5 Processor,
  5. 5.
    Appel, A., Davidson, J., Ramsey, N.: The zephyr compiler infrastructure (1998),
  6. 6.
    Krishnaswamy, A., Gupta, R.: Profile guided selection of ARM and Thumb instructions. In: Proceedings of LCTES/SCOPES, Berlin, Germany (June 2002)Google Scholar
  7. 7.
    Goudge, L., Segars, S.: Thumb: Reducing the cost of 32-bit RISC performance in portable and consumer applications. In: Proceedings of COMPCON (1996)Google Scholar
  8. 8.
    ARM Limited. ARM Developer Suite Developer Guide Google Scholar
  9. 9.
    Ball, T., Larus, J.R.: Efficient path profiling. In: Proceedings of the 29th Annual IEEE/ACM Symposium on Microarchitecture, Paris, France, pp. 46–57 (1996)Google Scholar
  10. 10.
    Benitez, M.E., Davidson, J.W.: Target-specific global code improvement: Principles and applications. Technical Report CS-94-42, Department of Computer Science, University of Virginia (April 1994)Google Scholar
  11. 11.
    Davidson, J.W., Fraser, C.W.: Code selection through object code optimization. ACM Transactions on Programming Languages and Systems 6(4), 505–526 (1984)CrossRefGoogle Scholar
  12. 12.
    Davidson, J.W., Whalley, D.B.: A design environment for addressing architecture and compiler interactions. Microprocessors and Microsystems 15(9), 459–472 (1991)CrossRefGoogle Scholar
  13. 13.
    Tamches, A., Miller, B.P.: Dynamic kernel code optimization. In: Proceedings of the 3rd Workshop on Binary Translation, Barcelona, Spain (June 2001)Google Scholar
  14. 14.
    Guthaus, M.R., Ringenberg, J.S., Ernst, D., Austin, T.M., Mudge, T., Brown, R.B.: MiBench: A free, commercially representative embedded benchmark suite. In: Proceedings of the IEEE 4th Annual Workshop on Workload Characterization, Austin, TX (December 2001)Google Scholar
  15. 15.
    Lee, C., Potkonjak, M., Mangione-Smith, W.H.: MediaBench: A tool for evaluating and synthesizing multimedia and communications systems. In: Proceedings of the 30th Annual International Symposium on Microarchitecture, December 1997, pp. 330–335 (1997)Google Scholar
  16. 16.
    ARM Linux Project.

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Sheayun Lee
    • 1
  • Jaejin Lee
    • 1
  • Sang Lyul Min
    • 1
  • Jason Hiser
    • 2
  • Jack W. Davidson
    • 2
  1. 1.School of Computer Science and EngineeringSeoul National UniversitySeoulKorea
  2. 2.Department of Computer ScienceUniversity of VirginiaCharlottesvilleU.S.A.

Personalised recommendations