LLVM
15.0.0git
lib
Target
AMDGPU
TargetInfo
AMDGPUTargetInfo.cpp
Go to the documentation of this file.
1
//===-- TargetInfo/AMDGPUTargetInfo.cpp - TargetInfo for AMDGPU -----------===//
2
//
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
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
/// \file
10
//
11
//===----------------------------------------------------------------------===//
12
13
#include "
TargetInfo/AMDGPUTargetInfo.h
"
14
#include "
llvm/MC/TargetRegistry.h
"
15
16
using namespace
llvm
;
17
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;
23
}
24
/// The target for GCN GPUs
25
Target
&
llvm::getTheGCNTarget
() {
26
static
Target
TheGCNTarget;
27
return
TheGCNTarget;
28
}
29
30
/// Extern function to initialize the targets for the AMDGPU backend
31
extern
"C"
LLVM_EXTERNAL_VISIBILITY
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"
);
36
}
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:17
llvm::Target
Target - Wrapper for Target specific information.
Definition:
TargetRegistry.h:145
llvm::getTheAMDGPUTarget
Target & getTheAMDGPUTarget()
The target which supports all AMD GPUs.
Definition:
AMDGPUTargetInfo.cpp:20
AMDGPUTargetInfo.h
LLVM_EXTERNAL_VISIBILITY
#define LLVM_EXTERNAL_VISIBILITY
Definition:
Compiler.h:126
llvm::getTheGCNTarget
Target & getTheGCNTarget()
The target for GCN GPUs.
Definition:
AMDGPUTargetInfo.cpp:25
llvm::RegisterTarget
RegisterTarget - Helper template for registering a target, for use in the target's initialization fun...
Definition:
TargetRegistry.h:1100
LLVMInitializeAMDGPUTargetInfo
LLVM_EXTERNAL_VISIBILITY void LLVMInitializeAMDGPUTargetInfo()
Extern function to initialize the targets for the AMDGPU backend.
Definition:
AMDGPUTargetInfo.cpp:31
TargetRegistry.h
Generated on Mon Jun 27 2022 02:58:26 for LLVM by
1.8.17