diff options
author | Richard Guenther <rguenther@suse.de> | 2012-06-06 09:45:27 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-06-06 09:45:27 +0000 |
commit | d0582dc1815c0fb684b97dc88f3a3152d5f517f7 (patch) | |
tree | 9f8f31aa67b331c5ef8513c22367a259275a267c /gcc/tree-data-ref.h | |
parent | 4ad4fa63349426505aecfea69a8e54aae3f88870 (diff) | |
download | gcc-d0582dc1815c0fb684b97dc88f3a3152d5f517f7.tar.gz |
re PR tree-optimization/53081 (memcpy/memset loop recognition)
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.
From-SVN: r188261
Diffstat (limited to 'gcc/tree-data-ref.h')
-rw-r--r-- | gcc/tree-data-ref.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/tree-data-ref.h b/gcc/tree-data-ref.h index 853dd813411..db33e328c3e 100644 --- a/gcc/tree-data-ref.h +++ b/gcc/tree-data-ref.h @@ -615,11 +615,8 @@ bool rdg_defs_used_in_other_loops_p (struct graph *, int); with a stride equal to its unit type size. */ static inline bool -adjacent_store_dr_p (struct data_reference *dr) +adjacent_dr_p (struct data_reference *dr) { - if (!DR_IS_WRITE (dr)) - return false; - /* If this is a bitfield store bail out. */ if (TREE_CODE (DR_REF (dr)) == COMPONENT_REF && DECL_BIT_FIELD (TREE_OPERAND (DR_REF (dr), 1))) |