LLVM: lib/Target/Mips/MipsFrameLowering.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

20

21using namespace llvm;

22

23

24

25

26

27

28

29

30

31

32

33

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

65

66

67

68

69

70

71

72

73

74

75

77 if (ST.inMips16Mode())

79

81}

82

83

84

85

86

90

93 TRI->hasStackRealignment(MF);

94}

95

99

101}

102

103

104

105

106

107

111

112 int64_t Size = 0;

113

114

118

119

120 for (const MCPhysReg *R = TRI.getCalleeSavedRegs(&MF); *R; ++R) {

121 unsigned RegSize = TRI.getSpillSize(*TRI.getMinimalPhysRegClass(*R));

123 }

124

125

126

128}

129

130

134 unsigned SP = STI.getABI().IsN64() ? Mips::SP_64 : Mips::SP;

135

137 int64_t Amount = I->getOperand(0).getImm();

138 if (I->getOpcode() == Mips::ADJCALLSTACKDOWN)

139 Amount = -Amount;

140

142 }

143

145}

unsigned const TargetRegisterInfo * TRI

instr_iterator erase(instr_iterator I)

Remove an instruction from the instruction list and delete it.

The MachineFrameInfo class represents an abstract stack frame until prolog/epilog code is inserted.

bool hasVarSizedObjects() const

This method may be called any time after instruction selection is complete to determine if the stack ...

bool isFrameAddressTaken() const

This method may be called any time after instruction selection is complete to determine if there is a...

uint64_t estimateStackSize(const MachineFunction &MF) const

Estimate and return the size of the stack frame.

int64_t getObjectSize(int ObjectIdx) const

Return the size of the specified object.

int64_t getObjectOffset(int ObjectIdx) const

Return the assigned stack offset of the specified object from the incoming stack pointer.

int getObjectIndexBegin() const

Return the minimum frame object index.

MachineFrameInfo & getFrameInfo()

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

const TargetMachine & getTarget() const

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

static const MipsFrameLowering * create(const MipsSubtarget &ST)

bool hasBP(const MachineFunction &MF) const

uint64_t estimateStackSize(const MachineFunction &MF) const

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

bool hasFPImpl(const MachineFunction &MF) const override

const MipsSubtarget & STI

virtual void adjustStackPtr(unsigned SP, int64_t Amount, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const =0

const MipsInstrInfo * getInstrInfo() const override

const MipsRegisterInfo * getRegisterInfo() const override

const MipsABIInfo & getABI() const

virtual bool hasReservedCallFrame(const MachineFunction &MF) const

hasReservedCallFrame - Under normal circumstances, when a frame pointer is not required,...

bool DisableFramePointerElim(const MachineFunction &MF) const

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

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

This is an optimization pass for GlobalISel generic memory operations.

const MipsFrameLowering * createMipsSEFrameLowering(const MipsSubtarget &ST)

uint64_t alignTo(uint64_t Size, Align A)

Returns a multiple of A needed to store Size bytes.

const MipsFrameLowering * createMips16FrameLowering(const MipsSubtarget &ST)

Create MipsFrameLowering objects.