diff options
| author | Daniel Sanders <daniel_l_sanders@apple.com> | 2017-11-15 23:55:44 +0000 |
|---|---|---|
| committer | Daniel Sanders <daniel_l_sanders@apple.com> | 2017-11-15 23:55:44 +0000 |
| commit | 725584e26d79d00ad4b14cab15babc4b4499d22e (patch) | |
| tree | 1fd7014eb2c42b0874001b6dc80bb8f5807bf91c /llvm/lib/Target/AMDGPU/TargetInfo/AMDGPUTargetInfo.cpp | |
| parent | 82665b1ec4a0057481e4c3a8d33c5070f0fdbda5 (diff) | |
| download | bcm5719-llvm-725584e26d79d00ad4b14cab15babc4b4499d22e.tar.gz bcm5719-llvm-725584e26d79d00ad4b14cab15babc4b4499d22e.zip | |
Add backend name to Target to enable runtime info to be fed back into TableGen
Summary:
Make it possible to feed runtime information back to tablegen to enable
profile-guided tablegen-eration, detection of untested tablegen definitions, etc.
Being a cross-compiler by nature, LLVM will potentially collect data for multiple
architectures (e.g. when running 'ninja check'). We therefore need a way for
TableGen to figure out what data applies to the backend it is generating at the
time. This patch achieves that by including the name of the 'def X : Target ...'
for the backend in the TargetRegistry.
Reviewers: qcolombet
Reviewed By: qcolombet
Subscribers: jholewinski, arsenm, jyknight, aditya_nandakumar, sdardis, nemanjai, ab, nhaehnle, t.p.northover, javed.absar, qcolombet, llvm-commits, fedor.sergeev
Differential Revision: https://reviews.llvm.org/D39742
llvm-svn: 318352
Diffstat (limited to 'llvm/lib/Target/AMDGPU/TargetInfo/AMDGPUTargetInfo.cpp')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/TargetInfo/AMDGPUTargetInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/AMDGPU/TargetInfo/AMDGPUTargetInfo.cpp b/llvm/lib/Target/AMDGPU/TargetInfo/AMDGPUTargetInfo.cpp index 92fb762ebd7..f61e2e413ad 100644 --- a/llvm/lib/Target/AMDGPU/TargetInfo/AMDGPUTargetInfo.cpp +++ b/llvm/lib/Target/AMDGPU/TargetInfo/AMDGPUTargetInfo.cpp @@ -31,7 +31,7 @@ Target &llvm::getTheGCNTarget() { /// \brief Extern function to initialize the targets for the AMDGPU backend extern "C" void LLVMInitializeAMDGPUTargetInfo() { RegisterTarget<Triple::r600, false> R600(getTheAMDGPUTarget(), "r600", - "AMD GPUs HD2XXX-HD6XXX"); + "AMD GPUs HD2XXX-HD6XXX", "AMDGPU"); RegisterTarget<Triple::amdgcn, false> GCN(getTheGCNTarget(), "amdgcn", - "AMD GCN GPUs"); + "AMD GCN GPUs", "AMDGPU"); } |

