Revert " [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (#107432)"
[llvm-project.git] / llvm / lib / Target / DirectX / DirectXTargetMachine.h
blobd04c375b2736ddb121bec7cf6275329dda614d26
1 //===- DirectXTargetMachine.h - DirectX Target Implementation ---*- C++ -*-===//
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 //===----------------------------------------------------------------------===//
11 #ifndef LLVM_DIRECTX_DIRECTXTARGETMACHINE_H
12 #define LLVM_DIRECTX_DIRECTXTARGETMACHINE_H
14 #include "DirectXSubtarget.h"
15 #include "llvm/Target/TargetMachine.h"
16 #include <optional>
18 namespace llvm {
19 class Function;
20 class DirectXTargetMachine : public LLVMTargetMachine {
21 std::unique_ptr<TargetLoweringObjectFile> TLOF;
22 std::unique_ptr<DirectXSubtarget> Subtarget;
24 public:
25 DirectXTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
26 StringRef FS, const TargetOptions &Options,
27 std::optional<Reloc::Model> RM,
28 std::optional<CodeModel::Model> CM, CodeGenOptLevel OL,
29 bool JIT);
31 ~DirectXTargetMachine() override;
33 bool addPassesToEmitFile(PassManagerBase &PM, raw_pwrite_stream &Out,
34 raw_pwrite_stream *DwoOut, CodeGenFileType FileType,
35 bool DisableVerify,
36 MachineModuleInfoWrapperPass *MMIWP) override;
38 bool addPassesToEmitMC(PassManagerBase &PM, MCContext *&Ctx,
39 raw_pwrite_stream &Out, bool DisableVerify) override;
41 const DirectXSubtarget *getSubtargetImpl(const Function &) const override;
43 TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
45 TargetLoweringObjectFile *getObjFileLowering() const override {
46 return TLOF.get();
49 TargetTransformInfo getTargetTransformInfo(const Function &F) const override;
50 void registerPassBuilderCallbacks(PassBuilder &PB) override;
52 } // namespace llvm
54 #endif // LLVM_DIRECTX_DIRECTXTARGETMACHINE_H