LLVM: lib/Target/RISCV/RISCVMachineFunctionInfo.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_LIB_TARGET_RISCV_RISCVMACHINEFUNCTIONINFO_H

14#define LLVM_LIB_TARGET_RISCV_RISCVMACHINEFUNCTIONINFO_H

15

20

21namespace llvm {

22

23class RISCVMachineFunctionInfo;

24

25namespace yaml {

29

32

35};

36

41 }

42};

43}

44

45

46

48private:

49

50 int VarArgsFrameIndex = 0;

51

52 int VarArgsSaveSize = 0;

53

54

55 int MoveF64FrameIndex = -1;

56

57 int BranchRelaxationScratchFrameIndex = -1;

58

59 unsigned LibCallStackSize = 0;

60

62

63 Align RVVStackAlign;

64

66

67 unsigned CalleeSavedStackSize = 0;

68

69 bool IsVectorCall = false;

70

71

73

74

75 unsigned RVPushStackSize = 0;

76 unsigned RVPushRegs = 0;

78

79 int64_t StackProbeSize = 0;

80

81

82 bool HasDynamicAllocation = false;

83

84public:

86

90 const override;

91

94

97

99 if (MoveF64FrameIndex == -1)

100 MoveF64FrameIndex =

102 return MoveF64FrameIndex;

103 }

104

106 return BranchRelaxationScratchFrameIndex;

107 }

109 BranchRelaxationScratchFrameIndex = Index;

110 }

111

113 return LibCallStackSize + RVPushStackSize;

114 }

115

118

120

121

126 }

127

130

133

136

139

141

142

143

146 VarArgsSaveSize == 0;

147 }

148

151

154

157

159

162

165

168};

169

170}

171

172#endif

Allocate memory in an ever growing pool, as if by bump-pointer.

bool hasFnAttribute(Attribute::AttrKind Kind) const

Return true if the function has the attribute.

int CreateStackObject(uint64_t Size, Align Alignment, bool isSpillSlot, const AllocaInst *Alloca=nullptr, uint8_t ID=0)

Create a new statically sized stack object, returning a nonnegative identifier to represent it.

bool hasTailCall() const

Returns true if the function contains a tail call.

const TargetSubtargetInfo & getSubtarget() const

getSubtarget - Return the subtarget for which this machine code is being compiled.

MachineFrameInfo & getFrameInfo()

getFrameInfo - Return the frame info object for the current function.

Function & getFunction()

Return the LLVM function that this machine code represents.

const TargetMachine & getTarget() const

getTarget - Return the target machine this machine code is compiled with

RISCVMachineFunctionInfo - This class is derived from MachineFunctionInfo and contains private RISCV-...

void setLibCallStackSize(unsigned Size)

bool isPushable(const MachineFunction &MF) const

void initializeBaseYamlFields(const yaml::RISCVMachineFunctionInfo &YamlMFI)

bool hasDynamicAllocation() const

void setRVPushStackSize(unsigned Size)

bool isSExt32Register(Register Reg) const

int getRVPushRlist() const

MachineFunctionInfo * clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override

Make a functionally equivalent copy of this MachineFunctionInfo in MF.

void setCalleeSavedStackSize(unsigned Size)

void setRVVPadding(uint64_t Padding)

unsigned getLibCallStackSize() const

uint64_t getRVVPadding() const

void setVarArgsFrameIndex(int Index)

unsigned getRVPushStackSize() const

int getVarArgsFrameIndex() const

unsigned getReservedSpillsSize() const

void setBranchRelaxationScratchFrameIndex(int Index)

unsigned getRVPushRegs() const

bool isVectorCall() const

bool useSaveRestoreLibCalls(const MachineFunction &MF) const

void setRVVStackSize(uint64_t Size)

uint64_t getRVVStackSize() const

void setVarArgsSaveSize(int Size)

Align getRVVStackAlign() const

int getBranchRelaxationScratchFrameIndex() const

unsigned getVarArgsSaveSize() const

void setRVPushRlist(int Rlist)

void setDynamicAllocation()

int getMoveF64FrameIndex(MachineFunction &MF)

void setRVVStackAlign(Align StackAlign)

unsigned getCalleeSavedStackSize() const

void addSExt32Register(Register Reg)

void setRVPushRegs(unsigned Regs)

Wrapper class representing virtual and physical registers.

This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.

bool DisableFramePointerElim(const MachineFunction &MF) const

DisableFramePointerElim - This returns true if frame pointer elimination optimization should be disab...

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.

MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...

Targets should override this in a way that mirrors the implementation of llvm::MachineFunctionInfo.

static void mapping(IO &YamlIO, RISCVMachineFunctionInfo &MFI)

void mappingImpl(yaml::IO &YamlIO) override

RISCVMachineFunctionInfo()=default

~RISCVMachineFunctionInfo()=default