[ForwardOpTree] Use known array content analysis to forward load instructions.
authorMichael Kruse <llvm@meinersbur.de>
Mon, 7 Aug 2017 18:40:29 +0000 (18:40 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Mon, 7 Aug 2017 18:40:29 +0000 (18:40 +0000)
commit70af4f579d350593afba16db6df10c888e73de8a
tree2eafce4c218f2deeb21b18a423fc085ca95991fb
parent4504fe2449510a059304298fe035a6d689abb7d7
[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

llvm-svn: 310279
15 files changed:
polly/include/polly/ScopInfo.h
polly/include/polly/Support/ISLTools.h
polly/include/polly/ZoneAlgo.h
polly/lib/Analysis/ScopInfo.cpp
polly/lib/Support/ISLTools.cpp
polly/lib/Transform/DeLICM.cpp
polly/lib/Transform/ForwardOpTree.cpp
polly/lib/Transform/ZoneAlgo.cpp
polly/test/ForwardOpTree/forward_load.ll [new file with mode: 0644]
polly/test/ForwardOpTree/forward_load_differentarray.ll [new file with mode: 0644]
polly/test/ForwardOpTree/forward_load_fromloop.ll [new file with mode: 0644]
polly/test/ForwardOpTree/forward_load_indirect.ll [new file with mode: 0644]
polly/test/ForwardOpTree/forward_load_tripleuse.ll [new file with mode: 0644]
polly/test/ForwardOpTree/noforward_load_conditional.ll [new file with mode: 0644]
polly/test/ForwardOpTree/noforward_load_writebetween.ll [new file with mode: 0644]