Polyhedral optimization framework

From LLVM

Jump to: navigation, search

Contents

[edit] Polly - The polyhedral optimization framework for LLVM

Polly uses a mathematical representation, the polyhedral model, to represent and transform loops and other control flow structures. Using an abstract representation it is possible to reason about transformations in a more general way and to use highly optimized linear programming libraries to figure out the optimal loop structure. These transformations can be used to do constant propagation through arrays, remove dead loop iterations, optimize loops for cache locality, optimize arrays, apply advanced automatic parallelization, drive vectorization, or they can be used to do software pipelining.

[edit] Status of the work

At the end of 2009 work on the infrastructure started.

[edit] Phone calls

We meet (more or less regularly) on the phone. Please ask for the number and when the next meeting is.

[edit] Architecture

File:LLVMPoly.png

[edit] ToDo

The first iteration of this project aims to create a minimal working version of this framework, that is capable to transform an LLVM-IR program to the polyhedral model and back to LLVM-IR without applying any transformations.

Frontend
Task Bug tracker Status Owner
Region detection in progress Tobias + ether
Array access functions in progress John
Alias sets
Scalar evolution to affine expression [#5936] in progress John
SCoP extraction
SCoPs to polyhedral model In progress Tobias
Middle end
Task Bug tracker Status Owner
Define polyhedral description
Import/Export using scoplib
Backend
Task Bug tracker Status Owner
Create LLVM-IR using CLooG In progress Andi
General tasks
Task Bug tracker Status Owner
Setup git repositories Done Tobias
Add CLooG/isl to build system Works on Unix Tobias

[edit] Getting started

[edit] Trying Polly

[edit] Get the code

At the moment polly needs still a patched version of LLVM. LLVM with patches enabling Polly support is available in the [Pofl repository].

Polly itself can be found in the [Polly repository]

git clone git://repo.or.cz/llvm-complete/pofl.git
cd pofl
git submodule init 
git submodule update
export POFL=`pwd`

[edit] Install necessary libraries

Please install the development version of CLooG as described at the bottom of [CLooG Homepage].

[edit] Build Polly

At the moment just the CMAKE build is supported.

mkdir build
cd build
cmake ${POFL}
cmake -DCMAKE_PREFIX_PATH=/home/username/path/to/cloog/ .
cmake -DLLVM_ENABLE_PEDANTIC=0   #Required as the CLooG header files contain non C89 stuff.
make

If CMAKE cannot find CLooG and ISL add the install prefix of CLooG to CMAKE_PREFIX_PATH.

Personal tools