NVPTXTargetInfo.cpp 1017 B

123456789101112131415161718192021222324252627
  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. #include "TargetInfo/NVPTXTargetInfo.h"
  9. #include "llvm/MC/TargetRegistry.h"
  10. using namespace llvm;
  11. Target &llvm::getTheNVPTXTarget32() {
  12. static Target TheNVPTXTarget32;
  13. return TheNVPTXTarget32;
  14. }
  15. Target &llvm::getTheNVPTXTarget64() {
  16. static Target TheNVPTXTarget64;
  17. return TheNVPTXTarget64;
  18. }
  19. extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeNVPTXTargetInfo() {
  20. RegisterTarget<Triple::nvptx> X(getTheNVPTXTarget32(), "nvptx",
  21. "NVIDIA PTX 32-bit", "NVPTX");
  22. RegisterTarget<Triple::nvptx64> Y(getTheNVPTXTarget64(), "nvptx64",
  23. "NVIDIA PTX 64-bit", "NVPTX");
  24. }