Add OpenMP code generation to isl backend
authorTobias Grosser <tobias@grosser.es>
Sat, 15 Nov 2014 21:32:53 +0000 (21:32 +0000)
committerTobias Grosser <tobias@grosser.es>
Sat, 15 Nov 2014 21:32:53 +0000 (21:32 +0000)
commite3c0558e353d14203c279a0b335219606ca70406
treeac6842130a329a4af43b10c3e5eaada6977aa390
parent6d675f4e35cc50746f888f9bed5ba22a8a4aed34
Add OpenMP code generation to isl backend

This backend supports besides the classical code generation the upcoming SCEV
based code generation (which the existing CLooG backend does not support
robustly).

OpenMP code generation in the isl backend benefits from our run-time alias
checks such that the set of loops that can possibly be parallelized is a lot
larger.

The code was tested on LNT. We do not regress on builds without -polly-parallel.
When using -polly-parallel most tests work flawlessly, but a few issues still
remain and will be addressed in follow up commits.

SCEV/non-SCEV codegen:
  - Compile time failure in ldecod and TimberWolfMC due a problem in our
    run-time alias check generation triggered by pointers that escape through
    the OpenMP subfunction (OpenMP specific).

  - Several execution time failures. Due to the larger set of loops that we now
    parallelize (compared to the classical code generation),  we currently run
    into some timeouts in tests with a lot loops that have a low trip count and
    are slowed down by parallelizing them.

SCEV only:

  - One existing failure in lencod due to llvm.org/PR21204 (not OpenMP specific)

OpenMP code generation is the last feature that was only available in the CLooG
backend. With the isl backend being the only one supporting features such as
run-time alias checks and delinearization, we will soon switch to use the isl
ast generator by the default and subsequently remove our dependency on CLooG.

http://reviews.llvm.org/D5517

llvm-svn: 222088
16 files changed:
polly/include/polly/CodeGen/IslExprBuilder.h
polly/include/polly/Support/SCEVValidator.h
polly/lib/CodeGen/IslCodeGeneration.cpp
polly/lib/Support/SCEVValidator.cpp
polly/test/Isl/CodeGen/OpenMP/escaping-pointers-invalidate-alias-info.ll [new file with mode: 0644]
polly/test/Isl/CodeGen/OpenMP/loop-body-references-outer-iv.ll [new file with mode: 0644]
polly/test/Isl/CodeGen/OpenMP/loop-body-references-outer-values-2.ll [new file with mode: 0644]
polly/test/Isl/CodeGen/OpenMP/loop-body-references-outer-values-3.ll [new file with mode: 0644]
polly/test/Isl/CodeGen/OpenMP/loop-body-references-outer-values.ll [new file with mode: 0644]
polly/test/Isl/CodeGen/OpenMP/loop-bounds-reference-outer-ids.ll [new file with mode: 0644]
polly/test/Isl/CodeGen/OpenMP/reference-other-bb.ll [new file with mode: 0644]
polly/test/Isl/CodeGen/OpenMP/reference-preceeding-loop.ll [new file with mode: 0644]
polly/test/Isl/CodeGen/OpenMP/single_loop.ll [new file with mode: 0644]
polly/test/Isl/CodeGen/OpenMP/single_loop_with_loop_invariant_baseptr.ll [new file with mode: 0644]
polly/test/Isl/CodeGen/OpenMP/single_parallel_loop___%for.i---%exit.jscop [new file with mode: 0644]
polly/test/Isl/CodeGen/OpenMP/two-parallel-loops-reference-outer-indvar.ll [new file with mode: 0644]