Path: blob/main/contrib/llvm-project/llvm/lib/Target/VE/VETargetMachine.h
35268 views
//===-- VETargetMachine.h - Define TargetMachine for VE ---------*- 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 VE specific subclass of TargetMachine.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_VE_VETARGETMACHINE_H13#define LLVM_LIB_TARGET_VE_VETARGETMACHINE_H1415#include "VEInstrInfo.h"16#include "VESubtarget.h"17#include "llvm/Target/TargetMachine.h"18#include <optional>1920namespace llvm {2122class VETargetMachine : public LLVMTargetMachine {23std::unique_ptr<TargetLoweringObjectFile> TLOF;24VESubtarget Subtarget;25// Hold Strings that can be free'd all together with VETargetMachine26// e.g.: "GCC_except_tableXX" string.27std::list<std::string> StrList;2829public:30VETargetMachine(const Target &T, const Triple &TT, StringRef CPU,31StringRef FS, const TargetOptions &Options,32std::optional<Reloc::Model> RM,33std::optional<CodeModel::Model> CM, CodeGenOptLevel OL,34bool JIT);35~VETargetMachine() override;3637const VESubtarget *getSubtargetImpl() const { return &Subtarget; }38const VESubtarget *getSubtargetImpl(const Function &) const override {39return &Subtarget;40}41std::list<std::string> *getStrList() const {42return const_cast<std::list<std::string> *>(&StrList);43}4445// Pass Pipeline Configuration46TargetPassConfig *createPassConfig(PassManagerBase &PM) override;47TargetLoweringObjectFile *getObjFileLowering() const override {48return TLOF.get();49}5051MachineFunctionInfo *52createMachineFunctionInfo(BumpPtrAllocator &Allocator, const Function &F,53const TargetSubtargetInfo *STI) const override;5455bool isMachineVerifierClean() const override { return false; }5657TargetTransformInfo getTargetTransformInfo(const Function &F) const override;5859unsigned getSjLjDataSize() const override { return 64; }60};6162} // namespace llvm6364#endif656667