[PATCH] D38403: [Polly][ScopBuilder][WIP] Introduce -polly-stmt-granularity=scalar-indep option.

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 29 07:23:35 PDT 2017


Meinersbur created this revision.
Meinersbur added a project: Polly.
Herald added a reviewer: bollu.

The option splits BasicBlocks into minimal statements such that no additional scalar dependencies are introduced.

The algorithm is based on a union-find structure, and unites sets if putting them into separate statements would introduce a scalar dependencies. As a consequence, instructions may be split into separate statements such their relative order is different than the statements they are in. This is accounted for instructions whose relative order matters (e.g. memory accesses).

The algorithm is generic in that heuristic changes can be made with relative ease. We might relax the order requirement for read-reads or accesses to different base pointers. Forwardable instructions can be made to not cause a join.

This implementation gives us a speed-up of 82% in SPEC 2006 456.hmmer benchmark by allowing loop-distribution in a hot loop.

Currently WIP because there is an issue with required invariant loads to solve. Such loads are considered 'synthesiable', but are are assumed to have a MemoryAccess in some statement that is later removed.


https://reviews.llvm.org/D38403

Files:
  include/polly/ScopBuilder.h
  lib/Analysis/ScopBuilder.cpp
  test/ScopInfo/granularity_scalar-indep.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38403.117140.patch
Type: text/x-patch
Size: 11843 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170929/43fadc05/attachment.bin>


More information about the llvm-commits mailing list