LLVM  8.0.1
XCoreSubtarget.h
Go to the documentation of this file.
1 //===-- XCoreSubtarget.h - Define Subtarget for the XCore -------*- 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 XCore specific subclass of TargetSubtargetInfo.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_XCORE_XCORESUBTARGET_H
15 #define LLVM_LIB_TARGET_XCORE_XCORESUBTARGET_H
16 
17 #include "XCoreFrameLowering.h"
18 #include "XCoreISelLowering.h"
19 #include "XCoreInstrInfo.h"
20 #include "XCoreSelectionDAGInfo.h"
22 #include "llvm/IR/DataLayout.h"
24 #include <string>
25 
26 #define GET_SUBTARGETINFO_HEADER
27 #include "XCoreGenSubtargetInfo.inc"
28 
29 namespace llvm {
30 class StringRef;
31 
33  virtual void anchor();
34  XCoreInstrInfo InstrInfo;
35  XCoreFrameLowering FrameLowering;
36  XCoreTargetLowering TLInfo;
37  XCoreSelectionDAGInfo TSInfo;
38 
39 public:
40  /// This constructor initializes the data members to match that
41  /// of the specified triple.
42  ///
43  XCoreSubtarget(const Triple &TT, const std::string &CPU,
44  const std::string &FS, const TargetMachine &TM);
45 
46  /// ParseSubtargetFeatures - Parses features string setting specified
47  /// subtarget options. Definition of function is auto generated by tblgen.
49 
50  const XCoreInstrInfo *getInstrInfo() const override { return &InstrInfo; }
51  const XCoreFrameLowering *getFrameLowering() const override {
52  return &FrameLowering;
53  }
54  const XCoreTargetLowering *getTargetLowering() const override {
55  return &TLInfo;
56  }
57  const XCoreSelectionDAGInfo *getSelectionDAGInfo() const override {
58  return &TSInfo;
59  }
60  const TargetRegisterInfo *getRegisterInfo() const override {
61  return &InstrInfo.getRegisterInfo();
62  }
63 };
64 } // End llvm namespace
65 
66 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:24
const XCoreTargetLowering * getTargetLowering() const override
const XCoreSelectionDAGInfo * getSelectionDAGInfo() const override
const XCoreInstrInfo * getInstrInfo() const override
void ParseSubtargetFeatures(StringRef CPU, StringRef FS)
ParseSubtargetFeatures - Parses features string setting specified subtarget options.
const TargetRegisterInfo & getRegisterInfo() const
getRegisterInfo - TargetInstrInfo is a superset of MRegister info.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
XCoreSubtarget(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 TargetRegisterInfo * getRegisterInfo() const override
const XCoreFrameLowering * getFrameLowering() const override
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