diff options
author | Paul Robinson <paul.robinson@sony.com> | 2021-09-24 07:36:01 -0700 |
---|---|---|
committer | Paul Robinson <paul.robinson@sony.com> | 2021-09-24 07:52:44 -0700 |
commit | 1376ae909431b78bee35899f301d1ab2f53cc1ba (patch) | |
tree | 2b473ae310352e5d3945594abb8c82a4c545dd15 /llvm/lib/Analysis/TargetLibraryInfo.cpp | |
parent | 3c5500907b1089f4b274b09a195ee0685d51f9e2 (diff) | |
download | llvm-1376ae909431b78bee35899f301d1ab2f53cc1ba.zip llvm-1376ae909431b78bee35899f301d1ab2f53cc1ba.tar.gz llvm-1376ae909431b78bee35899f301d1ab2f53cc1ba.tar.bz2 |
[TargetLibraryInfo][AMDGPU] Minor cleanup, NFC
Diffstat (limited to 'llvm/lib/Analysis/TargetLibraryInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/TargetLibraryInfo.cpp | 11 |
1 files 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; |