Building a Practical Iterative Interactive Compiler

Building a Practical Iterative Interactive Compiler
复制标题

构建实用的迭代交互式编译器

DOI:
--
复制
发表时间:
2007
期刊:
影响因子:
--
通讯作者:
Albert Cohen
Albert Cohen
中科院分区:
--
文献类型:
--
作者:
G. Fursin;Albert Cohen

文献摘要

被引文献

相似文献

当前的编译器由于快速发展的硬件,固定和黑盒优化启发式方法,简单的硬件模型,无法微调转换的应用以及系统的高度动态行为,因此目前的编译器无法在现代处理器上提供令人满意的性能水平。该分析建议重新审视优化编译器的结构和相互作用。在以前的迭代优化原型中积累的经验知识的基础上,我们建议打开编译器,将其控制和决策机制暴露于外部优化启发式方法中。我们建议一种简单,实用且非侵入性的方法来修改当前编译器,允许外部工具访问和修改所有编译器优化决策。为了避免揭示所有编译器中间表示和库的陷阱,以使整个内部内容稳定并进一步发展,我们选择控制EMPH {stekig}过程本身,从而授予唯一的EMPH {高级{功能}需要有效做出决定。该限制与我们的微调和细粒度的交互兼容,并允许调整程序以获得最佳性能,代码尺寸,功耗;我们还认为,它允许进行联合架构编译器设计空间探索。仅通过揭示程序语法和语义的机会而产生的决策,并且只有在满足相关的合法性检查时,我们才会大大减少转换搜索空间。我们开发了一种交互式编译界面(ICI),该界面具有不同的外部优化驱动因素,用于商业开源路径范围Ekopath编译器(源自Open64);此接口正在移植到海湾合作委员会。该工具集通过在循环或指令级别的迭代,精细的汇编策略来实现大型应用程序(而不仅仅是内核)的强大性能改进;它还启用了连续(动态)优化研究。我们希望迭代交互式编译器将用编译器内部的不必要重复替代当前的不可便捷,刚性转换框架的当前多样性。此外,使用编译器统一界面可以简化未来的编译器开发,其中使用统计或机器学习技术会自动且连续地学习最佳优化策略。它可以实现终身的全程编译研究,而无需将编译器分解为一组明确定义的编译组件(通过持久的中间语言进行交流),即使在某个时候可以看到这种演变,但更具侵入性)。它还向迭代搜索,决策和适应方案的广泛领域打开了优化的启发式方法,并允许在不同程序和体系结构之间重新使用集体优化的知识知识。
Current compilers fail to deliver satisfactory levels of performance on modern processors, due to rapidly evolving hardware, fixed and black-box optimization heuristics, simplistic hardware models, inability to fine-tune the application of transformations, and highly dynamic behavior of the system. This analysis suggests to revisit the structure and interactions of optimizing compilers. Building on the empirical knowledge accumulated from previous iterative optimization prototypes, we propose to open the compiler, exposing its control and decision mechanisms to external optimization heuristics. We suggest a simple, practical, and non-intrusive way to modify current compilers, allowing an external tool to access and modify all compiler optimization decisions. To avoid the pitfall of revealing all the compiler intermediate representation and libraries to a point where it would rigidify the whole internals and stiffen further evolution, we choose to control the emph{decision} process itself, granting access to the only emph{high-level features} needed to effectively take a decision. This restriction is compatible with our fine-tuning and fine-grained interaction, and allows to tune programs for best performance, code size, power consumption; we also believe it allows for joint architecture-compiler design-space exploration.By exposing only the decisions that arise from the opportunities suggested by the program syntax and semantics and only when the associated legality checks are satisfied, we dramatically reduce the transformation search space. We developed an Interactive Compilation Interface (ICI) with different external optimization drivers for the commercial open-source PathScale EKOPath Compiler (derived from Open64); this interface is being ported to the GCC. This toolset led to strong performance improvements on large applications (rather than just kernels) through the iterative, fine-grain customization of compilation strategies at the loop or instruction-level; it also enabled continuous (dynamic) optimization research. We expect that iterative interactive compilers will replace the current multiplicity of non-portable, rigid transformation frameworks with unnecessary duplications of compiler internals. Furthermore, unifying the interface with compiler passes simplifies future compiler developments, where the best optimization strategy is learned automatically and continuously for a given platform, objective function, program or application domain, using statistical or machine learning techniques. It enables life-long, whole-program compilation research, without the overhead of breaking-up the compiler into a set of well-defined compilation components (communicating through persistent intermediate languages), even if such an evolution could be desirable at some point (but much more intrusive). It also opens optimization heuristics to a wide area of iterative search, decision and adaptation schemes and allows optimization knowledge reuse among different programs and architectures for collective optimizations.