2012-06-06 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 6 Jun 2012 09:45:27 +0000 (09:45 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 6 Jun 2012 09:45:27 +0000 (09:45 +0000)
commitf689d33df9a7a6dcddeaf4036c3eae14b77eb3f3
tree9f8f31aa67b331c5ef8513c22367a259275a267c
parent966d41755f20f1cf126ae2035c426edfc6f273a9
2012-06-06  Richard Guenther  <rguenther@suse.de>

PR tree-optimization/53081
* tree-data-ref.h (adjacent_store_dr_p): Rename to ...
(adjacent_dr_p): ... this and make it work for reads, too.
* tree-loop-distribution.c (enum partition_kind): Add PKIND_MEMCPY.
(struct partition_s): Change main_stmt to main_dr, add
secondary_dr member.
(build_size_arg_loc): Change to date data-reference and not
gimplify here.
(build_addr_arg_loc): New function split out from ...
(generate_memset_builtin): ... here.  Use it and simplify.
(generate_memcpy_builtin): New function.
(generate_code_for_partition): Adjust.
(classify_partition): Streamline pattern detection.  Detect
memcpy.
(ldist_gen): Adjust.
(tree_loop_distribution): Adjust seed statements for memcpy
recognition.

* gcc.dg/tree-ssa/ldist-20.c: New testcase.
* gcc.dg/tree-ssa/loop-19.c: Add -fno-tree-loop-distribute-patterns.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188261 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/ldist-20.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/tree-ssa/loop-19.c
gcc/tree-data-ref.h
gcc/tree-loop-distribution.c