Commit 826a536d by Richard Biener Committed by Richard Biener

tree-loop-distribution.c: Include tree-vectorizer.h for find_loop_location.

2013-10-02  Richard Biener  <rguenther@suse.de>

	* tree-loop-distribution.c: Include tree-vectorizer.h for
	find_loop_location.
	(enum partition_kind): Remove PKIND_REDUCTION.
	(struct partition_s): Remove has_writes member, add reduction_p
	member.
	(partition_alloc): Adjust.
	(partition_builtin_p): Likewise.
	(partition_has_writes): Remove.
	(partition_reduction_p): New function.
	(partition_merge_into): Likewise.
	(generate_code_for_partition): Commonize builtin partition
	handling tail.
	(rdg_cannot_recompute_vertex_p): Remove.
	(already_processed_vertex_p): Likewise.
	(rdg_flag_vertex): Do not set has_writes.
	(classify_partition): Adjust.
	(rdg_build_partitions): Do not set has_writes, treat all
	partitions as useful.
	(distribute_loop): Record number of library calls generated.
	Adjust.
	(tree_loop_distribution): Report number of loops and library
	calls generated as opt-info.

	* gcc.dg/tree-ssa/ldist-11.c: Adjust.
	* gcc.dg/tree-ssa/ldist-17.c: Likewise.
	* gcc.dg/tree-ssa/ldist-23.c: Likewise.
	* gcc.dg/tree-ssa/ldist-pr45948.c: Likewise.
	* gfortran.dg/ldist-pr45199.f: Likewise.

From-SVN: r203115
parent 4b403ece
2013-10-02 Richard Biener <rguenther@suse.de>
* tree-loop-distribution.c: Include tree-vectorizer.h for
find_loop_location.
(enum partition_kind): Remove PKIND_REDUCTION.
(struct partition_s): Remove has_writes member, add reduction_p
member.
(partition_alloc): Adjust.
(partition_builtin_p): Likewise.
(partition_has_writes): Remove.
(partition_reduction_p): New function.
(partition_merge_into): Likewise.
(generate_code_for_partition): Commonize builtin partition
handling tail.
(rdg_cannot_recompute_vertex_p): Remove.
(already_processed_vertex_p): Likewise.
(rdg_flag_vertex): Do not set has_writes.
(classify_partition): Adjust.
(rdg_build_partitions): Do not set has_writes, treat all
partitions as useful.
(distribute_loop): Record number of library calls generated.
Adjust.
(tree_loop_distribution): Report number of loops and library
calls generated as opt-info.
2013-10-02 Andrew MacLeod <amacleod@redhat.com>
* tree-flow.h: Include new .h files. Move prototypes.
......
2013-10-02 Richard Biener <rguenther@suse.de>
* gcc.dg/tree-ssa/ldist-11.c: Adjust.
* gcc.dg/tree-ssa/ldist-17.c: Likewise.
* gcc.dg/tree-ssa/ldist-23.c: Likewise.
* gcc.dg/tree-ssa/ldist-pr45948.c: Likewise.
* gfortran.dg/ldist-pr45199.f: Likewise.
2013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58565
......
......@@ -28,6 +28,6 @@ void foo (int * __restrict__ ia,
*/
}
/* { dg-final { scan-tree-dump-times "distributed: split to 2 loops" 1 "ldist" } } */
/* { dg-final { scan-tree-dump-times "distributed: split to 1 loops and 1 library calls" 1 "ldist" } } */
/* { dg-final { scan-tree-dump-times "generated memset zero" 1 "ldist" } } */
/* { dg-final { cleanup-tree-dump "ldist" } } */
......@@ -45,6 +45,6 @@ mad_synth_mute (struct mad_synth *synth)
return;
}
/* { dg-final { scan-tree-dump "distributed: split to 4" "ldist" } } */
/* { dg-final { scan-tree-dump "distributed: split to 0 loops and 4 library calls" "ldist" } } */
/* { dg-final { scan-tree-dump-times "generated memset zero" 4 "ldist" } } */
/* { dg-final { cleanup-tree-dump "ldist" } } */
......@@ -29,6 +29,6 @@ int main()
return 0;
}
/* { dg-final { scan-tree-dump "split to 2 loops" "ldist" } } */
/* { dg-final { scan-tree-dump "split to 1 loops and 1 library call" "ldist" } } */
/* { dg-final { scan-tree-dump "generated memcpy" "ldist" } } */
/* { dg-final { cleanup-tree-dump "ldist" } } */
......@@ -18,6 +18,6 @@ foo (int i, int n)
/* We should apply loop distribution and generate 2 memset (0). */
/* { dg-final { scan-tree-dump "distributed: split to 2" "ldist" } } */
/* { dg-final { scan-tree-dump "distributed: split to 0 loops and 2 library calls" "ldist" } } */
/* { dg-final { scan-tree-dump-times "generated memset zero" 2 "ldist" } } */
/* { dg-final { cleanup-tree-dump "ldist" } } */
......@@ -22,6 +22,6 @@
! GCC should apply memset zero loop distribution and it should not ICE.
! { dg-final { scan-tree-dump "distributed: split to 9 loops" "ldist" } }
! { dg-final { scan-tree-dump "distributed: split to 0 loops and 9 library calls" "ldist" } }
! { dg-final { scan-tree-dump-times "generated memset zero" 9 "ldist" } }
! { dg-final { cleanup-tree-dump "ldist" } }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment