This is an archive of the discontinued LLVM Phabricator instance.

[Polly][DeLICM] Add -polly-delicm-overapproximate-writes option.
ClosedPublic

Authored by Meinersbur on Mar 8 2017, 3:29 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

Meinersbur created this revision.Mar 8 2017, 3:29 PM
grosser accepted this revision.Mar 8 2017, 9:39 PM

LGTM.

This revision is now accepted and ready to land.Mar 8 2017, 9:39 PM
This revision was automatically updated to reflect the committed changes.