LLVM  8.0.1
ARCSubtarget.h
Go to the documentation of this file.
1 //===- ARCSubtarget.h - Define Subtarget for the ARC ------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the ARC specific subclass of TargetSubtargetInfo.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_ARC_ARCSUBTARGET_H
15 #define LLVM_LIB_TARGET_ARC_ARCSUBTARGET_H
16 
17 #include "ARCFrameLowering.h"
18 #include "ARCISelLowering.h"
19 #include "ARCInstrInfo.h"
22 #include <string>
23 
24 #define GET_SUBTARGETINFO_HEADER
25 #include "ARCGenSubtargetInfo.inc"
26 
27 namespace llvm {
28 
29 class StringRef;
30 class TargetMachine;
31 
33  virtual void anchor();
34  ARCInstrInfo InstrInfo;
35  ARCFrameLowering FrameLowering;
36  ARCTargetLowering TLInfo;
38 
39 public:
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);
44 
45  /// Parses features string setting specified subtarget options.
46  /// Definition of function is auto generated by tblgen.
48 
49  const ARCInstrInfo *getInstrInfo() const override { return &InstrInfo; }
50  const ARCFrameLowering *getFrameLowering() const override {
51  return &FrameLowering;
52  }
53  const ARCTargetLowering *getTargetLowering() const override {
54  return &TLInfo;
55  }
56  const ARCRegisterInfo *getRegisterInfo() const override {
57  return &InstrInfo.getRegisterInfo();
58  }
59  const SelectionDAGTargetInfo *getSelectionDAGInfo() const override {
60  return &TSInfo;
61  }
62 };
63 
64 } // end namespace llvm
65 
66 #endif // LLVM_LIB_TARGET_ARC_ARCSUBTARGET_H
const ARCRegisterInfo & getRegisterInfo() const
Definition: ARCInstrInfo.h:34
This class represents lattice values for constants.
Definition: AllocatorList.h:24
void ParseSubtargetFeatures(StringRef CPU, StringRef FS)
Parses features string setting specified subtarget options.
const ARCRegisterInfo * getRegisterInfo() const override
Definition: ARCSubtarget.h:56
const ARCInstrInfo * getInstrInfo() const override
Definition: ARCSubtarget.h:49
ARCSubtarget(const Triple &TT, const std::string &CPU, const std::string &FS, const TargetMachine &TM)
This constructor initializes the data members to match that of the specified triple.
const ARCTargetLowering * getTargetLowering() const override
Definition: ARCSubtarget.h:53
Targets can subclass this to parameterize the SelectionDAG lowering and instruction selection process...
const SelectionDAGTargetInfo * getSelectionDAGInfo() const override
Definition: ARCSubtarget.h:59
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:59
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
const ARCFrameLowering * getFrameLowering() const override
Definition: ARCSubtarget.h:50