xref: /freebsd/contrib/llvm-project/llvm/lib/Target/NVPTX/TargetInfo/NVPTXTargetInfo.cpp (revision 349cc55c9796c4596a5b9904cd3281af295f878f)
1 //===-- NVPTXTargetInfo.cpp - NVPTX Target Implementation -----------------===//
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 #include "TargetInfo/NVPTXTargetInfo.h"
10 #include "llvm/MC/TargetRegistry.h"
11 using namespace llvm;
12 
getTheNVPTXTarget32()13 Target &llvm::getTheNVPTXTarget32() {
14   static Target TheNVPTXTarget32;
15   return TheNVPTXTarget32;
16 }
getTheNVPTXTarget64()17 Target &llvm::getTheNVPTXTarget64() {
18   static Target TheNVPTXTarget64;
19   return TheNVPTXTarget64;
20 }
21 
LLVMInitializeNVPTXTargetInfo()22 extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeNVPTXTargetInfo() {
23   RegisterTarget<Triple::nvptx> X(getTheNVPTXTarget32(), "nvptx",
24                                   "NVIDIA PTX 32-bit", "NVPTX");
25   RegisterTarget<Triple::nvptx64> Y(getTheNVPTXTarget64(), "nvptx64",
26                                     "NVIDIA PTX 64-bit", "NVPTX");
27 }
28