1 //===-- XCoreSubtarget.h - Define Subtarget for the XCore -------*- 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 XCore specific subclass of TargetSubtargetInfo.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_XCORE_XCORESUBTARGET_H
15 #define LLVM_LIB_TARGET_XCORE_XCORESUBTARGET_H
17 #include "XCoreFrameLowering.h"
18 #include "XCoreISelLowering.h"
19 #include "XCoreInstrInfo.h"
20 #include "XCoreSelectionDAGInfo.h"
21 #include "llvm/IR/DataLayout.h"
22 #include "llvm/Target/TargetMachine.h"
23 #include "llvm/Target/TargetSubtargetInfo.h"
26 #define GET_SUBTARGETINFO_HEADER
27 #include "XCoreGenSubtargetInfo.inc"
32 class XCoreSubtarget : public XCoreGenSubtargetInfo {
33 virtual void anchor();
34 XCoreInstrInfo InstrInfo;
35 XCoreFrameLowering FrameLowering;
36 XCoreTargetLowering TLInfo;
37 XCoreSelectionDAGInfo TSInfo;
40 /// This constructor initializes the data members to match that
41 /// of the specified triple.
43 XCoreSubtarget(const std::string &TT, const std::string &CPU,
44 const std::string &FS, const TargetMachine &TM);
46 /// ParseSubtargetFeatures - Parses features string setting specified
47 /// subtarget options. Definition of function is auto generated by tblgen.
48 void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
50 const XCoreInstrInfo *getInstrInfo() const override { return &InstrInfo; }
51 const XCoreFrameLowering *getFrameLowering() const override {
52 return &FrameLowering;
54 const XCoreTargetLowering *getTargetLowering() const override {
57 const XCoreSelectionDAGInfo *getSelectionDAGInfo() const override {
60 const TargetRegisterInfo *getRegisterInfo() const override {
61 return &InstrInfo.getRegisterInfo();
64 } // End llvm namespace