diff options
author | Joseph Huber <huberjn@outlook.com> | 2024-07-12 15:46:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-12 15:46:51 -0500 |
commit | 1ccd8756f1284e497fe921b955b8e06c8ccfbcdc (patch) | |
tree | f87109c4f5623ea2d1e448cc1f71a4823a25ab51 /llvm/lib/CodeGen/TargetLoweringBase.cpp | |
parent | afb584a5622d67d19539d30287bc8af461f48ca8 (diff) | |
download | llvm-1ccd8756f1284e497fe921b955b8e06c8ccfbcdc.zip llvm-1ccd8756f1284e497fe921b955b8e06c8ccfbcdc.tar.gz llvm-1ccd8756f1284e497fe921b955b8e06c8ccfbcdc.tar.bz2 |
[NVPTX] Disable all RTLib libcalls (#98672)
Summary:
This patch explicitly disables runtime calls to be emitted from the
NVPTX backend. This allows other utilities to know that we do not need
to worry about emitting these.
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringBase.cpp')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringBase.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringBase.cpp b/llvm/lib/CodeGen/TargetLoweringBase.cpp index f36743a..eccac0e 100644 --- a/llvm/lib/CodeGen/TargetLoweringBase.cpp +++ b/llvm/lib/CodeGen/TargetLoweringBase.cpp @@ -312,6 +312,13 @@ void TargetLoweringBase::InitLibcalls(const Triple &TT) { } } + // Disable most libcalls on NVPTX. + if (TT.isNVPTX()) { + for (int I = 0; I < RTLIB::UNKNOWN_LIBCALL; ++I) + if (I < RTLIB::ATOMIC_LOAD || I > RTLIB::ATOMIC_FETCH_NAND_16) + setLibcallName(static_cast<RTLIB::Libcall>(I), nullptr); + } + if (TT.isARM() || TT.isThumb()) { // These libcalls are not available in 32-bit. setLibcallName(RTLIB::SHL_I128, nullptr); |