[all-commits] [llvm/llvm-project] 3d9409: [NVPTX] Make ctor/dtor lowering always enabled in ...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Mon Feb 10 12:26:06 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3d9409f5bc413b12acf95b4a6c2a5c8860d95d7c
https://github.com/llvm/llvm-project/commit/3d9409f5bc413b12acf95b4a6c2a5c8860d95d7c
Author: Joseph Huber <huberjn at outlook.com>
Date: 2025-02-10 (Mon, 10 Feb 2025)
Changed paths:
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/lib/Driver/ToolChains/Cuda.cpp
M clang/lib/Driver/ToolChains/Cuda.h
M clang/lib/Sema/SemaDeclAttr.cpp
M clang/test/Driver/cuda-cross-compiling.c
M clang/test/SemaCUDA/device-var-init.cu
M libc/cmake/modules/LLVMLibCTestRules.cmake
M libcxx/test/configs/nvptx-libc++-shared.cfg.in
M llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
R llvm/test/CodeGen/NVPTX/global-ctor.ll
R llvm/test/CodeGen/NVPTX/global-dtor.ll
M llvm/test/CodeGen/NVPTX/lower-ctor-dtor.ll
Log Message:
-----------
[NVPTX] Make ctor/dtor lowering always enabled in NVPTX (#126544)
Summary:
Currently we conditionally enable NVPTX lowering depending on the
language (C/C++/OpenMP). Unfortunately this causes problems because this
option is only present if the backend was enabled, which causes this to
error if you try to make LLVM-IR.
This patch instead makes it the only accepted lowering. The reason we
had it as opt-in before is because it is not handled by CUDA. So, this
pach also introduces diagnostics to prevent *all* creation of
device-side global constructors and destructors. We already did this for
variables, now we do it for attributes as well.
This inverts the responsibility of blocking this from the backend to the
langauage like it should be given that support for this is language
dependent.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list