Path: blob/main/contrib/llvm-project/llvm/lib/Target/Xtensa/XtensaTargetMachine.h
35271 views
//===-- XtensaTargetMachine.h - Define TargetMachine for Xtensa -*- C++ -*-===//1//2// The LLVM Compiler Infrastructure3//4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.5// See https://llvm.org/LICENSE.txt for license information.6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception7//8//===----------------------------------------------------------------------===//9//10// This file declares the Xtensa specific subclass of TargetMachine.11//12//===----------------------------------------------------------------------===//1314#ifndef LLVM_LIB_TARGET_XTENSA_XTENSATARGETMACHINE_H15#define LLVM_LIB_TARGET_XTENSA_XTENSATARGETMACHINE_H1617#include "XtensaSubtarget.h"18#include "llvm/Target/TargetMachine.h"19#include <optional>2021namespace llvm {22extern Target TheXtensaTarget;2324class XtensaTargetMachine : public LLVMTargetMachine {25std::unique_ptr<TargetLoweringObjectFile> TLOF;26public:27XtensaTargetMachine(const Target &T, const Triple &TT, StringRef CPU,28StringRef FS, const TargetOptions &Options,29std::optional<Reloc::Model> RM,30std::optional<CodeModel::Model> CM, CodeGenOptLevel OL,31bool JIT, bool isLittle);3233XtensaTargetMachine(const Target &T, const Triple &TT, StringRef CPU,34StringRef FS, const TargetOptions &Options,35std::optional<Reloc::Model> RM,36std::optional<CodeModel::Model> CM, CodeGenOptLevel OL,37bool JIT);3839const XtensaSubtarget *getSubtargetImpl(const Function &F) const override;4041TargetPassConfig *createPassConfig(PassManagerBase &PM) override;4243TargetLoweringObjectFile *getObjFileLowering() const override {44return TLOF.get();45}4647protected:48mutable StringMap<std::unique_ptr<XtensaSubtarget>> SubtargetMap;49};50} // end namespace llvm5152#endif // LLVM_LIB_TARGET_XTENSA_XTENSATARGETMACHINE_H535455