›› 2016, Vol. 29 ›› Issue (9): 106-.

• 论文 • 上一篇    下一篇

基于ARM9体系架构的编译优化研究

葛吴超,周亦敏   

  1. (上海理工大学 光电信息与计算机工程学院,上海 200093)
  • 出版日期:2016-09-15 发布日期:2016-09-26
  • 作者简介:葛吴超(1989-),男,硕士研究生。研究方向:嵌入式系统。周亦敏(1962-),男,副教授。研究方向:嵌入式系统。

Compiler Optimizations Based on ARM9 Architecture

GE Wuchao, ZHOU Yimin   

  1. (School of Optical-Electrical and Computer Engineering, University of Shanghai for Science and Technology, Shanghai 200093, China)
  • Online:2016-09-15 Published:2016-09-26

摘要:

在嵌入式系统软件开发过程中, GCC编译循环程序时的窥孔优化比较欠缺,编译代码在性能上较ARM商业编译器低。文中提出针对于ARM9处理器的循环计数值组合、循环处理数据合并和循环最优展开等3种窥孔优化方法优化汇编代码。选取矩阵乘法,图像合并和内存设置等经典程序运行在ARM9平台上,分别验证3种窥孔优化方法。实验数据表明,与GCC编译代码相比,经文中提出的方法优化后的代码在寄存器使用数量上,平均节省了50%,性能提升近2倍。

关键词: 窥孔优化, 循环计数值组合, 循环处理数据合并, 循环最优展开

Abstract:

Software developing in Embedded systems lacks the process of peephole optimization when using the GCC compiler, thus a poorer performance of the compiled code than that by the ARM compiler. This paper proposes a combination of cycle counter, consolidating data of cyclic process and cycle expansion optimally to optimize assembly code on the ARM9 processor, which are verified by running matrix multiplication, image merging and memory settings programs, respectively, on the ARM9 platform. Experimental data show that above mentioned methods reduce the number of register counts by 50% on average while nearly doubling the performance compared with the GCC compiled code.

Key words: peephole optimization, combination of cycle counter, consolidating data of cyclic process, cycle expansion optimally

中图分类号: 

  • TP316.2