Google Research

Polygeist: Raising C to Polyhedral MLIR

International Conference on Parallel Architectures and Compilation Techniques (PACT 2021), IEEE Computer Society (2021), pp. 45-59 (to appear)

Abstract

We present Polygeist, a new compilation flow that connects MLIR infrastructure to cutting edge polyhedral optimization tools. It consists of a C and C++ frontend capable of converting a broad range of existing codes into MLIR suitable for polyhedral transformation and a bi-directional conversion between MLIR and OpenScop exchange format. The Polygeist/MLIR intermediate representation featuring high-level (affine) loop constructs and n-D arrays embedded into a single static assignment (SSA) substrate enables an unprecedented combination of SSA-based and polyhedral optimizations. We illustrate this by proposing and implementing two extra transformations: statement splitting and reduction parallelization. Our evaluation demonstrates that Polygeist outperforms on average both an LLVM IR-level optimizer (Polly) and a source-to-source state-of-the-art polyhedral compiler (Pluto) when exercised on Polybench/C benchmark suite in sequential (2.53× vs 1.41×, 2.34×) and parallel mode (9.47× vs 3.26×, 7.54×) thanks to the new representation and transformations.

Research Areas

Learn more about how we do research

We maintain a portfolio of research projects, providing individuals and teams the freedom to emphasize specific types of work