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