Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Target/AMDGPU/TargetInfo/AMDGPUTargetInfo.cpp
Line
Count
Source
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/Support/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
852k
Target &llvm::getTheAMDGPUTarget() {
21
852k
  static Target TheAMDGPUTarget;
22
852k
  return TheAMDGPUTarget;
23
852k
}
24
/// The target for GCN GPUs
25
977k
Target &llvm::getTheGCNTarget() {
26
977k
  static Target TheGCNTarget;
27
977k
  return TheGCNTarget;
28
977k
}
29
30
/// Extern function to initialize the targets for the AMDGPU backend
31
157k
extern "C" void LLVMInitializeAMDGPUTargetInfo() {
32
157k
  RegisterTarget<Triple::r600, false> R600(getTheAMDGPUTarget(), "r600",
33
157k
                                           "AMD GPUs HD2XXX-HD6XXX", "AMDGPU");
34
157k
  RegisterTarget<Triple::amdgcn, false> GCN(getTheGCNTarget(), "amdgcn",
35
157k
                                            "AMD GCN GPUs", "AMDGPU");
36
157k
}