diff options
author | Joseph Huber <huberjn@outlook.com> | 2024-08-14 16:54:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-14 16:54:38 -0500 |
commit | a88f3a331137d6379f2f1189d5eb4b086c686ab4 (patch) | |
tree | 1f38130b113a7f221805600e298475819b7defb7 /clang/lib/Frontend/CreateInvocationFromCommandLine.cpp | |
parent | e9b7983fc6826eceb819a3cdb0301c401847ade4 (diff) | |
download | llvm-a88f3a331137d6379f2f1189d5eb4b086c686ab4.zip llvm-a88f3a331137d6379f2f1189d5eb4b086c686ab4.tar.gz llvm-a88f3a331137d6379f2f1189d5eb4b086c686ab4.tar.bz2 |
[Clang] Add `__CLANG_GPU_DISABLE_MATH_WRAPPERS` macro for offloading math (#98234)
Summary:
Currently we replace all math calls with vendor specific ones. This
patch introduces a macro `__CLANG_GPU_DISABLE_MATH_WRAPPERS` that when
defined will disable this.
I went this route instead of a flag for two reasons. One, I think we
have too many flags as is, and we already have `-nogpuinc` to cover
disabling these wrappers entirely, so this would be a really specific
subset of that. Second, these math headers aren't easily decoupled by
simply not including a single header from the clang driver layer.
There's the cmath and the regular math forward declares it would disable
as well.
Note, this currently causes errors because the GPU `libm` doesn't have
`powi`, that's an NVIDIA extension I'll add to LLVM libm.
Diffstat (limited to 'clang/lib/Frontend/CreateInvocationFromCommandLine.cpp')
0 files changed, 0 insertions, 0 deletions