LLVM 20.0.0git
XtensaSubtarget.h
Go to the documentation of this file.
1//===-- XtensaSubtarget.h - Define Subtarget for the Xtensa ----*- 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 Xtensa specific subclass of TargetSubtargetInfo.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_XTENSA_XTENSASUBTARGET_H
14#define LLVM_LIB_TARGET_XTENSA_XTENSASUBTARGET_H
15
16#include "XtensaFrameLowering.h"
17#include "XtensaISelLowering.h"
18#include "XtensaInstrInfo.h"
19#include "XtensaRegisterInfo.h"
22#include "llvm/IR/DataLayout.h"
24
25#define GET_SUBTARGETINFO_HEADER
26#include "XtensaGenSubtargetInfo.inc"
27
28namespace llvm {
29class StringRef;
30
32private:
33 const Triple &TargetTriple;
34 XtensaInstrInfo InstrInfo;
37 XtensaFrameLowering FrameLowering;
38
39 // Enabled Xtensa Density extension
40 bool HasDensity;
41
42 XtensaSubtarget &initializeSubtargetDependencies(StringRef CPU, StringRef FS);
43
44public:
45 XtensaSubtarget(const Triple &TT, StringRef CPU, StringRef FS,
46 const TargetMachine &TM);
47
48 const Triple &getTargetTriple() const { return TargetTriple; }
49
50 const TargetFrameLowering *getFrameLowering() const override {
51 return &FrameLowering;
52 }
53 const XtensaInstrInfo *getInstrInfo() const override { return &InstrInfo; }
54 const XtensaRegisterInfo *getRegisterInfo() const override {
55 return &InstrInfo.getRegisterInfo();
56 }
57
58 const XtensaTargetLowering *getTargetLowering() const override {
59 return &TLInfo;
60 }
62 return &TSInfo;
63 }
64
65 bool hasDensity() const { return HasDensity; }
66
67 // Automatically generated by tblgen.
69};
70} // end namespace llvm
71
72#endif /* LLVM_LIB_TARGET_XTENSA_XTENSASUBTARGET_H */
Targets can subclass this to parameterize the SelectionDAG lowering and instruction selection process...
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
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
const XtensaRegisterInfo & getRegisterInfo() const
const Triple & getTargetTriple() const
const SelectionDAGTargetInfo * getSelectionDAGInfo() const override
const XtensaInstrInfo * getInstrInfo() const override
const XtensaRegisterInfo * getRegisterInfo() const override
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
const XtensaTargetLowering * getTargetLowering() const override
const TargetFrameLowering * getFrameLowering() const override
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18