10b57cec5SDimitry Andric //===-- NVPTXTargetInfo.cpp - NVPTX Target Implementation -----------------===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric 90b57cec5SDimitry Andric #include "TargetInfo/NVPTXTargetInfo.h" 10*349cc55cSDimitry Andric #include "llvm/MC/TargetRegistry.h" 110b57cec5SDimitry Andric using namespace llvm; 120b57cec5SDimitry Andric getTheNVPTXTarget32()130b57cec5SDimitry AndricTarget &llvm::getTheNVPTXTarget32() { 140b57cec5SDimitry Andric static Target TheNVPTXTarget32; 150b57cec5SDimitry Andric return TheNVPTXTarget32; 160b57cec5SDimitry Andric } getTheNVPTXTarget64()170b57cec5SDimitry AndricTarget &llvm::getTheNVPTXTarget64() { 180b57cec5SDimitry Andric static Target TheNVPTXTarget64; 190b57cec5SDimitry Andric return TheNVPTXTarget64; 200b57cec5SDimitry Andric } 210b57cec5SDimitry Andric LLVMInitializeNVPTXTargetInfo()22480093f4SDimitry Andricextern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeNVPTXTargetInfo() { 230b57cec5SDimitry Andric RegisterTarget<Triple::nvptx> X(getTheNVPTXTarget32(), "nvptx", 240b57cec5SDimitry Andric "NVIDIA PTX 32-bit", "NVPTX"); 250b57cec5SDimitry Andric RegisterTarget<Triple::nvptx64> Y(getTheNVPTXTarget64(), "nvptx64", 260b57cec5SDimitry Andric "NVIDIA PTX 64-bit", "NVPTX"); 270b57cec5SDimitry Andric } 28