[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / lib / Target / ARC / ARCSubtarget.h
blob6a4856221b8f25643ff6ec4e43cad5b3003a7157
1 //===- ARCSubtarget.h - Define Subtarget for the ARC ------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares the ARC specific subclass of TargetSubtargetInfo.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_TARGET_ARC_ARCSUBTARGET_H
14 #define LLVM_LIB_TARGET_ARC_ARCSUBTARGET_H
16 #include "ARCFrameLowering.h"
17 #include "ARCISelLowering.h"
18 #include "ARCInstrInfo.h"
19 #include "llvm/CodeGen/SelectionDAGTargetInfo.h"
20 #include "llvm/CodeGen/TargetSubtargetInfo.h"
21 #include <string>
23 #define GET_SUBTARGETINFO_HEADER
24 #include "ARCGenSubtargetInfo.inc"
26 namespace llvm {
28 class StringRef;
29 class TargetMachine;
31 class ARCSubtarget : public ARCGenSubtargetInfo {
32 bool Xnorm = false;
34 virtual void anchor();
35 ARCInstrInfo InstrInfo;
36 ARCFrameLowering FrameLowering;
37 ARCTargetLowering TLInfo;
38 SelectionDAGTargetInfo TSInfo;
40 public:
41 /// This constructor initializes the data members to match that
42 /// of the specified triple.
43 ARCSubtarget(const Triple &TT, const std::string &CPU, const std::string &FS,
44 const TargetMachine &TM);
46 /// Parses features string setting specified subtarget options.
47 /// Definition of function is auto generated by tblgen.
48 void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS);
50 const ARCInstrInfo *getInstrInfo() const override { return &InstrInfo; }
51 const ARCFrameLowering *getFrameLowering() const override {
52 return &FrameLowering;
54 const ARCTargetLowering *getTargetLowering() const override {
55 return &TLInfo;
57 const ARCRegisterInfo *getRegisterInfo() const override {
58 return &InstrInfo.getRegisterInfo();
60 const SelectionDAGTargetInfo *getSelectionDAGInfo() const override {
61 return &TSInfo;
64 bool hasNorm() const { return Xnorm; }
67 } // end namespace llvm
69 #endif // LLVM_LIB_TARGET_ARC_ARCSUBTARGET_H