[PATCH] D34609: [Polly][WIP] Insert copy statements into the domain of the schedule tree

Roman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 26 00:20:42 PDT 2017


gareevroman created this revision.
Herald added a reviewer: bollu.

Copy statements are implemented using extensions nodes. That causes the following issues:

1. It is not possible to recompute the dependencies that can be necessary for dependence analysis and, subsequently, detection of parallel loops.
2. It is not possible to print schedules that contains extensions nodes.
3. If someone wants to further optimize the schedule tree, the extensions nodes should be handled separately.

This patch makes polly insert copy statements into the domain of the schedule tree to avoid the issues stated above. In particular, it helps to generate parallel code in case of GEMM.

For example, in case of the GEMM from PolyBench 3.2, alpha = beta = 1, Intel Core i7-3820 SandyBridge, OMP_NUM_THREADS = 8, and the following options,

clang -O3 gemm.c -I utilities/ utilities/polybench.c -DPOLYBENCH_TIME -march=native  -mllvm -polly -DPOLYBENCH_USE_SCALAR_LB -mllvm —polly-parallel -lgomp

it helps to improve the execution time of generated code from 0.099 seconds to 0.038 seconds in case of standard dataset, from 0.734 seconds to 0.242 seconds in case of large data set, and from 5.78 seconds to 1.74 seconds in case extra large dataset.


https://reviews.llvm.org/D34609

Files:
  lib/CodeGen/IslNodeBuilder.cpp
  lib/External/isl/include/isl/schedule_node.h
  lib/External/isl/isl_schedule_node.c
  lib/External/isl/isl_schedule_node_private.h
  lib/Transform/ScheduleOptimizer.cpp
  test/ScheduleOptimizer/mat_mul_pattern_data_layout.ll
  test/ScheduleOptimizer/pattern-matching-based-opts_11.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34609.103889.patch
Type: text/x-patch
Size: 29481 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170626/6ced2d76/attachment.bin>


More information about the llvm-commits mailing list