================
@@ -4012,6 +4016,21 @@ def fopenmp_target_new_runtime : Flag<["-"], 
"fopenmp-target-new-runtime">,
   Group<f_Group>, Flags<[HelpHidden]>, Visibility<[ClangOption, CC1Option]>;
 def fno_openmp_target_new_runtime : Flag<["-"], 
"fno-openmp-target-new-runtime">,
   Group<f_Group>, Flags<[HelpHidden]>, Visibility<[ClangOption, CC1Option]>;
+def fopenmp_target_ignore_env_vars : Flag<["-"], 
"fopenmp-target-ignore-env-vars">,
+  Group<f_Group>, Flags<[NoArgumentUnused, HelpHidden]>,
+  Visibility<[ClangOption, CC1Option]>,
+  HelpText<"Assume that the OpenMP runtime can ignore environment variables 
during code generation for GPU offload">,
+  MarshallingInfoFlag<LangOpts<"OpenMPTargetIgnoreEnvVars">>;
+def fno_openmp_target_ignore_env_vars : Flag<["-"], 
"fno-openmp-target-ignore-env-vars">,
----------------
nicebert wrote:

Good point about consolidating with `defm`. However, the existing positive 
flags (`fopenmp_assume_no_thread_state`, 
`fopenmp_assume_no_nested_parallelism`) already have `MarshallingInfoFlag` that 
generates the corresponding LangOpts. Using `defm` would require restructuring 
those existing definitions, which goes beyond the scope of just adding negative 
variants.

For this patch, I've kept the minimal change of just adding the `fno_*` 
definitions that enable last-wins semantics. We can consider consolidating with 
`defm` in a follow-up NFC patch that restructures all the assume flags together.

https://github.com/llvm/llvm-project/pull/178914
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to