编译器中多视图中间表示的支撑技术
SUPPORTING TECHNOLOGY FOR MULTI-VIEW INTERMEDIATE REPRESENTATION OF COMPILERS
-
摘要: 中间表示是构造优化编译器的核心技术 ,其设计方式对整个编译器的可适应性影响很大 .IR的扩充和改进往往引起整个编译器全局性的修改 .而体系结构的修改、某些编译优化模块的改进都会引起 IR的扩充或修改 ,这使得整个编译器的适应性很差 .介绍了一种多视图低层中间表示 ,通过向编译器的不同部分提供不同视图 ,以及逻辑视图到物理视图的映射 ,隐藏中间表示的实现细节 ,提高了编译器各优化分析模块算法的抽象层次 ,大大增强了编译器代码的可适应性和可重用性Abstract: The design of intermediate representation (IR) is the core technology in building optimizing compilers, whose implementation plays an important role in the flexibility of the whole compiler. Minor extension of IR often brings about massive modification. While change of the architecture and some optimizing methods can lead to the change of IR, which makes the whole compiler hard to extend. A kind of multi view IR implementation and converting is described. By providing different views to different phases, and by mapping from logical view to the physical implementation of IR, the implementation detail of IR is hidden from compilation phases, thus raising the level of the algorithms, and improving the code’s adaptability and reusability.
下载: