[TargetLibraryInfo][AMDGPU] Minor cleanup, NFC
authorPaul Robinson <paul.robinson@sony.com>
Fri, 24 Sep 2021 14:36:01 +0000 (07:36 -0700)
committerPaul Robinson <paul.robinson@sony.com>
Fri, 24 Sep 2021 14:52:44 +0000 (07:52 -0700)
llvm/lib/Analysis/TargetLibraryInfo.cpp

index a7027bcb0631ed02f1e6c57c24741008aa8350f1..5b2996cbaefe0d482924281c967041f4870edfa8 100644 (file)
@@ -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;