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