OSDN Git Service

[AMDGPU] Ported and adopted AMDLibCalls pass
authorStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Fri, 11 Aug 2017 16:42:09 +0000 (16:42 +0000)
committerStanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com>
Fri, 11 Aug 2017 16:42:09 +0000 (16:42 +0000)
commit9643e6bd7823f74bf8898304d772250dcf8aaa1e
tree93ae95e5fe633935887e35a849c7c695ce95303e
parentd457461f848a01aa6ed540fd1f60d045286b676c
[AMDGPU] Ported and adopted AMDLibCalls pass

The pass does simplifications of well known AMD library calls.
If given -amdgpu-prelink option it works in a pre-link mode which
allows to reference new library functions which will be linked in
later.

In addition it also used to process traditional AMD option
-fuse-native which allows to replace some of the functions with
their fast native implementations from the library.

The necessary glue to pass the prelink option and translate
-fuse-native is to be added to the driver.

Differential Revision: https://reviews.llvm.org/D36436

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310731 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPU.h
lib/Target/AMDGPU/AMDGPULibCalls.cpp [new file with mode: 0644]
lib/Target/AMDGPU/AMDGPULibFunc.cpp [new file with mode: 0644]
lib/Target/AMDGPU/AMDGPULibFunc.h [new file with mode: 0644]
lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
lib/Target/AMDGPU/CMakeLists.txt
test/CodeGen/AMDGPU/simplify-libcalls.ll [new file with mode: 0644]