This is the mail archive of the gcc-cvs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

r237265 - in /branches/hsa: gcc/ChangeLog.hsa g...


Author: jamborm
Date: Thu Jun  9 14:24:16 2016
New Revision: 237265

URL: https://gcc.gnu.org/viewcvs?rev=237265&root=gcc&view=rev
Log:
OMP lowering/expansion changes to gridify tiled loops

2016-06-09  Martin Jambor  <mjambor@suse.cz>

gcc/
	* gimple.h (enum gf_mask): New element GF_OMP_FOR_GRID_GROUP_ITER.
	(gimple_omp_for_grid_group_iter): New function.
	(gimple_omp_for_set_grid_group_iter): Likewise.
	* omp-low.c (check_omp_nesting_restrictions): Allow kernel loop in
	place of a distribute one.
	(grid_expand_omp_for_loop): New parameter specifying whether the loop
	is an intra-group one.  If so or if the loop is over groups, use the
	respective builtins for expansion.  Emit barriers for intra-group
	ones.  Moved a branch removeal here from grid_expand_target_grid_body.
	(grid_expand_target_grid_body): If the loop iterates over groups, find
	the intra-group ones, expand them and remove them from the OMP
	construct tree.
	(grid_prop): New type.
	(grid_safe_assignment_p): New parameter grid, do not consider safe
	assignments to variables holding group sizes.
	(grid_seq_only_contains_local_assignments): New parameter grid, pass
	it to grid_safe_assignment_p.
	(grid_find_single_omp_among_assignments_1): Likewise.  Also tkae
	target location from grid.  Emit more missed-optimizations
	information.
	(grid_find_single_omp_among_assignments): Likewise.
	(grid_parallel_clauses_gridifiable): New function.
	(grid_inner_loop_gridifiable_p): Likewise.
	(grid_dist_follows_simple_pattern): Likewise.
	(grid_gfor_follows_tiling_pattern): Likewise.
	(grid_call_permissible_in_distribute_p): Likewise.
	(grid_handle_call_in_distribute): Likewise.
	(grid_dist_follows_tiling_pattern): Likewise.
	(grid_target_follows_gridifiable_pattern): New parameter grid.  If
	distribute is not in a combined construct, attempt tiled
	gridification.  Parts of simple gridification moved to the new
	functions.
	(grid_var_segment): New enum.
	(grid_mark_variable_segment): New function.
	(grid_copy_leading_local_assignments): Also call
	grid_mark_variable_segment if requested by a new parameter.
	(grid_mark_tiling_loops): New function.
	(grid_mark_tiling_parallels_and_loops): Likewise.
	(grid_process_kernel_body_copy): Also handle tiled grids.
	(grid_attempt_target_gridification): new variable grid to be passed
	around.  Get group sizes from it.

gcc/testsuite/
	* c-c++-common/gomp/gridify-2.c: New test.
        * c-c++-common/gomp/gridify-3.c: Likewise.

libgomp/
	* testsuite/libgomp.hsa.c/tiling-1.c: New test.
        * testsuite/libgomp.hsa.c/tiling-2.c: Likewise.


Added:
    branches/hsa/gcc/testsuite/ChangeLog.hsa
    branches/hsa/gcc/testsuite/c-c++-common/gomp/gridify-2.c
    branches/hsa/gcc/testsuite/c-c++-common/gomp/gridify-3.c
    branches/hsa/libgomp/testsuite/libgomp.hsa.c/tiling-1.c
    branches/hsa/libgomp/testsuite/libgomp.hsa.c/tiling-2.c
Modified:
    branches/hsa/gcc/ChangeLog.hsa
    branches/hsa/gcc/gimple.h
    branches/hsa/gcc/omp-low.c
    branches/hsa/libgomp/ChangeLog.hsa


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]