LLVM: lib/Target/PowerPC/PPCFrameLowering.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12#ifndef LLVM_LIB_TARGET_POWERPC_PPCFRAMELOWERING_H

13#define LLVM_LIB_TARGET_POWERPC_PPCFRAMELOWERING_H

14

18

19namespace llvm {

21

24 const uint64_t ReturnSaveOffset;

26 const uint64_t FramePointerSaveOffset;

27 const unsigned LinkageSize;

28 const uint64_t BasePointerSaveOffset;

30

31

32

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

66 bool UseAtEnd,

67 bool TwoUniqueRegsRequired = false,

69 Register *SR2 = nullptr) const;

71

72

73

74

75

76

78

79

80

81

82

84

85public:

87

88

89

90

92 bool UseEstimate = false) const;

93

94

95

96

97

98

100 bool UseEstimate = false,

101 unsigned *NewMaxCallFrameSize = nullptr) const;

102

103

104

109

112

118

123

124

125

126 bool

129 std::vector &CSI) const override;

130

134

135 bool

140

141

142

143

145

146

147

149

150

151

153

154

155

157

158

159

161

162

163

165

166 const SpillSlot *

168

170

171

172

176

178

179protected:

181};

182}

183

184#endif

Register const TargetRegisterInfo * TRI

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

MachineInstrBundleIterator< MachineInstr > iterator

MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...

uint64_t getReturnSaveOffset() const

getReturnSaveOffset - Return the previous frame offset to save the return address.

Definition PPCFrameLowering.h:148

bool needsFP(const MachineFunction &MF) const

void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override

bool targetHandlesStackFrameRounding() const override

targetHandlesStackFrameRounding - Returns true if the target is responsible for rounding up the stack...

Definition PPCFrameLowering.h:144

bool canUseAsEpilogue(const MachineBasicBlock &MBB) const override

Check whether or not the given MBB can be used as a epilogue for the target.

uint64_t getStackThreshold() const override

getStackThreshold - Return the maximum stack size

void processFunctionBeforeFrameFinalized(MachineFunction &MF, RegScavenger *RS=nullptr) const override

processFunctionBeforeFrameFinalized - This method is called immediately before the specified function...

bool hasFPImpl(const MachineFunction &MF) const override

uint64_t getFramePointerSaveOffset() const

getFramePointerSaveOffset - Return the previous frame offset to save the frame pointer.

bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, ArrayRef< CalleeSavedInfo > CSI, const TargetRegisterInfo *TRI) const override

spillCalleeSavedRegisters - Issues instruction(s) to spill all callee saved registers and returns tru...

unsigned getLinkageSize() const

getLinkageSize - Return the size of the PowerPC ABI linkage area.

Definition PPCFrameLowering.h:164

MachineBasicBlock::iterator eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const override

This method is called during prolog/epilog code insertion to eliminate call frame setup and destroy p...

const SpillSlot * getCalleeSavedSpillSlots(unsigned &NumEntries) const override

getCalleeSavedSpillSlots - This method returns a pointer to an array of pairs, that contains an entry...

void determineCalleeSaves(MachineFunction &MF, BitVector &SavedRegs, RegScavenger *RS=nullptr) const override

This method determines which of the registers reported by TargetRegisterInfo::getCalleeSavedRegs() sh...

bool canUseAsPrologue(const MachineBasicBlock &MBB) const override

Methods used by shrink wrapping to determine if MBB can be used for the function prologue/epilogue.

void emitPrologue(MachineFunction &MF, MachineBasicBlock &MBB) const override

emitProlog/emitEpilog - These methods insert prolog and epilog code into the function.

bool restoreCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, MutableArrayRef< CalleeSavedInfo > CSI, const TargetRegisterInfo *TRI) const override

restoreCalleeSavedRegisters - Issues instruction(s) to restore all callee saved registers and returns...

void replaceFPWithRealFP(MachineFunction &MF) const

bool enableShrinkWrapping(const MachineFunction &MF) const override

Returns true if the target will correctly handle shrink wrapping.

uint64_t determineFrameLayout(const MachineFunction &MF, bool UseEstimate=false, unsigned *NewMaxCallFrameSize=nullptr) const

Determine the frame layout but do not update the machine function.

void addScavengingSpillSlot(MachineFunction &MF, RegScavenger *RS) const

PPCFrameLowering(const PPCSubtarget &STI)

bool assignCalleeSavedSpillSlots(MachineFunction &MF, const TargetRegisterInfo *TRI, std::vector< CalleeSavedInfo > &CSI) const override

This function will assign callee saved gprs to volatile vector registers for prologue spills when app...

uint64_t determineFrameLayoutAndUpdate(MachineFunction &MF, bool UseEstimate=false) const

Determine the frame layout and update the machine function.

void updateCalleeSaves(const MachineFunction &MF, BitVector &SavedRegs) const

void inlineStackProbe(MachineFunction &MF, MachineBasicBlock &PrologMBB) const override

Replace a StackProbe stub (if any) with the actual probe code inline.

uint64_t getTOCSaveOffset() const

getTOCSaveOffset - Return the previous frame offset to save the TOC register – 64-bit SVR4 ABI only.

uint64_t getBasePointerSaveOffset() const

getBasePointerSaveOffset - Return the previous frame offset to save the base pointer.

Wrapper class representing virtual and physical registers.

TargetFrameLowering(StackDirection D, Align StackAl, int LAO, Align TransAl=Align(1), bool StackReal=true)

TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...

This is an optimization pass for GlobalISel generic memory operations.