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/Support/TargetRegistry.h" 11 using namespace llvm; 12 13 Target &llvm::getTheNVPTXTarget32() { 14 static Target TheNVPTXTarget32; 15 return TheNVPTXTarget32; 16 } 17 Target &llvm::getTheNVPTXTarget64() { 18 static Target TheNVPTXTarget64; 19 return TheNVPTXTarget64; 20 } 21 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