Path: blob/main/contrib/llvm-project/llvm/lib/Target/ARC/ARCTargetMachine.h
35268 views
//===- ARCTargetMachine.h - Define TargetMachine for ARC --------*- 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 ARC specific subclass of TargetMachine.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_ARC_ARCTARGETMACHINE_H13#define LLVM_LIB_TARGET_ARC_ARCTARGETMACHINE_H1415#include "ARCSubtarget.h"16#include "llvm/Target/TargetMachine.h"17#include <optional>1819namespace llvm {2021class TargetPassConfig;2223class ARCTargetMachine : public LLVMTargetMachine {24std::unique_ptr<TargetLoweringObjectFile> TLOF;25ARCSubtarget Subtarget;2627public:28ARCTargetMachine(const Target &T, const Triple &TT, StringRef CPU,29StringRef FS, const TargetOptions &Options,30std::optional<Reloc::Model> RM,31std::optional<CodeModel::Model> CM, CodeGenOptLevel OL,32bool JIT);33~ARCTargetMachine() override;3435const ARCSubtarget *getSubtargetImpl() const { return &Subtarget; }36const ARCSubtarget *getSubtargetImpl(const Function &) const override {37return &Subtarget;38}3940// Pass Pipeline Configuration41TargetPassConfig *createPassConfig(PassManagerBase &PM) override;4243TargetTransformInfo getTargetTransformInfo(const Function &F) const override;44TargetLoweringObjectFile *getObjFileLowering() const override {45return TLOF.get();46}4748MachineFunctionInfo *49createMachineFunctionInfo(BumpPtrAllocator &Allocator, const Function &F,50const TargetSubtargetInfo *STI) const override;51};5253} // end namespace llvm5455#endif // LLVM_LIB_TARGET_ARC_ARCTARGETMACHINE_H565758