LLVM: lib/Target/LoongArch/LoongArchSubtarget.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_LIB_TARGET_LOONGARCH_LOONGARCHSUBTARGET_H

14#define LLVM_LIB_TARGET_LOONGARCH_LOONGARCHSUBTARGET_H

15

24

25#define GET_SUBTARGETINFO_HEADER

26#include "LoongArchGenSubtargetInfo.inc"

27

28namespace llvm {

29class StringRef;

30

32 virtual void anchor();

33

34#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \

35 bool ATTRIBUTE = DEFAULT;

36#include "LoongArchGenSubtargetInfo.inc"

37

38 unsigned GRLen = 32;

39

40

41

43 MVT GRLenVT = MVT::i32;

45 LoongArchFrameLowering FrameLowering;

46 LoongArchInstrInfo InstrInfo;

47 LoongArchTargetLowering TLInfo;

48 std::unique_ptr TSInfo;

49

50 Align PrefFunctionAlignment;

51 Align PrefLoopAlignment;

52 unsigned MaxBytesForAlignment;

53

54

55

57 StringRef CPU,

58 StringRef TuneCPU,

59 StringRef FS,

60 StringRef ABIName);

61

62

63 void initializeProperties(StringRef TuneCPU);

64

65public:

66

67 LoongArchSubtarget(const Triple &TT, StringRef CPU, StringRef TuneCPU,

68 StringRef FS, StringRef ABIName, const TargetMachine &TM);

69

71

72

73

75

77 return &FrameLowering;

78 }

81 return &InstrInfo.getRegisterInfo();

82 }

86

88

89#define GET_SUBTARGETINFO_MACRO(ATTRIBUTE, DEFAULT, GETTER) \

90 bool GETTER() const { return ATTRIBUTE; }

91#include "LoongArchGenSubtargetInfo.inc"

92

93 bool is64Bit() const { return HasLA64; }

95 unsigned getGRLen() const { return GRLen; }

107 bool useAA() const override;

108};

109}

110

111#endif

static const unsigned MaxInterleaveFactor

Maximum vectorization interleave count.

const LoongArchRegisterInfo * getRegisterInfo() const override

Definition LoongArchSubtarget.h:80

MVT getGRLenVT() const

Definition LoongArchSubtarget.h:94

const SelectionDAGTargetInfo * getSelectionDAGInfo() const override

const LoongArchTargetLowering * getTargetLowering() const override

Definition LoongArchSubtarget.h:83

bool is64Bit() const

Definition LoongArchSubtarget.h:93

bool useAA() const override

bool isSoftFPABI() const

Definition LoongArchSubtarget.h:97

const LoongArchInstrInfo * getInstrInfo() const override

Definition LoongArchSubtarget.h:79

unsigned getMaxBytesForAlignment() const

Definition LoongArchSubtarget.h:104

bool enableMachineScheduler() const override

Definition LoongArchSubtarget.h:106

unsigned getMaxInterleaveFactor() const

Definition LoongArchSubtarget.h:105

LoongArchSubtarget(const Triple &TT, StringRef CPU, StringRef TuneCPU, StringRef FS, StringRef ABIName, const TargetMachine &TM)

bool isXRaySupported() const override

Definition LoongArchSubtarget.h:101

void ParseSubtargetFeatures(StringRef CPU, StringRef TuneCPU, StringRef FS)

LoongArchABI::ABI getTargetABI() const

Definition LoongArchSubtarget.h:96

~LoongArchSubtarget() override

Align getPrefFunctionAlignment() const

Definition LoongArchSubtarget.h:102

const LoongArchFrameLowering * getFrameLowering() const override

Definition LoongArchSubtarget.h:76

unsigned getGRLen() const

Definition LoongArchSubtarget.h:95

Align getPrefLoopAlignment() const

Definition LoongArchSubtarget.h:103

Targets can subclass this to parameterize the SelectionDAG lowering and instruction selection process...

StringRef - 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.