[RISCV] Add support for Smepmp 1.0 (#78489)
[llvm-project.git] / llvm / lib / Target / M68k / M68kTargetMachine.h
blob4ff4c4cb46b809820e0ecf7c048c7bfb2fa1817b
1 //===-- M68kTargetMachine.h - Define TargetMachine for M68k -----*- 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 /// \file
10 /// This file declares the M68k specific subclass of TargetMachine.
11 ///
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_M68K_M68KTARGETMACHINE_H
15 #define LLVM_LIB_TARGET_M68K_M68KTARGETMACHINE_H
17 #include "M68kSubtarget.h"
18 #include "MCTargetDesc/M68kMCTargetDesc.h"
20 #include "llvm/CodeGen/Passes.h"
21 #include "llvm/CodeGen/SelectionDAGISel.h"
22 #include "llvm/CodeGen/TargetFrameLowering.h"
23 #include "llvm/Target/TargetMachine.h"
25 #include <optional>
27 namespace llvm {
28 class formatted_raw_ostream;
29 class M68kRegisterInfo;
31 class M68kTargetMachine : public LLVMTargetMachine {
32 std::unique_ptr<TargetLoweringObjectFile> TLOF;
33 M68kSubtarget Subtarget;
35 mutable StringMap<std::unique_ptr<M68kSubtarget>> SubtargetMap;
37 public:
38 M68kTargetMachine(const Target &T, const Triple &TT, StringRef CPU,
39 StringRef FS, const TargetOptions &Options,
40 std::optional<Reloc::Model> RM,
41 std::optional<CodeModel::Model> CM, CodeGenOptLevel OL,
42 bool JIT);
44 ~M68kTargetMachine() override;
46 const M68kSubtarget *getSubtargetImpl() const { return &Subtarget; }
48 const M68kSubtarget *getSubtargetImpl(const Function &F) const override;
50 MachineFunctionInfo *
51 createMachineFunctionInfo(BumpPtrAllocator &Allocator, const Function &F,
52 const TargetSubtargetInfo *STI) const override;
54 // Pass Pipeline Configuration
55 TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
57 TargetLoweringObjectFile *getObjFileLowering() const override {
58 return TLOF.get();
61 } // namespace llvm
63 #endif // LLVM_LIB_TARGET_M68K_M68KTARGETMACHINE_H