[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B updated https://github.com/llvm/llvm-project/pull/74123 >From 71e24fc704c82c11162313613691d09b9a653bd5 Mon Sep 17 00:00:00 2001 From: Artem Belevich Date: Fri, 1 Dec 2023 10:37:08 -0800 Subject: [PATCH 1/3] [CUDA] work around more __noinline__ conflicts with libc++

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread Artem Belevich via cfe-commits
Artem-B wrote: > FWIW I am not thrilled about using `__config` here. That header is an > implementation detail of libc++ and defining it and relying on it is somewhat > brittle. I'm all for having it fixed in libc++ or in CUDA SDK. Barring that, working around the specific implementation deta

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,10 @@ +// CUDA headers define __noinline__ which interferes with libc++'s use of +// `__attribute((__noinline__))`. In order to avoid compilation error, +// temporarily unset __noinline__ when we include affected libc++ header. + +#pragma push_macro("__noinline__") +#un

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread Louis Dionne via cfe-commits
https://github.com/ldionne commented: Some review comments if we end up merging this. FWIW I am not thrilled about using `__config` here. That header is an implementation detail of libc++ and defining it and relying on it is somewhat brittle. https://github.com/llvm/llvm-project/pull/74123 __

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread Louis Dionne via cfe-commits
@@ -0,0 +1,10 @@ +// CUDA headers define __noinline__ which interferes with libc++'s use of +// `__attribute((__noinline__))`. In order to avoid compilation error, +// temporarily unset __noinline__ when we include affected libc++ header. + +#pragma push_macro("__noinline__") +#un

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread Louis Dionne via cfe-commits
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/74123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread Artem Belevich via cfe-commits
Artem-B wrote: > I think we can find a solution to work around this in libc++ within a > reasonable timeframe OK. I'll hold off on landing the patch. I believe we're not blocked on it at the moment. https://github.com/llvm/llvm-project/pull/74123

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B updated https://github.com/llvm/llvm-project/pull/74123 >From 71e24fc704c82c11162313613691d09b9a653bd5 Mon Sep 17 00:00:00 2001 From: Artem Belevich Date: Fri, 1 Dec 2023 10:37:08 -0800 Subject: [PATCH 1/2] [CUDA] work around more __noinline__ conflicts with libc++

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 edited https://github.com/llvm/llvm-project/pull/74123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,10 @@ +// CUDA headers define __noinline__ which interferes with libc++'s use of +// `__attribute((__noinline__))`. In order to avoid compilation error, +// temporarily unset __noinline__ when we include affected libstdc++ header. philnik777 wrote: ```

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread Nikolas Klauser via cfe-commits
@@ -0,0 +1,10 @@ +// CUDA headers define __noinline__ which interferes with libc++'s use of +// `__attribute((__noinline__))`. In order to avoid compilation error, +// temporarily unset __noinline__ when we include affected libstdc++ header. philnik777 wrote: ```

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread Artem Belevich via cfe-commits
Artem-B wrote: Yes, I've mentioned that in https://github.com/llvm/llvm-project/pull/73838. However, we need something to fix the issue right now while we're figuring out a better solution. In any case `__noinline__` is unlikely to be widely used, so the wrappers may be manageable, at least

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread Dmitri Gribenko via cfe-commits
gribozavr wrote: I don't mind this, but should libc++ start using `_LIBCPP_NOINLINE`, we would be playing a catch-up game here. https://github.com/llvm/llvm-project/pull/74123 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Artem Belevich (Artem-B) Changes https://github.com/llvm/llvm-project/pull/73838 --- Full diff: https://github.com/llvm/llvm-project/pull/74123.diff 3 Files Affected: - (modified) clang/lib/Headers/CMakeLists.txt (+2) - (added) clang/l

[clang] [CUDA] work around more __noinline__ conflicts with libc++ (PR #74123)

2023-12-01 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B created https://github.com/llvm/llvm-project/pull/74123 https://github.com/llvm/llvm-project/pull/73838 >From 71e24fc704c82c11162313613691d09b9a653bd5 Mon Sep 17 00:00:00 2001 From: Artem Belevich Date: Fri, 1 Dec 2023 10:37:08 -0800 Subject: [PATCH] [CUDA] work arou