摘要
随着数字信号处理器(DSP)的迅速发展,面向DSP设计可重定目标的C编译器成为必然。由GCC编译器移植面向媒体处理器的C编译器,利用指令模板匹配不能有效的生成并行指令。本文结合32位具有RISC-DSP结构的媒体处理器MD32特有的体系结构特点,提出C编译器支持的,在汇编级通过指令调度和调整指令操作数及其类型的代码优化方法,实现输出高效的并行指令,同时提高了代码的运行效率和代码的密度。统计数据表明:代码执行效率平均可以提高14%,而代码密度平均提高11.75%。这种方法比树模式匹配方法更容易实现,并适用于支持并行指令的其他DSP处理器。
With the development of digital signal processing (DSP) processors, the design of retargetable C compiler is necessary. C compiler for media processors is build by porting GCC, all instructions including parallel instructions are generated through instruction pattern matching, which is very difficult to generate effective parallel instructions. Meeting with the features in architecture of RISC-DSP processor designed by us, this paper proposes a compiler supported code generation at assemble level, implemented by instruction scheduling and operand and its type modifying. Therefore, this can generate effective parallel instructions and improve the performance and density of object code. The statistic data show that the performance of object code may be improved by 14% average while the code density may be improved by 11.75% average. This method is easier than tree pattern matching, and can be used in other DSP processors supporting parallel instructions.
出处
《科技通报》
2005年第4期453-459,470,共8页
Bulletin of Science and Technology
基金
国家高技术研究发展计划(863)基金项目(No.2002AAlZll40)
浙江省自然科学基金项目(No.602031)