[PATCH] D39333: [Polly][ZoneAlgo/ForwardOpTree] Normalize PHIs to their known incoming values.

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 08:19:15 PDT 2017


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

Represent PHIs by their incoming values instead of an opaque value of themselves. This allows ForwardOpTree to "look through" the PHIs and forward the incoming values since forwardings PHIs is currently not supported.

This is particularly useful to cope with PHIs inserted by GVN LoadPRE. The incoming values all resolve to a load from a single array element which then can be forwarded.

It should in theory also reduce spurious conflicts in value mapping (DeLICM), but I have not yet found a profitable case yet.

To avoid transitive closure and potentially necessary overapproximations of those, PHIs that may reference themselves are excluded from normalization and keep their opaque self-representation.

The feature is disabled by default because it currently causes a significant compile time increase (when the max operations limit is disabled). Either we resolve this bottleneck (mostly in ZoneAlgorithm::computeKnownFromLoad()) or introduce support forwarding PHIs instead. In both cases, having the ability to remove any (non-recursive) PHI from the known content map is a good test to determine whether these cause a problem.


https://reviews.llvm.org/D39333

Files:
  include/polly/ZoneAlgo.h
  lib/Transform/DeLICM.cpp
  lib/Transform/ForwardOpTree.cpp
  lib/Transform/ZoneAlgo.cpp
  test/ForwardOpTree/atax.ll
  test/ForwardOpTree/forward_phi_load.ll
  test/ForwardOpTree/jacobi-1d.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39333.120414.patch
Type: text/x-patch
Size: 47893 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171026/ef47726d/attachment.bin>


More information about the llvm-commits mailing list