1 //===-- NVPTXTargetInfo.cpp - NVPTX Target Implementation -----------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #include "NVPTX.h" 11 #include "llvm/IR/Module.h" 12 #include "llvm/Support/TargetRegistry.h" 13 using namespace llvm; 14 getTheNVPTXTarget32()15Target &llvm::getTheNVPTXTarget32() { 16 static Target TheNVPTXTarget32; 17 return TheNVPTXTarget32; 18 } getTheNVPTXTarget64()19Target &llvm::getTheNVPTXTarget64() { 20 static Target TheNVPTXTarget64; 21 return TheNVPTXTarget64; 22 } 23 LLVMInitializeNVPTXTargetInfo()24extern "C" void LLVMInitializeNVPTXTargetInfo() { 25 RegisterTarget<Triple::nvptx> X(getTheNVPTXTarget32(), "nvptx", 26 "NVIDIA PTX 32-bit", "NVPTX"); 27 RegisterTarget<Triple::nvptx64> Y(getTheNVPTXTarget64(), "nvptx64", 28 "NVIDIA PTX 64-bit", "NVPTX"); 29 } 30