Path: blob/main/contrib/llvm-project/llvm/lib/Target/ARC/ARCSubtarget.h
35266 views
//===- ARCSubtarget.h - Define Subtarget for the 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 TargetSubtargetInfo.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_ARC_ARCSUBTARGET_H13#define LLVM_LIB_TARGET_ARC_ARCSUBTARGET_H1415#include "ARCFrameLowering.h"16#include "ARCISelLowering.h"17#include "ARCInstrInfo.h"18#include "llvm/CodeGen/SelectionDAGTargetInfo.h"19#include "llvm/CodeGen/TargetSubtargetInfo.h"20#include <string>2122#define GET_SUBTARGETINFO_HEADER23#include "ARCGenSubtargetInfo.inc"2425namespace llvm {2627class StringRef;28class TargetMachine;2930class ARCSubtarget : public ARCGenSubtargetInfo {31virtual void anchor();32ARCInstrInfo InstrInfo;33ARCFrameLowering FrameLowering;34ARCTargetLowering TLInfo;35SelectionDAGTargetInfo TSInfo;3637// ARC processor extensions38bool Xnorm = false;3940public:41/// This constructor initializes the data members to match that42/// of the specified triple.43ARCSubtarget(const Triple &TT, const std::string &CPU, const std::string &FS,44const TargetMachine &TM);4546/// Parses features string setting specified subtarget options.47/// Definition of function is auto generated by tblgen.48void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS);4950const ARCInstrInfo *getInstrInfo() const override { return &InstrInfo; }51const ARCFrameLowering *getFrameLowering() const override {52return &FrameLowering;53}54const ARCTargetLowering *getTargetLowering() const override {55return &TLInfo;56}57const ARCRegisterInfo *getRegisterInfo() const override {58return &InstrInfo.getRegisterInfo();59}60const SelectionDAGTargetInfo *getSelectionDAGInfo() const override {61return &TSInfo;62}6364bool hasNorm() const { return Xnorm; }65};6667} // end namespace llvm6869#endif // LLVM_LIB_TARGET_ARC_ARCSUBTARGET_H707172