13#ifndef LLVM_LIB_TARGET_LOONGARCH_LOONGARCHSUBTARGET_H
14#define LLVM_LIB_TARGET_LOONGARCH_LOONGARCHSUBTARGET_H
25#define GET_SUBTARGETINFO_HEADER
26#include "LoongArchGenSubtargetInfo.inc"
32 virtual void anchor();
34#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \
35 bool ATTRIBUTE = DEFAULT;
36#include "LoongArchGenSubtargetInfo.inc"
43 MVT GRLenVT = MVT::i32;
45 LoongArchFrameLowering FrameLowering;
46 LoongArchInstrInfo InstrInfo;
47 LoongArchTargetLowering TLInfo;
48 std::unique_ptr<const SelectionDAGTargetInfo> TSInfo;
50 Align PrefFunctionAlignment;
51 Align PrefLoopAlignment;
52 unsigned MaxBytesForAlignment;
56 unsigned PrefetchDistance;
57 unsigned MinPrefetchStride;
58 unsigned MaxPrefetchIterationsAhead;
69 void initializeProperties(StringRef TuneCPU);
74 StringRef FS, StringRef ABIName,
const TargetMachine &TM);
83 return &FrameLowering;
87 return &InstrInfo.getRegisterInfo();
95#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \
96 bool GETTER() const { return ATTRIBUTE; }
97#include "LoongArchGenSubtargetInfo.inc"
114 unsigned NumStridedMemAccesses,
115 unsigned NumPrefetches,
116 bool HasCall)
const override {
117 return MinPrefetchStride;
120 return MaxPrefetchIterationsAhead;
124 bool useAA()
const override;
static const unsigned MaxInterleaveFactor
Maximum vectorization interleave count.
const LoongArchRegisterInfo * getRegisterInfo() const override
const SelectionDAGTargetInfo * getSelectionDAGInfo() const override
const LoongArchTargetLowering * getTargetLowering() const override
bool useAA() const override
const LoongArchInstrInfo * getInstrInfo() const override
unsigned getPrefetchDistance() const override
unsigned getMaxBytesForAlignment() const
bool enableMachineScheduler() const override
bool enableWritePrefetching() const override
unsigned getMaxInterleaveFactor() const
LoongArchSubtarget(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS, StringRef ABIName, const TargetMachine &TM)
bool isXRaySupported() const override
void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)
LoongArchABI::ABI getTargetABI() const
~LoongArchSubtarget() override
Align getPrefFunctionAlignment() const
const LoongArchFrameLowering * getFrameLowering() const override
unsigned getGRLen() const
unsigned getMinPrefetchStride(unsigned NumMemAccesses, unsigned NumStridedMemAccesses, unsigned NumPrefetches, bool HasCall) const override
Align getPrefLoopAlignment() const
unsigned getMaxPrefetchIterationsAhead() const override
Targets can subclass this to parameterize the SelectionDAG lowering and instruction selection process...
Represent a constant reference to a string, i.e.
This is an optimization pass for GlobalISel generic memory operations.
This struct is a compact representation of a valid (non-zero power of two) alignment.