[PATCH] D133802: [OpenMP] Remove simplified device runtime handling

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 13 13:00:49 PDT 2022


jhuber6 added inline comments.


================
Comment at: clang/include/clang/Driver/Options.td:2565-2566
   Flags<[NoArgumentUnused, HelpHidden]>;
-def fopenmp_cuda_force_full_runtime : Flag<["-"], "fopenmp-cuda-force-full-runtime">, Group<f_Group>,
-  Flags<[CC1Option, NoArgumentUnused, HelpHidden]>;
-def fno_openmp_cuda_force_full_runtime : Flag<["-"], "fno-openmp-cuda-force-full-runtime">, Group<f_Group>,
-  Flags<[NoArgumentUnused, HelpHidden]>;
+def fopenmp_cuda_force_full_runtime : Flag<["-"], "fopenmp-cuda-force-full-runtime">, Flags<[HelpHidden]>;
+def fno_openmp_cuda_force_full_runtime : Flag<["-"], "fno-openmp-cuda-force-full-runtime">, Flags<[HelpHidden]>;
 def fopenmp_cuda_number_of_sm_EQ : Joined<["-"], "fopenmp-cuda-number-of-sm=">, Group<f_Group>,
----------------
josemonsalve2 wrote:
> Why not remove these? Are they used somewhere else? 
We usually don't remove driver arguments between releases as this could cause existing applications to stop compiling. Leaving them here will cause Clang to continue compiling but emit an unused flag warning.


================
Comment at: clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp:80-90
   ExecutionRuntimeModesRAII(CGOpenMPRuntimeGPU::ExecutionMode &ExecMode)
       : ExecMode(ExecMode) {
     SavedExecMode = ExecMode;
     ExecMode = CGOpenMPRuntimeGPU::EM_NonSPMD;
   }
   /// Constructor for SPMD mode.
+  ExecutionRuntimeModesRAII(CGOpenMPRuntimeGPU::ExecutionMode &ExecMode, bool)
----------------
josemonsalve2 wrote:
> What if we combine these two and just leave one that receives two modes. I am really confused by this code. Is there something I am missing here? 
Just me being lazy, I'll combine it into a single one.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133802/new/

https://reviews.llvm.org/D133802



More information about the cfe-commits mailing list