Revert " [LoongArch][ISel] Check the number of sign bits in `PatGprGpr_32` (#107432)"
[llvm-project.git] / llvm / lib / Target / Lanai / LanaiTargetMachine.h
blobc5c351b36b31694095cb4db1d16239f74fab2373
1 //===-- LanaiTargetMachine.h - Define TargetMachine for Lanai --- 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 // This file declares the Lanai specific subclass of TargetMachine.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_TARGET_LANAI_LANAITARGETMACHINE_H
14 #define LLVM_LIB_TARGET_LANAI_LANAITARGETMACHINE_H
16 #include "LanaiISelLowering.h"
17 #include "LanaiInstrInfo.h"
18 #include "LanaiSelectionDAGInfo.h"
19 #include "LanaiSubtarget.h"
20 #include "llvm/Target/TargetMachine.h"
21 #include <optional>
23 namespace llvm {
25 class LanaiTargetMachine : public LLVMTargetMachine {
26 LanaiSubtarget Subtarget;
27 std::unique_ptr<TargetLoweringObjectFile> TLOF;
29 public:
30 LanaiTargetMachine(const Target &TheTarget, const Triple &TargetTriple,
31 StringRef Cpu, StringRef FeatureString,
32 const TargetOptions &Options,
33 std::optional<Reloc::Model> RM,
34 std::optional<CodeModel::Model> CodeModel,
35 CodeGenOptLevel OptLevel, bool JIT);
37 const LanaiSubtarget *
38 getSubtargetImpl(const llvm::Function & /*Fn*/) const override {
39 return &Subtarget;
42 TargetTransformInfo getTargetTransformInfo(const Function &F) const override;
44 // Pass Pipeline Configuration
45 TargetPassConfig *createPassConfig(PassManagerBase &pass_manager) override;
47 TargetLoweringObjectFile *getObjFileLowering() const override {
48 return TLOF.get();
51 MachineFunctionInfo *
52 createMachineFunctionInfo(BumpPtrAllocator &Allocator, const Function &F,
53 const TargetSubtargetInfo *STI) const override;
55 bool isMachineVerifierClean() const override {
56 return false;
59 } // namespace llvm
61 #endif // LLVM_LIB_TARGET_LANAI_LANAITARGETMACHINE_H