https://gcc.gnu.org/g:f3ba855cc226c6eea46922dd5f6c85eb1dab42d3
commit f3ba855cc226c6eea46922dd5f6c85eb1dab42d3 Author: Andrew Stubbs <[email protected]> Date: Tue Nov 10 09:50:00 2026 +0000 Revert "Add --param offload-gpu-mode" This reverts commit fb6d68b6bffe6570c3c4033334367510b2d769f8. Diff: --- gcc/doc/params.texi | 24 ------------------------ gcc/flag-types.h | 9 --------- gcc/omp-general.cc | 15 +-------------- gcc/params.opt | 19 ------------------- 4 files changed, 1 insertion(+), 66 deletions(-) diff --git a/gcc/doc/params.texi b/gcc/doc/params.texi index 800732e86995..31b04688cf77 100644 --- a/gcc/doc/params.texi +++ b/gcc/doc/params.texi @@ -1950,30 +1950,6 @@ bubbles. This is the current default. Zero means the scheduling description might not be available/accurate or perhaps not applicable at all, such as for modern out-of-order processors. -@item offload-gpu-mode -Controls how vector parallel code is generated for OpenMP and OpenACC offload -kernels. Different modes may suit different use cases, and may be implemented -to differing levels of completion. Not all GPUs support all the modes. -@option{--param=offload-gpu-mode=auto} selects the recommended mode for each -GPU architecture. -@option{--param=offload-gpu-mode=simd} uses the autovectorizer for all kernel -code (default on AMD GCN, not available for NVPTX). In general, SIMD mode may -produce tighter loops, but performs very badly if the vectorizer fails (due to -function calls, pattern mismatches, or complex logic). The vectorizer is -active for all GPU code, at @option{-O2} or above; the OpenMP and OpenACC -directives are treated as optimization hints. -@option{--param=offload-gpu-mode=simt-directed} (default on NVPTX, experimental -on AMD GCN) uses SIMT code-generation for loops with an OpenMP @samp{simd} -directive, or an OpenACC @samp{loop vector} directive. Code that does not use -these directives will not make use of the vector hardware at all. -@samp{omp_get_num_threads} reports the wavefront/warp count. -@option{--param=offload-gpu-mode=simt} (experimental) uses SIMT for all code -parallelized with OpenMP threads (OpenACC behavior is unchanged from -@option{simt-directed} mode). The OpenMP @samp{simd} directive may be a no-op. -@samp{omp_get_num_threads} reports the total number of work-items/threads -across all wavefronts/warps. This mode most-closely imitates the LLVM -behavior. - @end table @node Target-Specific Parameters diff --git a/gcc/flag-types.h b/gcc/flag-types.h index 9fdf22033a7e..dd5a4433605c 100644 --- a/gcc/flag-types.h +++ b/gcc/flag-types.h @@ -591,15 +591,6 @@ enum omp_target_mode_kind OMP_TARGET_MODE_OMPACC = 1 }; -/* Modes for -param=offload-gpu-mode. */ -enum offload_gpu_modes -{ - OFFLOAD_GPU_MODE_AUTO, - OFFLOAD_GPU_MODE_SIMD, - OFFLOAD_GPU_MODE_SIMT_DIRECTED, - OFFLOAD_GPU_MODE_SIMT -}; - #endif #endif /* ! GCC_FLAG_TYPES_H */ diff --git a/gcc/omp-general.cc b/gcc/omp-general.cc index e10b6e23061a..5dd594ac2112 100644 --- a/gcc/omp-general.cc +++ b/gcc/omp-general.cc @@ -1062,20 +1062,7 @@ omp_max_simt_vf (void) if (ENABLE_OFFLOADING) for (const char *c = getenv ("OFFLOAD_TARGET_NAMES"); c;) { - if (startswith (c, "amdgcn")) - { - switch (param_offload_gpu_mode) - { - case OFFLOAD_GPU_MODE_SIMT: /* For now. */ - case OFFLOAD_GPU_MODE_SIMT_DIRECTED: - return 64; - case OFFLOAD_GPU_MODE_AUTO: - case OFFLOAD_GPU_MODE_SIMD: - return 0; - } - gcc_unreachable (); - } - else if (startswith (c, "nvptx")) + if (startswith (c, "nvptx")) return 32; else if ((c = strchr (c, ':'))) c++; diff --git a/gcc/params.opt b/gcc/params.opt index 40418a294e15..b35ca688cdf1 100644 --- a/gcc/params.opt +++ b/gcc/params.opt @@ -882,25 +882,6 @@ The minimum probability of reaching a source block for interblock speculative sc Common Joined UInteger Var(param_min_vect_loop_bound) Param Optimization If -ftree-vectorize is used, the minimal loop bound of a loop to be considered for vectorization. -Enum -Name(offload_gpu_modes) Type(enum offload_gpu_modes) - -EnumValue -Enum(offload_gpu_modes) String(auto) Value(OFFLOAD_GPU_MODE_AUTO) - -EnumValue -Enum(offload_gpu_modes) String(simd) Value(OFFLOAD_GPU_MODE_SIMD) - -EnumValue -Enum(offload_gpu_modes) String(simt-directed) Value(OFFLOAD_GPU_MODE_SIMT_DIRECTED) - -EnumValue -Enum(offload_gpu_modes) String(simt) Value(OFFLOAD_GPU_MODE_SIMT) - --param=offload-gpu-mode= -Common Joined Enum(offload_gpu_modes) Var(param_offload_gpu_mode) Init(OFFLOAD_GPU_MODE_AUTO) Param Optimization ---param=offload-gpu-mode=[auto|simd|simt-directed|simt] Specify what vector parallelization mode to use for GPU offload kernels. - -param=openacc-kernels= Common Joined Enum(openacc_kernels) Var(param_openacc_kernels) Init(OPENACC_KERNELS_PARLOOPS) Param --param=openacc-kernels=[decompose|parloops] Specify mode of OpenACC 'kernels' constructs handling.
