1 //===- ARCSubtarget.h - Define Subtarget for the ARC ------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares the ARC specific subclass of TargetSubtargetInfo.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_ARC_ARCSUBTARGET_H
15 #define LLVM_LIB_TARGET_ARC_ARCSUBTARGET_H
17 #include "ARCFrameLowering.h"
18 #include "ARCISelLowering.h"
19 #include "ARCInstrInfo.h"
20 #include "llvm/CodeGen/SelectionDAGTargetInfo.h"
21 #include "llvm/CodeGen/TargetSubtargetInfo.h"
24 #define GET_SUBTARGETINFO_HEADER
25 #include "ARCGenSubtargetInfo.inc"
32 class ARCSubtarget : public ARCGenSubtargetInfo {
33 virtual void anchor();
34 ARCInstrInfo InstrInfo;
35 ARCFrameLowering FrameLowering;
36 ARCTargetLowering TLInfo;
37 SelectionDAGTargetInfo TSInfo;
40 /// This constructor initializes the data members to match that
41 /// of the specified triple.
42 ARCSubtarget(const Triple &TT, const std::string &CPU, const std::string &FS,
43 const TargetMachine &TM);
45 /// Parses features string setting specified subtarget options.
46 /// Definition of function is auto generated by tblgen.
47 void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
49 const ARCInstrInfo *getInstrInfo() const override { return &InstrInfo; }
50 const ARCFrameLowering *getFrameLowering() const override {
51 return &FrameLowering;
53 const ARCTargetLowering *getTargetLowering() const override {
56 const ARCRegisterInfo *getRegisterInfo() const override {
57 return &InstrInfo.getRegisterInfo();
59 const SelectionDAGTargetInfo *getSelectionDAGInfo() const override {
64 } // end namespace llvm
66 #endif // LLVM_LIB_TARGET_ARC_ARCSUBTARGET_H