This is the mail archive of the gcc-patches@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]

Re: [patch] various OpenACC reduction enhancements - ME and nvptx changes


On Fri, Jun 29, 2018 at 11:19:53AM -0700, Cesar Philippidis wrote:
> The attached patch includes the nvptx and GCC ME reductions enhancements.
> 
> Is this patch OK for trunk? It bootstrapped / regression tested cleanly
> for x86_64 with nvptx offloading.

This is all OpenACC specific code not really shareable with OpenMP, if
Thomas (for middle-end) and Tom (for NVPTX backend) are ok with it, it is ok
for trunk.

> 2018-06-29  Cesar Philippidis  <cesar@codesourcery.com>
> 	    Nathan Sidwell  <nathan@acm.org>
> 
> 	gcc/
> 	* config/nvptx/nvptx.c (nvptx_propagate_unified): New.
> 	(nvptx_split_blocks): Call it for cond_uni insn.
> 	(nvptx_expand_cond_uni): New.
> 	(enum nvptx_builtins): Add NVPTX_BUILTIN_COND_UNI.
> 	(nvptx_init_builtins): Initialize it.
> 	(nvptx_expand_builtin):
> 	(nvptx_generate_vector_shuffle): Change integral SHIFT operand to
> 	tree BITS operand.
> 	(nvptx_vector_reduction): New.
> 	(nvptx_adjust_reduction_type): New.
> 	(nvptx_goacc_reduction_setup): Use it to adjust the type of ref_to_res.
> 	(nvptx_goacc_reduction_init): Don't update LHS if it doesn't exist.
> 	(nvptx_goacc_reduction_fini): Call nvptx_vector_reduction for vector.
> 	Use it to adjust the type of ref_to_res.
> 	(nvptx_goacc_reduction_teardown):
> 	* config/nvptx/nvptx.md (cond_uni): New pattern.
> 	* omp-general.h (enum oacc_loop_flags): Add OLF_REDUCTION enum.
> 	* omp-low.c (lower_oacc_reductions): Handle reduction decls mapped
> 	with GOMP_MAP_FIRSTPRIVATE_POINTER.
> 	(lower_oacc_head_mark): Use OLF_REDUCTION to mark OpenACC reductions.
> 	* omp-offload.c (oacc_loop_auto_partitions): Don't assign gang
> 	level parallelism to orphan reductions.
> 	(default_goacc_reduction): Retype ref_to_res as necessary.

	Jakub


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