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