jhuber6 wrote:

There's two things that come to mind for this, OpenCL extensions and kernel 
attributes. OpenCL lets you do things like
```
#pragma OPENCL EXTENSION <extension_name> : <behavior>
```
Which are supposed to influence the code generated, which could conceivably 
extend to a runtime. Kernel attributes are the canonical way to state that a 
kernel doesn't need something. OpenMP doesn't really expose kernels, and the 
OpenMP runtime is global state so it's strange. I'm generally against 
introducing new clang driver flags for increasingly specific behavior. 

The way these are handled right now is just magic config globals we rely on LTO 
to fix-up, I.e. 
`OMPBuilder.createGlobalFlag(CGM.getLangOpts().OpenMPNoThreadState)`. Surely 
there's a way to inject this behavior without a new driver flag every time?

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