[ZoneAlgo/ForwardOpTree] Normalize PHIs to their known incoming values.
commit43ae51554d26b6e4230b14e2daf866a4a0037886
authorMichael Kruse <llvm@meinersbur.de>
Tue, 31 Oct 2017 16:11:46 +0000 (31 16:11 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Tue, 31 Oct 2017 16:11:46 +0000 (31 16:11 +0000)
treee181e18f4d6903d8904b9bd335ca87fe01678b96
parent281b59f96a1abb2a1bf050109599db05c91f3dc6
[ZoneAlgo/ForwardOpTree] Normalize PHIs to their known incoming values.

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, so it is
not included here.

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.

Differential Revision: https://reviews.llvm.org/D39333

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@317008 91177308-0d34-0410-b5e6-96231b3b80d8
include/polly/ZoneAlgo.h
lib/Transform/DeLICM.cpp
lib/Transform/ForwardOpTree.cpp
lib/Transform/ZoneAlgo.cpp
test/ForwardOpTree/atax.ll [new file with mode: 0644]
test/ForwardOpTree/forward_phi_load.ll [new file with mode: 0644]
test/ForwardOpTree/jacobi-1d.ll [new file with mode: 0644]
test/ForwardOpTree/noforward_selfrefphi.ll [new file with mode: 0644]