许多通用和嵌入式高性能处理器都支持谓词执行,利用谓词执行可以简化程序的控制结构,而且指令调度、寄存器分配也可以利用谓词提高效率.基于二进制决策图(BDD)的谓词分析系统,提出了一种利用互补谓词机制对控制结构进行优化的方法;对传统着色图寄存器分配算法进行改进,给出了一种利用互补谓词机制建立统一简化干涉图的新算法,减少了代码溢出;利用互补谓词的特性指导指令调度,使之更加有效利用资源,并对目标体系结构进行了改进以支持指令调度.最后在YHFT-DSP/700芯片的编译器上对所提优化方法的有效性进行了验证.
Predicated execution promises to reduce control flow overhead and to enhance optimization, provided that instruction scheduling and register allocation can utilize it efficiently. Based on binary decision diagram (BDD) predicate analysis system, this paper proposes the method to optimize control structures in programs utilizing complementary predicate. And based on traditional graph coloring register allocation, a new algorithm to construct unified and simplified interference graph utilizing complementary predicate is presented, which can reduce spill code. Moreover, complementary predicate-aware scheduling is proposed to reduce the superfluous commitment of resources to operations whose predicates evaluate to false at run-time, and the architecture is modified to support scheduling. Experiment results in YHFT- DSP/700 compiler show the effectiveness of proposal method.