Add -polly-flatten-schedule pass.
commit976d830602908a41f3df88f54323951ac299ee7c
authorMichael Kruse <llvm@meinersbur.de>
Thu, 8 Sep 2016 15:02:36 +0000 (8 15:02 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Thu, 8 Sep 2016 15:02:36 +0000 (8 15:02 +0000)
tree2f97e3114f37fb3b60b4d802979b7d8c36e42bbb
parent9232549ad3582018defcd705f1b6df7b91824ffc
Add -polly-flatten-schedule pass.

The -polly-flatten-schedule pass reduces the number of scattering
dimensions in its isl_union_map form to make them easier to understand.
It is not meant to be used in production, only for debugging and
regression tests.

To illustrate, how it can make sets simpler, here is a lifetime set
used computed by the porposed DeLICM pass without flattening:

    { Stmt_reduction_for[0, 4] -> [0, 2, o2, o3] : o2 < 0;
      Stmt_reduction_for[0, 4] -> [0, 1, o2, o3] : o2 >= 5;
      Stmt_reduction_for[0, 4] -> [0, 1, 4, o3] : o3 > 0;
      Stmt_reduction_for[0, i1] -> [0, 1, i1, 1] : 0 <= i1 <= 3;
      Stmt_reduction_for[0, 4] -> [0, 2, 0, o3] : o3 <= 0 }

And here the same lifetime for a semantically identical one-dimensional
schedule:

    { Stmt_reduction_for[0, i1] -> [2 + 3i1] : 0 <= i1 <= 4 }

Differential Revision: https://reviews.llvm.org/D24310

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@280948 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
include/polly/FlattenAlgo.h [new file with mode: 0644]
include/polly/FlattenSchedule.h [new file with mode: 0644]
include/polly/LinkAllPasses.h
include/polly/Support/GICHelper.h
lib/CMakeLists.txt
lib/Support/GICHelper.cpp
lib/Support/RegisterPasses.cpp
lib/Transform/FlattenAlgo.cpp [new file with mode: 0644]
lib/Transform/FlattenSchedule.cpp [new file with mode: 0644]
test/FlattenSchedule/gemm.ll [new file with mode: 0644]
test/update_check.py
unittests/CMakeLists.txt
unittests/Flatten/CMakeLists.txt [new file with mode: 0644]
unittests/Flatten/FlattenTest.cpp [new file with mode: 0644]