[PATCH] D30763: [Polly][DeLICM] Add -polly-delicm-overapproximate-writes option.

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 8 15:29:16 PST 2017


Meinersbur created this revision.
Meinersbur added a project: Polly.

One of the current limitations of DeLICM is that it only creates PHI WRITEs that it knows are also read by some PHI. Such writes may not span all instances of a statement. Polly's code generator currently does not support MemoryAccesses that are not executed in all instances ('partial accesses') and so has to give up on a possible mapping.

This workaround has once been suggested by Tobias Grosser: Try to interpolate an arbitrary expansion to all instances. It will be checked for possible conflicts with the existing Knowledge and can be applied if the conflict checking result is that no semantics are changed.

Expansion is done by simplifying the mapping by coalescing with the hope that coalescing will find a polyhedral 'rule' of the relevant map. It is then 'gist'-ed using the domain of the relevant instances such that the rule is expanded to the universe and finally intersected with the domain of all statement instances.

By the expansion conflicts become more likely, the found rule may still not encompass all statement instances and the found rule exposes internals of isl's implementation of coalesce and gist. The latter means that the result depends on how much effort the implementation invests into finding a rule which may change between versions of isl. Trivial implementations of gist and coalesce just return the input arguments.

I patch which makes codegen support partial accesses is in the making as well.


https://reviews.llvm.org/D30763

Files:
  lib/Transform/DeLICM.cpp
  test/DeLICM/reduction_overapproximate.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30763.91081.patch
Type: text/x-patch
Size: 8539 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170308/bd5ffc44/attachment.bin>


More information about the llvm-commits mailing list