1*e8d8bef9SDimitry Andric //===--- CSKYTargetMachine.h - Define TargetMachine for CSKY ----*- C++ -*-===// 2*e8d8bef9SDimitry Andric // 3*e8d8bef9SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*e8d8bef9SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5*e8d8bef9SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*e8d8bef9SDimitry Andric // 7*e8d8bef9SDimitry Andric //===----------------------------------------------------------------------===// 8*e8d8bef9SDimitry Andric // 9*e8d8bef9SDimitry Andric // This file declares the CSKY specific subclass of TargetMachine. 10*e8d8bef9SDimitry Andric // 11*e8d8bef9SDimitry Andric //===----------------------------------------------------------------------===// 12*e8d8bef9SDimitry Andric 13*e8d8bef9SDimitry Andric #ifndef LLVM_LIB_TARGET_CSKY_CSKYTARGETMACHINE_H 14*e8d8bef9SDimitry Andric #define LLVM_LIB_TARGET_CSKY_CSKYTARGETMACHINE_H 15*e8d8bef9SDimitry Andric 16*e8d8bef9SDimitry Andric #include "llvm/IR/DataLayout.h" 17*e8d8bef9SDimitry Andric #include "llvm/Target/TargetMachine.h" 18*e8d8bef9SDimitry Andric 19*e8d8bef9SDimitry Andric namespace llvm { 20*e8d8bef9SDimitry Andric 21*e8d8bef9SDimitry Andric class CSKYTargetMachine : public LLVMTargetMachine { 22*e8d8bef9SDimitry Andric std::unique_ptr<TargetLoweringObjectFile> TLOF; 23*e8d8bef9SDimitry Andric 24*e8d8bef9SDimitry Andric public: 25*e8d8bef9SDimitry Andric CSKYTargetMachine(const Target &T, const Triple &TT, StringRef CPU, 26*e8d8bef9SDimitry Andric StringRef FS, const TargetOptions &Options, 27*e8d8bef9SDimitry Andric Optional<Reloc::Model> RM, Optional<CodeModel::Model> CM, 28*e8d8bef9SDimitry Andric CodeGenOpt::Level OL, bool JIT); 29*e8d8bef9SDimitry Andric 30*e8d8bef9SDimitry Andric TargetPassConfig *createPassConfig(PassManagerBase &PM) override; 31*e8d8bef9SDimitry Andric 32*e8d8bef9SDimitry Andric TargetLoweringObjectFile *getObjFileLowering() const override { 33*e8d8bef9SDimitry Andric return TLOF.get(); 34*e8d8bef9SDimitry Andric } 35*e8d8bef9SDimitry Andric }; 36*e8d8bef9SDimitry Andric } // namespace llvm 37*e8d8bef9SDimitry Andric 38*e8d8bef9SDimitry Andric #endif 39