[llvm] 1376ae9 - [TargetLibraryInfo][AMDGPU] Minor cleanup, NFC
Paul Robinson via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 24 07:52:50 PDT 2021
Author: Paul Robinson
Date: 2021-09-24T07:52:44-07:00
New Revision: 1376ae909431b78bee35899f301d1ab2f53cc1ba
URL: https://github.com/llvm/llvm-project/commit/1376ae909431b78bee35899f301d1ab2f53cc1ba
DIFF: https://github.com/llvm/llvm-project/commit/1376ae909431b78bee35899f301d1ab2f53cc1ba.diff
LOG: [TargetLibraryInfo][AMDGPU] Minor cleanup, NFC
Added:
Modified:
llvm/lib/Analysis/TargetLibraryInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp
index a7027bcb0631..5b2996cbaefe 100644
--- a/llvm/lib/Analysis/TargetLibraryInfo.cpp
+++ b/llvm/lib/Analysis/TargetLibraryInfo.cpp
@@ -157,15 +157,10 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T,
// isn't true for a target those defaults should be overridden below.
TLI.setIntSize(T.isArch16Bit() ? 16 : 32);
- if (T.isAMDGPU())
- TLI.disableAllFunctions();
-
- // There are no library implementations of memcpy and memset for AMD gpus and
- // these can be
diff icult to lower in the backend.
+ // There is really no runtime library on AMDGPU, apart from
+ // __kmpc_alloc/free_shared.
if (T.isAMDGPU()) {
- TLI.setUnavailable(LibFunc_memcpy);
- TLI.setUnavailable(LibFunc_memset);
- TLI.setUnavailable(LibFunc_memset_pattern16);
+ TLI.disableAllFunctions();
TLI.setAvailable(llvm::LibFunc___kmpc_alloc_shared);
TLI.setAvailable(llvm::LibFunc___kmpc_free_shared);
return;
More information about the llvm-commits
mailing list