From 1376ae909431b78bee35899f301d1ab2f53cc1ba Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Fri, 24 Sep 2021 07:36:01 -0700 Subject: [PATCH] [TargetLibraryInfo][AMDGPU] Minor cleanup, NFC --- llvm/lib/Analysis/TargetLibraryInfo.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/llvm/lib/Analysis/TargetLibraryInfo.cpp b/llvm/lib/Analysis/TargetLibraryInfo.cpp index a7027bc..5b2996c 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 difficult 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; -- 2.7.4