Path: blob/main/contrib/llvm-project/llvm/lib/Target/Lanai/LanaiTargetMachine.h
35271 views
//===-- LanaiTargetMachine.h - Define TargetMachine for Lanai --- C++ ---===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file declares the Lanai specific subclass of TargetMachine.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_LANAI_LANAITARGETMACHINE_H13#define LLVM_LIB_TARGET_LANAI_LANAITARGETMACHINE_H1415#include "LanaiISelLowering.h"16#include "LanaiInstrInfo.h"17#include "LanaiSelectionDAGInfo.h"18#include "LanaiSubtarget.h"19#include "llvm/Target/TargetMachine.h"20#include <optional>2122namespace llvm {2324class LanaiTargetMachine : public LLVMTargetMachine {25LanaiSubtarget Subtarget;26std::unique_ptr<TargetLoweringObjectFile> TLOF;2728public:29LanaiTargetMachine(const Target &TheTarget, const Triple &TargetTriple,30StringRef Cpu, StringRef FeatureString,31const TargetOptions &Options,32std::optional<Reloc::Model> RM,33std::optional<CodeModel::Model> CodeModel,34CodeGenOptLevel OptLevel, bool JIT);3536const LanaiSubtarget *37getSubtargetImpl(const llvm::Function & /*Fn*/) const override {38return &Subtarget;39}4041TargetTransformInfo getTargetTransformInfo(const Function &F) const override;4243// Pass Pipeline Configuration44TargetPassConfig *createPassConfig(PassManagerBase &pass_manager) override;4546TargetLoweringObjectFile *getObjFileLowering() const override {47return TLOF.get();48}4950MachineFunctionInfo *51createMachineFunctionInfo(BumpPtrAllocator &Allocator, const Function &F,52const TargetSubtargetInfo *STI) const override;5354bool isMachineVerifierClean() const override {55return false;56}57};58} // namespace llvm5960#endif // LLVM_LIB_TARGET_LANAI_LANAITARGETMACHINE_H616263