作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2007, Vol. 33 ›› Issue (03): 29-31. doi: 10.3969/j.issn.1000-3428.2007.03.011

• 博士论文 • 上一篇    下一篇

奇异数据类型的编译支持

胡定磊,陈书明,刘春林   

  1. (国防科技大学计算机学院,长沙 410073)
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2007-02-05 发布日期:2007-02-05

Implementation of Special Data Type in Compiler

HU Dinglei, CHEN Shuming, LIU Chunlin   

  1. (Computer School, National University of Defence Technology, Changsha 410073)
  • Received:1900-01-01 Revised:1900-01-01 Online:2007-02-05 Published:2007-02-05

摘要: 专用处理器,如DSP等,因主要支持特定应用,其指令集往往只支持有限的数据类型。在采用高级语言为其编程时,若采用了处理器不支持的奇异数据类型,编译器必须在保持语义的前提下将其转化为处理器支持的一段指令。该文提出了一种在VLIW DSP编译器中实现对奇异数据类型的处理的方法,包括对含有奇异数据类型的中间代码的注释、调度依赖关系的计算、寄存器分配的改进。该类方法对编译器的改动相对较小,效率较高。

关键词: 数据类型, 代码注释, 数据依赖关系, 寄存器分配, 编译器

Abstract: Special purpose processors, such as DSPs, can only support limited data types in their instruction sets because they are suitable to specific applications. In programs written in high-level language, if special data types which can not be supported by target processor are used, compiler must translate such statements into instructions supported by target processor while keeping original semantic. One method is presented to deal with specail data types in a VLIW DSP compiler, including code annotation of intermediate representations containing special data types, data flow and scheduling dependency computation, and register allocation improvement. To realize the method, only little modification of compiler is needed, and the method is efficient.

Key words: Data type, Code annotation, Data flow dependency, Register allocation, Compiler