[llvm] 44a14a6 - Add stub DirectX backend
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 28 11:45:10 PDT 2022
Author: Chris Bieneman
Date: 2022-03-28T13:44:48-05:00
New Revision: 44a14a6a1dcf21fc2e46f1e01cf013d2cc7fa3d8
URL: https://github.com/llvm/llvm-project/commit/44a14a6a1dcf21fc2e46f1e01cf013d2cc7fa3d8
DIFF: https://github.com/llvm/llvm-project/commit/44a14a6a1dcf21fc2e46f1e01cf013d2cc7fa3d8.diff
LOG: Add stub DirectX backend
This is the bare minimum needed to get the DirectX target compiling,
but does not actually do anything.
Reviewed By: pete, rnk, arsenm, jaebaek
Differential Revision: https://reviews.llvm.org/D122080
Added:
llvm/lib/Target/DirectX/CMakeLists.txt
llvm/lib/Target/DirectX/DirectX.td
llvm/lib/Target/DirectX/DirectXSubtarget.cpp
llvm/lib/Target/DirectX/DirectXSubtarget.h
llvm/lib/Target/DirectX/DirectXTargetLowering.h
llvm/lib/Target/DirectX/DirectXTargetMachine.cpp
llvm/lib/Target/DirectX/DirectXTargetMachine.h
llvm/lib/Target/DirectX/DirectXTargetTransformInfo.h
llvm/lib/Target/DirectX/MCTargetDesc/CMakeLists.txt
llvm/lib/Target/DirectX/MCTargetDesc/DirectXMCTargetDesc.cpp
llvm/lib/Target/DirectX/TargetInfo/CMakeLists.txt
llvm/lib/Target/DirectX/TargetInfo/DirectXTargetInfo.cpp
llvm/lib/Target/DirectX/TargetInfo/DirectXTargetInfo.h
Modified:
Removed:
################################################################################
diff --git a/llvm/lib/Target/DirectX/CMakeLists.txt b/llvm/lib/Target/DirectX/CMakeLists.txt
new file mode 100644
index 0000000000000..a4ac6d212b5b8
--- /dev/null
+++ b/llvm/lib/Target/DirectX/CMakeLists.txt
@@ -0,0 +1,24 @@
+add_llvm_component_group(DirectX)
+
+set(LLVM_TARGET_DEFINITIONS DirectX.td)
+
+tablegen(LLVM DirectXGenSubtargetInfo.inc -gen-subtarget)
+
+add_public_tablegen_target(DirectXCommonTableGen)
+
+add_llvm_target(DirectXCodeGen
+ DirectXSubtarget.cpp
+ DirectXTargetMachine.cpp
+
+ LINK_COMPONENTS
+ Bitwriter
+ Core
+ Support
+ DirectXInfo
+
+ ADD_TO_COMPONENT
+ DirectX
+)
+
+add_subdirectory(MCTargetDesc)
+add_subdirectory(TargetInfo)
diff --git a/llvm/lib/Target/DirectX/DirectX.td b/llvm/lib/Target/DirectX/DirectX.td
new file mode 100644
index 0000000000000..0aca9bc01b84a
--- /dev/null
+++ b/llvm/lib/Target/DirectX/DirectX.td
@@ -0,0 +1,53 @@
+//- DirectX.td - Describe the DirectX Target Machine ----------*- tablegen -*-//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// This is a target description file for the DirectX target
+///
+//===----------------------------------------------------------------------===//
+
+//===----------------------------------------------------------------------===//
+// Target-independent interfaces which we are implementing
+//===----------------------------------------------------------------------===//
+
+include "llvm/Target/Target.td"
+
+//===----------------------------------------------------------------------===//
+// DirectX Subtarget features.
+//===----------------------------------------------------------------------===//
+
+def DirectXInstrInfo : InstrInfo;
+
+//===----------------------------------------------------------------------===//
+// DirectX Processors supported.
+//===----------------------------------------------------------------------===//
+
+def : ProcessorModel<"generic", NoSchedModel, []>;
+
+
+//===----------------------------------------------------------------------===//
+// Target Declaration
+//===----------------------------------------------------------------------===//
+
+def DirectXAsmParser : AsmParser {
+ // The physical register names are not in the binary format or asm text
+ let ShouldEmitMatchRegisterName = 0;
+}
+
+def DirectXAsmWriter : AsmWriter {
+ string AsmWriterClassName = "InstPrinter";
+ int PassSubtarget = 0;
+ int Variant = 0;
+ bit isMCAsmWriter = 1;
+}
+
+def DirectX : Target {
+ let InstructionSet = DirectXInstrInfo;
+ let AssemblyParsers = [DirectXAsmParser];
+ let AssemblyWriters = [DirectXAsmWriter];
+}
diff --git a/llvm/lib/Target/DirectX/DirectXSubtarget.cpp b/llvm/lib/Target/DirectX/DirectXSubtarget.cpp
new file mode 100644
index 0000000000000..96023224f0289
--- /dev/null
+++ b/llvm/lib/Target/DirectX/DirectXSubtarget.cpp
@@ -0,0 +1,27 @@
+//===-- DirectXSubtarget.cpp - DirectX Subtarget Information --------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// This file implements the DirectX-specific subclass of TargetSubtarget.
+///
+//===----------------------------------------------------------------------===//
+
+#include "DirectXSubtarget.h"
+#include "DirectXTargetLowering.h"
+
+using namespace llvm;
+
+#define DEBUG_TYPE "directx-subtarget"
+
+#define GET_SUBTARGETINFO_CTOR
+#define GET_SUBTARGETINFO_TARGET_DESC
+#include "DirectXGenSubtargetInfo.inc"
+
+DirectXSubtarget::DirectXSubtarget(const Triple &TT, StringRef CPU,
+ StringRef FS, const DirectXTargetMachine &TM)
+ : DirectXGenSubtargetInfo(TT, CPU, CPU, FS), TL(TM, *this) {}
diff --git a/llvm/lib/Target/DirectX/DirectXSubtarget.h b/llvm/lib/Target/DirectX/DirectXSubtarget.h
new file mode 100644
index 0000000000000..8840c0e038fac
--- /dev/null
+++ b/llvm/lib/Target/DirectX/DirectXSubtarget.h
@@ -0,0 +1,46 @@
+//===-- DirectXSubtarget.h - Define Subtarget for DirectX -------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file declares the DirectX specific subclass of TargetSubtargetInfo.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DIRECTX_DIRECTXSUBTARGET_H
+#define LLVM_DIRECTX_DIRECTXSUBTARGET_H
+
+#include "DirectXTargetLowering.h"
+#include "llvm/CodeGen/TargetSubtargetInfo.h"
+#include "llvm/IR/DataLayout.h"
+#include "llvm/Target/TargetMachine.h"
+
+#define GET_SUBTARGETINFO_HEADER
+#include "DirectXGenSubtargetInfo.inc"
+
+namespace llvm {
+
+class DirectXTargetMachine;
+
+class DirectXSubtarget : public DirectXGenSubtargetInfo {
+ DirectXTargetLowering TL;
+
+public:
+ DirectXSubtarget(const Triple &TT, StringRef CPU, StringRef FS,
+ const DirectXTargetMachine &TM);
+
+ /// Parses a subtarget feature string, setting appropriate options.
+ /// \note Definition of function is auto generated by `tblgen`.
+ void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS);
+
+ const DirectXTargetLowering *getTargetLowering() const override {
+ return &TL;
+ }
+};
+
+} // end namespace llvm
+
+#endif // LLVM_DIRECTX_DIRECTXSUBTARGET_H
diff --git a/llvm/lib/Target/DirectX/DirectXTargetLowering.h b/llvm/lib/Target/DirectX/DirectXTargetLowering.h
new file mode 100644
index 0000000000000..dc19894ab165e
--- /dev/null
+++ b/llvm/lib/Target/DirectX/DirectXTargetLowering.h
@@ -0,0 +1,31 @@
+//===-- DirectXTargetLowering.h - Define DX TargetLowering -----*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// This file declares the DirectX specific subclass of TargetLowering.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DIRECTX_DIRECTXTARGETLOWERING_H
+#define LLVM_DIRECTX_DIRECTXTARGETLOWERING_H
+
+#include "llvm/CodeGen/TargetLowering.h"
+
+namespace llvm {
+
+class DirectXSubtarget;
+class DirectXTargetMachine;
+
+class DirectXTargetLowering : public TargetLowering {
+public:
+ explicit DirectXTargetLowering(const DirectXTargetMachine &TM,
+ const DirectXSubtarget &STI);
+};
+
+} // end namespace llvm
+
+#endif // LLVM_DIRECTX_DIRECTXTARGETLOWERING_H
diff --git a/llvm/lib/Target/DirectX/DirectXTargetMachine.cpp b/llvm/lib/Target/DirectX/DirectXTargetMachine.cpp
new file mode 100644
index 0000000000000..03572973bd770
--- /dev/null
+++ b/llvm/lib/Target/DirectX/DirectXTargetMachine.cpp
@@ -0,0 +1,121 @@
+//===- DirectXTargetMachine.cpp - DirectX Target Implementation -*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// This file contains DirectX target initializer.
+///
+//===----------------------------------------------------------------------===//
+
+#include "DirectXTargetMachine.h"
+#include "DirectXSubtarget.h"
+#include "DirectXTargetTransformInfo.h"
+#include "TargetInfo/DirectXTargetInfo.h"
+#include "llvm/Bitcode/BitcodeWriterPass.h"
+#include "llvm/CodeGen/Passes.h"
+#include "llvm/CodeGen/TargetPassConfig.h"
+#include "llvm/IR/IRPrintingPasses.h"
+#include "llvm/IR/LegacyPassManager.h"
+#include "llvm/MC/SectionKind.h"
+#include "llvm/MC/TargetRegistry.h"
+#include "llvm/Support/CodeGen.h"
+#include "llvm/Support/Compiler.h"
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/Target/TargetLoweringObjectFile.h"
+
+using namespace llvm;
+
+extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeDirectXTarget() {
+ RegisterTargetMachine<DirectXTargetMachine> X(getTheDirectXTarget());
+}
+
+class DXILTargetObjectFile : public TargetLoweringObjectFile {
+public:
+ DXILTargetObjectFile() = default;
+
+ MCSection *getExplicitSectionGlobal(const GlobalObject *GO, SectionKind Kind,
+ const TargetMachine &TM) const override {
+ llvm_unreachable("Not supported!");
+ }
+
+protected:
+ MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind,
+ const TargetMachine &TM) const override {
+ llvm_unreachable("Not supported!");
+ }
+};
+
+class DirectXPassConfig : public TargetPassConfig {
+public:
+ DirectXPassConfig(DirectXTargetMachine &TM, PassManagerBase &PM)
+ : TargetPassConfig(TM, PM) {}
+
+ DirectXTargetMachine &getDirectXTargetMachine() const {
+ return getTM<DirectXTargetMachine>();
+ }
+
+ FunctionPass *createTargetRegisterAllocator(bool) override { return nullptr; }
+};
+
+DirectXTargetMachine::DirectXTargetMachine(const Target &T, const Triple &TT,
+ StringRef CPU, StringRef FS,
+ const TargetOptions &Options,
+ Optional<Reloc::Model> RM,
+ Optional<CodeModel::Model> CM,
+ CodeGenOpt::Level OL, bool JIT)
+ : LLVMTargetMachine(T,
+ "e-m:e-p:32:32-i1:32-i8:8-i16:16-i32:32-i64:64-f16:16-"
+ "f32:32-f64:64-n8:16:32:64",
+ TT, CPU, FS, Options, Reloc::Static, CodeModel::Small,
+ OL),
+ TLOF(std::make_unique<DXILTargetObjectFile>()),
+ Subtarget(std::make_unique<DirectXSubtarget>(TT, CPU, FS, *this)) {}
+
+DirectXTargetMachine::~DirectXTargetMachine() {}
+
+bool DirectXTargetMachine::addPassesToEmitFile(
+ PassManagerBase &PM, raw_pwrite_stream &Out, raw_pwrite_stream *DwoOut,
+ CodeGenFileType FileType, bool DisableVerify,
+ MachineModuleInfoWrapperPass *MMIWP) {
+ switch (FileType) {
+ case CGFT_AssemblyFile:
+ PM.add(createPrintModulePass(Out, "", true));
+ break;
+ case CGFT_ObjectFile:
+ // TODO: Write DXIL instead of bitcode
+ PM.add(createBitcodeWriterPass(Out, true, false, false));
+ break;
+ case CGFT_Null:
+ break;
+ }
+ return false;
+}
+
+bool DirectXTargetMachine::addPassesToEmitMC(PassManagerBase &PM,
+ MCContext *&Ctx,
+ raw_pwrite_stream &Out,
+ bool DisableVerify) {
+ return true;
+}
+
+TargetPassConfig *DirectXTargetMachine::createPassConfig(PassManagerBase &PM) {
+ return new DirectXPassConfig(*this, PM);
+}
+
+const DirectXSubtarget *
+DirectXTargetMachine::getSubtargetImpl(const Function &) const {
+ return Subtarget.get();
+}
+
+TargetTransformInfo
+DirectXTargetMachine::getTargetTransformInfo(const Function &F) const {
+ return TargetTransformInfo(DirectXTTIImpl(this, F));
+}
+
+DirectXTargetLowering::DirectXTargetLowering(const DirectXTargetMachine &TM,
+ const DirectXSubtarget &STI)
+ : TargetLowering(TM) {}
diff --git a/llvm/lib/Target/DirectX/DirectXTargetMachine.h b/llvm/lib/Target/DirectX/DirectXTargetMachine.h
new file mode 100644
index 0000000000000..ae41638b6acf2
--- /dev/null
+++ b/llvm/lib/Target/DirectX/DirectXTargetMachine.h
@@ -0,0 +1,51 @@
+//===- DirectXTargetMachine.h - DirectX Target Implementation ---*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DIRECTX_DIRECTXTARGETMACHINE_H
+#define LLVM_DIRECTX_DIRECTXTARGETMACHINE_H
+
+#include "DirectXSubtarget.h"
+#include "llvm/Target/TargetMachine.h"
+
+namespace llvm {
+class Function;
+class DirectXTargetMachine : public LLVMTargetMachine {
+ std::unique_ptr<TargetLoweringObjectFile> TLOF;
+ std::unique_ptr<DirectXSubtarget> Subtarget;
+
+public:
+ DirectXTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
+ StringRef FS, const TargetOptions &Options,
+ Optional<Reloc::Model> RM, Optional<CodeModel::Model> CM,
+ CodeGenOpt::Level OL, bool JIT);
+
+ ~DirectXTargetMachine() override;
+
+ bool addPassesToEmitFile(PassManagerBase &PM, raw_pwrite_stream &Out,
+ raw_pwrite_stream *DwoOut, CodeGenFileType FileType,
+ bool DisableVerify,
+ MachineModuleInfoWrapperPass *MMIWP) override;
+
+ bool addPassesToEmitMC(PassManagerBase &PM, MCContext *&Ctx,
+ raw_pwrite_stream &Out, bool DisableVerify) override;
+
+ const DirectXSubtarget *getSubtargetImpl(const Function &) const override;
+
+ TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
+
+ TargetLoweringObjectFile *getObjFileLowering() const override {
+ return TLOF.get();
+ }
+
+ TargetTransformInfo getTargetTransformInfo(const Function &F) const override;
+};
+} // namespace llvm
+
+#endif // LLVM_DIRECTX_DIRECTXTARGETMACHINE_H
diff --git a/llvm/lib/Target/DirectX/DirectXTargetTransformInfo.h b/llvm/lib/Target/DirectX/DirectXTargetTransformInfo.h
new file mode 100644
index 0000000000000..90beb386fa44d
--- /dev/null
+++ b/llvm/lib/Target/DirectX/DirectXTargetTransformInfo.h
@@ -0,0 +1,39 @@
+//===- DirectXTargetTransformInfo.h - DirectX TTI ---------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+///
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DIRECTX_DIRECTXTARGETTRANSFORMINFO_H
+#define LLVM_DIRECTX_DIRECTXTARGETTRANSFORMINFO_H
+
+#include "DirectXSubtarget.h"
+#include "DirectXTargetMachine.h"
+#include "llvm/CodeGen/BasicTTIImpl.h"
+#include "llvm/IR/Function.h"
+
+namespace llvm {
+class DirectXTTIImpl : public BasicTTIImplBase<DirectXTTIImpl> {
+ using BaseT = BasicTTIImplBase<DirectXTTIImpl>;
+ using TTI = TargetTransformInfo;
+
+ friend BaseT;
+
+ const DirectXSubtarget *ST;
+ const DirectXTargetLowering *TLI;
+
+ const DirectXSubtarget *getST() const { return ST; }
+ const DirectXTargetLowering *getTLI() const { return TLI; }
+
+public:
+ explicit DirectXTTIImpl(const DirectXTargetMachine *TM, const Function &F)
+ : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl(F)),
+ TLI(ST->getTargetLowering()) {}
+};
+} // namespace llvm
+
+#endif // LLVM_DIRECTX_DIRECTXTARGETTRANSFORMINFO_H
diff --git a/llvm/lib/Target/DirectX/MCTargetDesc/CMakeLists.txt b/llvm/lib/Target/DirectX/MCTargetDesc/CMakeLists.txt
new file mode 100644
index 0000000000000..7ffa93a1faded
--- /dev/null
+++ b/llvm/lib/Target/DirectX/MCTargetDesc/CMakeLists.txt
@@ -0,0 +1,10 @@
+add_llvm_component_library(LLVMDirectXDesc
+ DirectXMCTargetDesc.cpp
+
+ LINK_COMPONENTS
+ DirectXInfo
+ Support
+
+ ADD_TO_COMPONENT
+ DirectX
+ )
diff --git a/llvm/lib/Target/DirectX/MCTargetDesc/DirectXMCTargetDesc.cpp b/llvm/lib/Target/DirectX/MCTargetDesc/DirectXMCTargetDesc.cpp
new file mode 100644
index 0000000000000..be690b7287057
--- /dev/null
+++ b/llvm/lib/Target/DirectX/MCTargetDesc/DirectXMCTargetDesc.cpp
@@ -0,0 +1,27 @@
+//===- DirectXMCTargetDesc.cpp - DirectX Target Implementation --*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// This file contains DirectX target initializer.
+///
+//===----------------------------------------------------------------------===//
+
+#include "llvm/ADT/Triple.h"
+#include "llvm/MC/MCAsmBackend.h"
+#include "llvm/MC/MCCodeEmitter.h"
+#include "llvm/MC/MCInstrInfo.h"
+#include "llvm/MC/MCSchedule.h"
+#include "llvm/MC/MCSubtargetInfo.h"
+#include "llvm/Support/Compiler.h"
+
+using namespace llvm;
+
+#define GET_SUBTARGETINFO_MC_DESC
+#include "DirectXGenSubtargetInfo.inc"
+
+extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeDirectXTargetMC() {}
diff --git a/llvm/lib/Target/DirectX/TargetInfo/CMakeLists.txt b/llvm/lib/Target/DirectX/TargetInfo/CMakeLists.txt
new file mode 100644
index 0000000000000..d7e3789a694ff
--- /dev/null
+++ b/llvm/lib/Target/DirectX/TargetInfo/CMakeLists.txt
@@ -0,0 +1,12 @@
+add_llvm_component_library(LLVMDirectXInfo
+ DirectXTargetInfo.cpp
+
+ LINK_COMPONENTS
+ MC
+ Support
+
+ ADD_TO_COMPONENT
+ DirectX
+)
+
+add_dependencies(LLVMDirectXInfo DirectXCommonTableGen)
diff --git a/llvm/lib/Target/DirectX/TargetInfo/DirectXTargetInfo.cpp b/llvm/lib/Target/DirectX/TargetInfo/DirectXTargetInfo.cpp
new file mode 100644
index 0000000000000..54c577debc348
--- /dev/null
+++ b/llvm/lib/Target/DirectX/TargetInfo/DirectXTargetInfo.cpp
@@ -0,0 +1,30 @@
+//===- DirectXTargetInfo.cpp - DirectX Target Implementation ----*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+///
+/// \file
+/// This file contains DirectX target initializer.
+///
+//===----------------------------------------------------------------------===//
+
+#include "llvm/ADT/Triple.h"
+#include "llvm/MC/TargetRegistry.h"
+#include "llvm/Support/Compiler.h"
+
+namespace llvm {
+Target &getTheDirectXTarget() {
+ static Target TheDirectXTarget;
+ return TheDirectXTarget;
+}
+} // namespace llvm
+
+using namespace llvm;
+
+extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeDirectXTargetInfo() {
+ RegisterTarget<Triple::dxil, /*HasJIT=*/false> X(
+ getTheDirectXTarget(), "dxil", "DirectX Intermediate Language", "DXIL");
+}
diff --git a/llvm/lib/Target/DirectX/TargetInfo/DirectXTargetInfo.h b/llvm/lib/Target/DirectX/TargetInfo/DirectXTargetInfo.h
new file mode 100644
index 0000000000000..a860c430f81af
--- /dev/null
+++ b/llvm/lib/Target/DirectX/TargetInfo/DirectXTargetInfo.h
@@ -0,0 +1,18 @@
+//===-- DirectXTargetInfo.h - DircetX Target Implementation -----*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_DIRECTX_TARGETINFO_DIRECTXTARGETINFO_H
+#define LLVM_DIRECTX_TARGETINFO_DIRECTXTARGETINFO_H
+
+namespace llvm {
+class Target;
+
+Target &getTheDirectXTarget();
+} // namespace llvm
+
+#endif // LLVM_DIRECTX_TARGETINFO_DIRECTXTARGETINFO_H
More information about the llvm-commits
mailing list