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

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_LIB_TARGET_RISCV_RISCVFRAMELOWERING_H

14#define LLVM_LIB_TARGET_RISCV_RISCVFRAMELOWERING_H

15

18

19namespace llvm {

21

23public:

25

28

31

33

35 Register &FrameReg) const override;

36

39

42

44

49

50 bool

53 std::vector &CSI) const override;

58 bool

63

64

65

66

68

71

73

76

82

85 uint64_t RealStackSize, bool EmitCFI, bool NeedProbe,

86 uint64_t ProbeSize, bool DynAllocation,

88

89protected:

91

93

94private:

98 bool HasFP) const;

101 template

106 uint64_t &StackSize, int64_t CFAOffset) const;

107

108 std::pair<int64_t, Align>

110

117 bool DynAllocation) const;

118};

119}

120#endif

MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL

MachineBasicBlock MachineBasicBlock::iterator MBBI

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

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

assignCalleeSavedSpillSlots - Allows target to override spill slot assignment logic.

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

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

uint64_t getFirstSPAdjustAmount(const MachineFunction &MF) const

bool enableShrinkWrapping(const MachineFunction &MF) const override

Returns true if the target will correctly handle shrink wrapping.

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

bool hasBP(const MachineFunction &MF) const

void allocateStack(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI, MachineFunction &MF, uint64_t Offset, uint64_t RealStackSize, bool EmitCFI, bool NeedProbe, uint64_t ProbeSize, bool DynAllocation, MachineInstr::MIFlag Flag) const

bool canUseAsEpilogue(const MachineBasicBlock &MBB) const override

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

bool hasFPImpl(const MachineFunction &MF) const override

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

bool hasReservedCallFrame(const MachineFunction &MF) const override

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

Register getInitialCFARegister(const MachineFunction &MF) const override

Return initial CFA register value i.e.

const RISCVSubtarget & STI

Definition RISCVFrameLowering.h:90

StackOffset getFrameIndexReference(const MachineFunction &MF, int FI, Register &FrameReg) const override

getFrameIndexReference - This method should return the base register and offset used to reference a f...

bool isSupportedStackID(TargetStackID::Value ID) const override

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

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

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

TargetStackID::Value getStackIDForScalableVectors() const override

Returns the StackID that scalable vectors should be associated with.

int getInitialCFAOffset(const MachineFunction &MF) const override

Return initial CFA offset value i.e.

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

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

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

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

bool isStackIdSafeForLocalArea(unsigned StackId) const override

This method returns whether or not it is safe for an object with the given stack id to be bundled int...

Definition RISCVFrameLowering.h:77

bool canUseAsPrologue(const MachineBasicBlock &MBB) const override

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

RISCVFrameLowering(const RISCVSubtarget &STI)

uint64_t getStackSizeWithRVVPadding(const MachineFunction &MF) const

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.

StackOffset holds a fixed and a scalable offset in bytes.

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

unsigned ID

LLVM IR allows to use arbitrary numbers as calling convention identifiers.

This is an optimization pass for GlobalISel generic memory operations.