Figure 2: Flow chart for finding optimal combination of compiler options.

 

difficult to assign importance factors when it is not known exactly how much impact compiler options alone will have on an individual criterion over another. For example, a developer might think code size is more important than execution speed before applying the methodology, but it might be the case that the percentage of possible improvement of execution speed through compiler options alone is significantly larger than the possible percentage of improvement on code size, thus influencing the importance factors of the two.

Applying compiler options is in no way an exact science. It is not always guaranteed that -Otime will generate faster code and -Ospace will generate smaller code when applied to small, simple functions. Additionally, it is not always possible to fully anticipate how a compiler translates a particular piece of source code. Further, some code optimization issues have been shown to be NP-complete, making optimizing ever-more difficult.

Still, no matter how powerful a compiler’s optimization ability is, or how unpredictable it can be, it is still the job of the developer to efficiently harness its strengths and minimize its weaknesses to produce optimal code.

References

1. ARM, Ltd. 2007. Procedure Call Standard for the ARM Architecture.

ARM Ltd., Cambridge, UK.

2. ARM, Ltd. 2007. RealView Compilation Tools for uVision v3.1 Compiler Reference Guide. ARM Ltd., Cambridge, UK.

3. Atmel. 2001. Atmel’s ARM-based microcontroller—Low power for portable systems. White Paper. Atmel, San Jose, CA.

4. Faggin, F., Hoff, M. E., Mazor, S., and Shima, M. 1996. The history of the 4004. IEEE Micro 16, 12. 10-20.

5. Furber, S. 2000. ARM System On-chip Architecture. Addison-Wesley Professional, Harlow, UK.

6. Hall, S. 1996. Journey to the Moon: The History of the Apollo Guidance Computer. American Institute of Aeronautics & Astronautics, Reston, VA.

7. Hennessy, J. and Patterson, D. 2002. Computer Architecture:

A Quantitative Approach. Morgan Kaufmann, San Francisco, CA.

8. Lupers, R. 2000. Code Optimization Techniques for Embedded Processors. Kluwer Academic Publishers, Dordrecht, The Netherlands.

9. Martin, T. 2005. Insider’s Guide to Philips ARM7 Microcontrollers. Hitex (UK) Ltd., Coventry, UK.

10. Muchnick, S. 1997. Advanced Compiler Design and Implementation. Morgan Kaufmann, San Francisco, CA.

11. Seal, D. 2001. ARM Architecture Reference Manual (2nd ed.). Addison-Wesley, Harlow, UK.

12. Shen, J. 2004. Modern Processor Design: Fundamentals of Super-scalar Processors. McGraw-Hill, New York, NY.

13. Sloss, A., Symes, S., and Wright, C. 2004. ARM Architecture Reference Manual 2nd Ed. ARM System Developer’s Guide. Morgan Kaufmann, San Francisco, CA.

14. York, R. 2002. Benchmarking in context: Dhrystone. White Paper. ARM Ltd., Cambridge, UK.

 

Biography Joe Bungo ( joe.bungo@arm.com) joined ARM in 2002 as an intern in the Applications Engineering group supporting and providing training for ARM software development tools. In 2005, he joined ARM’s University Relations group as an applications engineer encouraging and supporting the use of the ARM architecture in academia in all facets, including providing hands-on workshops, lectures on various ARM-re-lated topics, and technical support. Bungo has a BA in computer science from the University of Texas at Austin.

References:

mailto:joe.bungo@arm.com

http://www.acm.org/crossroads

http://www.appsig.com

Archives