LLVM  14.0.0git
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"
21 #include "llvm/IR/DataLayout.h"
23 
24 #define GET_SUBTARGETINFO_HEADER
25 #include "LanaiGenSubtargetInfo.inc"
26 
27 namespace llvm {
28 
30 public:
31  // This constructor initializes the data members to match that
32  // of the specified triple.
33  LanaiSubtarget(const Triple &TargetTriple, StringRef Cpu,
34  StringRef FeatureString, const TargetMachine &TM,
36  CodeGenOpt::Level OptLevel);
37 
38  // ParseSubtargetFeatures - Parses features string setting specified
39  // subtarget options. Definition of function is auto generated by tblgen.
41 
43 
45 
46  bool enableMachineScheduler() const override { return true; }
47 
48  const LanaiInstrInfo *getInstrInfo() const override { return &InstrInfo; }
49 
50  const TargetFrameLowering *getFrameLowering() const override {
51  return &FrameLowering;
52  }
53 
54  const LanaiRegisterInfo *getRegisterInfo() const override {
55  return &InstrInfo.getRegisterInfo();
56  }
57 
58  const LanaiTargetLowering *getTargetLowering() const override {
59  return &TLInfo;
60  }
61 
62  const LanaiSelectionDAGInfo *getSelectionDAGInfo() const override {
63  return &TSInfo;
64  }
65 
66 private:
67  LanaiFrameLowering FrameLowering;
68  LanaiInstrInfo InstrInfo;
69  LanaiTargetLowering TLInfo;
70  LanaiSelectionDAGInfo TSInfo;
71 };
72 } // namespace llvm
73 
74 #endif // LLVM_LIB_TARGET_LANAI_LANAISUBTARGET_H
LanaiSelectionDAGInfo.h
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::LanaiSubtarget::initSubtargetFeatures
void initSubtargetFeatures(StringRef CPU, StringRef FS)
Definition: LanaiSubtarget.cpp:25
LanaiGenSubtargetInfo
llvm::LanaiSubtarget::ParseSubtargetFeatures
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
llvm::TargetFrameLowering
Information about stack frame layout on the target.
Definition: TargetFrameLowering.h:43
llvm::TargetOptions
Definition: TargetOptions.h:124
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:45
llvm::LanaiSelectionDAGInfo
Definition: LanaiSelectionDAGInfo.h:21
LanaiFrameLowering.h
llvm::MSP430Attrs::CodeModel
CodeModel
Definition: MSP430Attributes.h:37
TargetMachine.h
llvm::LanaiInstrInfo::getRegisterInfo
virtual const LanaiRegisterInfo & getRegisterInfo() const
Definition: LanaiInstrInfo.h:34
llvm::LanaiSubtarget::LanaiSubtarget
LanaiSubtarget(const Triple &TargetTriple, StringRef Cpu, StringRef FeatureString, const TargetMachine &TM, const TargetOptions &Options, CodeModel::Model CodeModel, CodeGenOpt::Level OptLevel)
Definition: LanaiSubtarget.cpp:39
llvm::X86AS::FS
@ FS
Definition: X86.h:188
Options
const char LLVMTargetMachineRef LLVMPassBuilderOptionsRef Options
Definition: PassBuilderBindings.cpp:48
llvm::LanaiTargetLowering
Definition: LanaiISelLowering.h:67
llvm::LanaiSubtarget::getSelectionDAGInfo
const LanaiSelectionDAGInfo * getSelectionDAGInfo() const override
Definition: LanaiSubtarget.h:62
llvm::CodeModel::Model
Model
Definition: CodeGen.h:28
llvm::LanaiSubtarget::enableMachineScheduler
bool enableMachineScheduler() const override
Definition: LanaiSubtarget.h:46
llvm::LanaiSubtarget::getFrameLowering
const TargetFrameLowering * getFrameLowering() const override
Definition: LanaiSubtarget.h:50
llvm::LanaiSubtarget::getTargetLowering
const LanaiTargetLowering * getTargetLowering() const override
Definition: LanaiSubtarget.h:58
llvm::LanaiInstrInfo
Definition: LanaiInstrInfo.h:25
llvm::TargetMachine
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:79
DataLayout.h
llvm::LanaiSubtarget::initializeSubtargetDependencies
LanaiSubtarget & initializeSubtargetDependencies(StringRef CPU, StringRef FS)
Definition: LanaiSubtarget.cpp:33
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::LanaiSubtarget
Definition: LanaiSubtarget.h:29
TargetSubtargetInfo.h
llvm::LanaiRegisterInfo
Definition: LanaiRegisterInfo.h:23
llvm::CodeGenOpt::Level
Level
Definition: CodeGen.h:52
llvm::LanaiSubtarget::getRegisterInfo
const LanaiRegisterInfo * getRegisterInfo() const override
Definition: LanaiSubtarget.h:54
LanaiISelLowering.h
llvm::LanaiFrameLowering
Definition: LanaiFrameLowering.h:23
llvm::LanaiSubtarget::getInstrInfo
const LanaiInstrInfo * getInstrInfo() const override
Definition: LanaiSubtarget.h:48
TM
const char LLVMTargetMachineRef TM
Definition: PassBuilderBindings.cpp:47
LanaiInstrInfo.h