1 //===-- TargetInfo/AMDGPUTargetInfo.cpp - TargetInfo for AMDGPU -----------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
13 #include "TargetInfo/AMDGPUTargetInfo.h"
14 #include "llvm/Support/TargetRegistry.h"
18 /// The target which supports all AMD GPUs. This will eventually
19 /// be deprecated and there will be a R600 target and a GCN target.
20 Target
&llvm::getTheAMDGPUTarget() {
21 static Target TheAMDGPUTarget
;
22 return TheAMDGPUTarget
;
24 /// The target for GCN GPUs
25 Target
&llvm::getTheGCNTarget() {
26 static Target TheGCNTarget
;
30 /// Extern function to initialize the targets for the AMDGPU backend
31 extern "C" void LLVMInitializeAMDGPUTargetInfo() {
32 RegisterTarget
<Triple::r600
, false> R600(getTheAMDGPUTarget(), "r600",
33 "AMD GPUs HD2XXX-HD6XXX", "AMDGPU");
34 RegisterTarget
<Triple::amdgcn
, false> GCN(getTheGCNTarget(), "amdgcn",
35 "AMD GCN GPUs", "AMDGPU");