openacc: Turn off worker partitioning if num_workers==1
authorJulian Brown <julian@codesourcery.com>
Mon, 29 Jun 2020 20:16:51 +0000 (13:16 -0700)
committerThomas Schwinge <thomas@codesourcery.com>
Fri, 17 Sep 2021 19:04:29 +0000 (21:04 +0200)
commit82792cc407d7a7ab99f37e8501d19be2e6164e50
tree17389c9571d795bbf51eefbdab23dc0d5e6f73ed
parent8251f90e87f67e09f5203e8edd77bfe73b68a54d
openacc: Turn off worker partitioning if num_workers==1

This patch turns off the middle-end worker-partitioning support if the
number of workers for an outlined offload function is one.  In that case,
we do not need to perform the broadcasting/neutering code transformation.

gcc/
* omp-oacc-neuter-broadcast.cc
(pass_omp_oacc_neuter_broadcast::gate): Disable if num_workers is
1.
(execute_omp_oacc_neuter_broadcast): Adjust.

Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com>
gcc/omp-oacc-neuter-broadcast.cc