LLVM  10.0.0svn
LanaiSubtarget.h
Go to the documentation of this file.
1 //=====-- LanaiSubtarget.h - Define Subtarget for the Lanai -----*- 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 Lanai specific subclass of TargetSubtarget.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_LANAI_LANAISUBTARGET_H
14 #define LLVM_LIB_TARGET_LANAI_LANAISUBTARGET_H
15 
16 #include "LanaiFrameLowering.h"
17 #include "LanaiISelLowering.h"
18 #include "LanaiInstrInfo.h"
19 #include "LanaiSelectionDAGInfo.h"
22 #include "llvm/IR/DataLayout.h"
24 
25 #define GET_SUBTARGETINFO_HEADER
26 #include "LanaiGenSubtargetInfo.inc"
27 
28 namespace llvm {
29 
31 public:
32  // This constructor initializes the data members to match that
33  // of the specified triple.
34  LanaiSubtarget(const Triple &TargetTriple, StringRef Cpu,
35  StringRef FeatureString, const TargetMachine &TM,
36  const TargetOptions &Options, CodeModel::Model CodeModel,
37  CodeGenOpt::Level OptLevel);
38 
39  // ParseSubtargetFeatures - Parses features string setting specified
40  // subtarget options. Definition of function is auto generated by tblgen.
42 
44 
46 
47  bool enableMachineScheduler() const override { return true; }
48 
49  const LanaiInstrInfo *getInstrInfo() const override { return &InstrInfo; }
50 
51  const TargetFrameLowering *getFrameLowering() const override {
52  return &FrameLowering;
53  }
54 
55  const LanaiRegisterInfo *getRegisterInfo() const override {
56  return &InstrInfo.getRegisterInfo();
57  }
58 
59  const LanaiTargetLowering *getTargetLowering() const override {
60  return &TLInfo;
61  }
62 
63  const LanaiSelectionDAGInfo *getSelectionDAGInfo() const override {
64  return &TSInfo;
65  }
66 
67 private:
68  LanaiFrameLowering FrameLowering;
69  LanaiInstrInfo InstrInfo;
70  LanaiTargetLowering TLInfo;
71  LanaiSelectionDAGInfo TSInfo;
72 };
73 } // namespace llvm
74 
75 #endif // LLVM_LIB_TARGET_LANAI_LANAISUBTARGET_H
LanaiSubtarget & initializeSubtargetDependencies(StringRef CPU, StringRef FS)
This class represents lattice values for constants.
Definition: AllocatorList.h:23
const LanaiInstrInfo * getInstrInfo() const override
const TargetFrameLowering * getFrameLowering() const override
void initSubtargetFeatures(StringRef CPU, StringRef FS)
void ParseSubtargetFeatures(StringRef CPU, StringRef FS)
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:43
Information about stack frame layout on the target.
const LanaiSelectionDAGInfo * getSelectionDAGInfo() const override
const LanaiTargetLowering * getTargetLowering() const override
virtual const LanaiRegisterInfo & getRegisterInfo() const
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:65
bool enableMachineScheduler() const override
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48
LanaiSubtarget(const Triple &TargetTriple, StringRef Cpu, StringRef FeatureString, const TargetMachine &TM, const TargetOptions &Options, CodeModel::Model CodeModel, CodeGenOpt::Level OptLevel)
const LanaiRegisterInfo * getRegisterInfo() const override