brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · c2648f5 Raw
64 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8///9/// \file10/// This file declares the M68k specific subclass of TargetMachine.11///12//===----------------------------------------------------------------------===//13 14#ifndef LLVM_LIB_TARGET_M68K_M68KTARGETMACHINE_H15#define LLVM_LIB_TARGET_M68K_M68KTARGETMACHINE_H16 17#include "M68kSubtarget.h"18#include "MCTargetDesc/M68kMCTargetDesc.h"19 20#include "llvm/CodeGen/CodeGenTargetMachineImpl.h"21#include "llvm/CodeGen/Passes.h"22#include "llvm/CodeGen/SelectionDAGISel.h"23#include "llvm/CodeGen/TargetFrameLowering.h"24 25#include <optional>26 27namespace llvm {28class formatted_raw_ostream;29class M68kRegisterInfo;30 31class M68kTargetMachine : public CodeGenTargetMachineImpl {32  std::unique_ptr<TargetLoweringObjectFile> TLOF;33  M68kSubtarget Subtarget;34 35  mutable StringMap<std::unique_ptr<M68kSubtarget>> SubtargetMap;36 37public: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);43 44  ~M68kTargetMachine() override;45 46  const M68kSubtarget *getSubtargetImpl() const { return &Subtarget; }47 48  const M68kSubtarget *getSubtargetImpl(const Function &F) const override;49 50  MachineFunctionInfo *51  createMachineFunctionInfo(BumpPtrAllocator &Allocator, const Function &F,52                            const TargetSubtargetInfo *STI) const override;53 54  // Pass Pipeline Configuration55  TargetPassConfig *createPassConfig(PassManagerBase &PM) override;56 57  TargetLoweringObjectFile *getObjFileLowering() const override {58    return TLOF.get();59  }60};61} // namespace llvm62 63#endif // LLVM_LIB_TARGET_M68K_M68KTARGETMACHINE_H64