LLVM 20.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"
21#include "llvm/IR/DataLayout.h"
23
24#define GET_SUBTARGETINFO_HEADER
25#include "LanaiGenSubtargetInfo.inc"
26
27namespace llvm {
28
30public:
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,
35 const TargetOptions &Options, CodeModel::Model CodeModel,
36 CodeGenOptLevel 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
63 return &TSInfo;
64 }
65
66private:
67 LanaiFrameLowering FrameLowering;
68 LanaiInstrInfo InstrInfo;
71};
72} // namespace llvm
73
74#endif // LLVM_LIB_TARGET_LANAI_LANAISUBTARGET_H
static LVOptions Options
Definition: LVOptions.cpp:25
virtual const LanaiRegisterInfo & getRegisterInfo() const
const LanaiRegisterInfo * getRegisterInfo() const override
const LanaiInstrInfo * getInstrInfo() const override
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
const TargetFrameLowering * getFrameLowering() const override
const LanaiSelectionDAGInfo * getSelectionDAGInfo() const override
void initSubtargetFeatures(StringRef CPU, StringRef FS)
LanaiSubtarget & initializeSubtargetDependencies(StringRef CPU, StringRef FS)
bool enableMachineScheduler() const override
const LanaiTargetLowering * getTargetLowering() const override
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:51
Information about stack frame layout on the target.
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:77
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
CodeGenOptLevel
Code generation optimization level.
Definition: CodeGen.h:54