[ForwardOpTree] Use known array content analysis to forward load instructions.
commitfabaff9533bd44095a7eb7aa7428cbd5e79d016d
authorMichael Kruse <llvm@meinersbur.de>
Mon, 7 Aug 2017 18:40:29 +0000 (7 18:40 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Mon, 7 Aug 2017 18:40:29 +0000 (7 18:40 +0000)
treeaf921eb737905f1492f9dd38684cfd263a6dd551
parentd5089e17ff4adc63f27344c737a6e02d99080580
[ForwardOpTree] Use known array content analysis to forward load instructions.

This is an addition to the -polly-optree pass that reuses the array
content analysis from DeLICM to find array elements that contain the
same value as the value loaded when the target statement instance
is executed.

The analysis is now enabled by default.

The known content analysis could also be used to rematerialize any
llvm::Value that was written to some array element, but currently
only loads are forwarded.

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

git-svn-id: https://llvm.org/svn/llvm-project/polly/trunk@310279 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed:
include/polly/ScopInfo.h
include/polly/Support/ISLTools.h
include/polly/ZoneAlgo.h
lib/Analysis/ScopInfo.cpp
lib/Support/ISLTools.cpp
lib/Transform/DeLICM.cpp
lib/Transform/ForwardOpTree.cpp
lib/Transform/ZoneAlgo.cpp
test/ForwardOpTree/forward_load.ll [new file with mode: 0644]
test/ForwardOpTree/forward_load_differentarray.ll [new file with mode: 0644]
test/ForwardOpTree/forward_load_fromloop.ll [new file with mode: 0644]
test/ForwardOpTree/forward_load_indirect.ll [new file with mode: 0644]
test/ForwardOpTree/forward_load_tripleuse.ll [new file with mode: 0644]
test/ForwardOpTree/noforward_load_conditional.ll [new file with mode: 0644]
test/ForwardOpTree/noforward_load_writebetween.ll [new file with mode: 0644]