Polly – Polyhedral optimization in LLVM

Polly – Polyhedral optimization in LLVM
复制标题

Polly – LLVM 中的多面体优化

DOI:
--
复制
发表时间:
2012
期刊:
影响因子:
--
通讯作者:
L. Pouchet
L. Pouchet
中科院分区:
--
文献类型:
--
作者:
T. Grosser;Hongbin Zheng;Raghesh Aloor;Andreas Simburger;Armin Grosslinger;L. Pouchet

文献摘要

被引文献

相似文献

存在各种强大的多面体技术来有效地优化计算密集型程序。将这些技术应用于任何重要的程序仍然非常困难,而且通常不如预期的有效。大多数多面体工具仅限于特定的编程语言。即使对于这种语言,相关代码也需要匹配在现有代码中很少出现的特定语法。因此,很难甚至不可能自动处理现有程序。此外,大多数工具针对C或OpenCL代码,这会阻止与编译器内部优化器的有效通信。因此,特定于目标体系结构的优化要么效率很低,要么根本无法实现。在本文中,我们介绍了Polly,一个在LLVM中实现多面体优化的项目。Polly以独立于语言且语法透明的方式自动检测和转换相关程序部分。因此,它支持用大多数常见编程语言编写的程序,并支持C++迭代器、基于后藤的循环和指针运算等构造。在内部,它提供了一个最先进的多面体库,完全支持Z多面体,高级数据依赖分析和外部优化器的支持。Polly包括集成的SIMD和OpenMP代码生成。通过LLVM,可以针对CPU和GPU加速器的机器代码,C源代码甚至硬件描述。
Various powerful polyhedral techniques exist to optimize computation intensive programs effectively. Applying these techniques on any non-trivial program is still surprisingly difficult and often not as effective as expected. Most polyhedral tools are limited to a specific programming language. Even for this language, relevant code needs to match specific syntax that rarely appears in existing code. It is therefore hard or even impossible to process existing programs automatically. In addition, most tools target C or OpenCL code, which prevents effective communication with compiler internal optimizers. As a result target architecture specific optimizations are either little effective or not approached at all. In this paper we present Polly, a project to enable polyhedral optimizations in LLVM. Polly automatically detects and transforms relevant program parts in a language-independent and syntactically transparent way. Therefore, it supports programs written in most common programming languages and constructs like C++ iterators, goto based loops and pointer arithmetic. Internally it provides a state-of-the-art polyhedral library with full support for Z-polyhedra, advanced data dependency analysis and support for external optimizers. Polly includes integrated SIMD and OpenMP code generation. Through LLVM, machine code for CPUs and GPU accelerators, C source code and even hardware descriptions can be targeted.