llvm-project/polly/test/ForwardOpTree
Tobias Grosser d6e0679c4e [ForwardOp] Remove read accesses for all instructions that have been moved
Before this patch, OpTree did not consider forwarding an operand tree consisting
of only single LoadInst as useful. The motivation was that, like an access to a
read-only variable, it would just replace one MemoryAccess by another. However,
in contrast to read-only accesses, this would replace a scalar access by an
array access, which is something worth doing.

In addition, leaving scalar MemoryAccess is problematic in that VirtualUse
prioritizes inter-Stmt use over intra-Stmt. It was possible that the same LLVM
value has a MemoryAccess for accessing the remote Stmt's LoadInst as well as
having the same LoadInst in its own instruction list (due to being forwarded
from another operand tree).

With this patch we ensure that if a LoadInst is forwarded is any operand tree,
also the operand tree containing just the LoadInst is forwarded as well, which
effectively removes the scalar MemoryAccess such that only the array access
remains, not both.

Thanks Michael for the detailed explanation.

Reviewers: Meinersbur, bellu, singam-sanjay, gareevroman

Subscribers: hfinkel, pollydev, llvm-commits

Tags: #polly

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

llvm-svn: 312456
2017-09-03 19:52:15 +00:00
..
forward_from_region.ll [ForwardOpTree] Allow forwarding in the presence of region statements 2017-08-31 16:04:49 +00:00
forward_hoisted.ll [test] Add descriptions and pseudocode to tests. NFC. 2017-08-08 17:26:19 +00:00
forward_instruction.ll
forward_into_region.ll [ForwardOpTree] Allow forwarding in the presence of region statements 2017-08-31 16:04:49 +00:00
forward_into_region_redundant_use.ll [ForwardOp] Remove read accesses for all instructions that have been moved 2017-09-03 19:52:15 +00:00
forward_load.ll [test] Add descriptions and pseudocode to tests. NFC. 2017-08-08 17:26:19 +00:00
forward_load_differentarray.ll [test] Add descriptions and pseudocode to tests. NFC. 2017-08-08 17:26:19 +00:00
forward_load_double_write.ll [ZoneAlgo] Allow two writes that write identical values into same array slot 2017-08-07 22:01:29 +00:00
forward_load_fromloop.ll [test] Add descriptions and pseudocode to tests. NFC. 2017-08-08 17:26:19 +00:00
forward_load_indirect.ll [test] Add descriptions and pseudocode to tests. NFC. 2017-08-08 17:26:19 +00:00
forward_load_tripleuse.ll [ForwardOp] Remove read accesses for all instructions that have been moved 2017-09-03 19:52:15 +00:00
forward_load_unrelatedunusual.ll [ZoneAlgo] More fine-grained bail-out. 2017-08-28 20:39:07 +00:00
forward_readonly.ll [ForwardOpTree] Support read-only value uses. 2017-07-24 12:43:27 +00:00
forward_synthesizable_definloop.ll [ForwardOpTree] Support synthesizable values. 2017-07-31 19:46:21 +00:00
forward_synthesizable_indvar.ll [ForwardOpTree] Support synthesizable values. 2017-07-31 19:46:21 +00:00
forward_synthesizable_useinloop.ll [ForwardOpTree] Support synthesizable values. 2017-07-31 19:46:21 +00:00
forward_transitive.ll
noforward_from_region.ll [ForwardOpTree] Allow forwarding in the presence of region statements 2017-08-31 16:04:49 +00:00
noforward_load_conditional.ll [test] Add descriptions and pseudocode to tests. NFC. 2017-08-08 17:26:19 +00:00
noforward_load_writebetween.ll [test] Add descriptions and pseudocode to tests. NFC. 2017-08-08 17:26:19 +00:00
noforward_partial.ll
noforward_phi.ll
noforward_sideffects.ll
noforward_synthesizable_unknownit.ll [ForwardOpTree] Support synthesizable values. 2017-07-31 19:46:21 +00:00