[Polly] Use three-dimensional arrays to store packed operands of the matrix
authorRoman Gareev <gareevroman@gmail.com>
Wed, 21 Dec 2016 11:18:42 +0000 (11:18 +0000)
committerRoman Gareev <gareevroman@gmail.com>
Wed, 21 Dec 2016 11:18:42 +0000 (11:18 +0000)
commit92c446016a72d452e481aadc28bfb1ccc32ddeb7
tree2602b596d980514059782117144eeddf4dd73f3c
parent7c7bf1b432c0deb69a7cd11e41ec915fd5500e7e
[Polly] Use three-dimensional arrays to store packed operands of the matrix
multiplication

Previously we had two-dimensional accesses to store packed operands of
the matrix multiplication for the sake of simplicity of the packed arrays.
However, addition of the third dimension helps to simplify the corresponding
memory access, reduce the execution time of isl operations applied to it, and
consequently reduce the compile-time of Polly. For example, in case of
Intel Core i7-3820 SandyBridge and the following options,

clang -O3 gemm.c -I utilities/ utilities/polybench.c -DPOLYBENCH_TIME
-march=native -mllvm -polly -mllvm -polly-pattern-matching-based-opts=true
-DPOLYBENCH_USE_SCALAR_LB -mllvm -polly-target-cache-level-associativity=8,8
-mllvm -polly-target-cache-level-sizes=32768,262144 -mllvm
-polly-target-latency-vector-fma=7

it helps to reduce the compile-time from about 361.456 seconds to about 0.816
seconds.

Reviewed-by: Michael Kruse <llvm@meinersbur.de>,
             Tobias Grosser <tobias@grosser.es>

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

llvm-svn: 290251
polly/lib/Transform/ScheduleOptimizer.cpp
polly/test/ScheduleOptimizer/mat_mul_pattern_data_layout.ll