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

1

2

3

4

5

6

7

8

9

10

11

12

15

16using namespace llvm;

17

22

29

32

33

34

35

37 if (F.hasFnAttribute("stack-probe-size"))

38 ProbeSize = F.getFnAttributeAsParsedInteger("stack-probe-size");

40 F.getParent()->getModuleFlag("stack-probe-size")))

41 ProbeSize = PS->getZExtValue();

42 assert(int64_t(ProbeSize) > 0 && "Invalid stack probe size");

43

44

47 ProbeSize = std::max(StackAlign, alignDown(ProbeSize, StackAlign));

49 if (F.hasFnAttribute("probe-stack"))

50 ProbeKind = F.getFnAttribute("probe-stack").getValueAsString();

52 F.getParent()->getModuleFlag("probe-stack")))

53 ProbeKind = PS->getString();

54 if (ProbeKind.size()) {

55 StackProbeSize = ProbeSize;

56 }

57}

58

64

65 assert(VarArgsSaveSize == 0 &&

66 "Interrupt functions should not having incoming varargs");

67

70

72 InterruptVal)

75 .Case("SiFive-CLIC-preemptible",

78 .Case("SiFive-CLIC-preemptible-stack-swap",

81}

82

86

89

90

91

92 if (VarArgsSaveSize != 0)

94

95

98

99

103

104

105

108

110}

111

117

118 return true;

119 default:

120 break;

121 }

122

125

126

127 return true;

128 default:

129 break;

130 }

131

132 return false;

133}

134

140

142 SExt32Registers.push_back(Reg);

143}

144

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

Module.h This file contains the declarations for the Module class.

LLVM_ABI StringRef getValueAsString() const

Return the attribute's value as a string.

Attribute getFnAttribute(Attribute::AttrKind Kind) const

Return the attribute for the given attribute kind.

bool hasFnAttribute(Attribute::AttrKind Kind) const

Return true if the function has the attribute.

const TargetSubtargetInfo & getSubtarget() const

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

Function & getFunction()

Return the LLVM function that this machine code represents.

Ty * cloneInfo(const Ty &Old)

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

bool hasImplicitFPUpdates(const MachineFunction &MF) const

Definition RISCVMachineFunctionInfo.cpp:112

void initializeBaseYamlFields(const yaml::RISCVMachineFunctionInfo &YamlMFI)

Definition RISCVMachineFunctionInfo.cpp:135

InterruptStackKind getInterruptStackKind(const MachineFunction &MF) const

Definition RISCVMachineFunctionInfo.cpp:60

bool useSiFiveInterrupt(const MachineFunction &MF) const

bool isSExt32Register(Register Reg) const

Definition RISCVMachineFunctionInfo.cpp:145

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

Make a functionally equivalent copy of this MachineFunctionInfo in MF.

Definition RISCVMachineFunctionInfo.cpp:23

PushPopKind getPushPopKind(const MachineFunction &MF) const

Definition RISCVMachineFunctionInfo.cpp:88

RISCVMachineFunctionInfo(const Function &F, const RISCVSubtarget *STI)

Definition RISCVMachineFunctionInfo.cpp:30

@ SiFiveCLICPreemptibleStackSwap

void addSExt32Register(Register Reg)

Definition RISCVMachineFunctionInfo.cpp:141

const RISCVFrameLowering * getFrameLowering() const override

Wrapper class representing virtual and physical registers.

StringRef - Represent a constant reference to a string, i.e.

constexpr size_t size() const

size - Get the string size.

A switch()-like statement whose cases are string literals.

StringSwitch & Case(StringLiteral S, T Value)

Align getTransientStackAlign() const

getTransientStackAlignment - This method returns the number of bytes to which the stack pointer must ...

LLVM_ABI bool DisableFramePointerElim(const MachineFunction &MF) const

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

std::enable_if_t< detail::IsValidPointer< X, Y >::value, X * > extract_or_null(Y &&MD)

Extract a Value from Metadata, allowing null.

This is an optimization pass for GlobalISel generic memory operations.

constexpr T alignDown(U Value, V Align, W Skew=0)

Returns the largest unsigned integer less than or equal to Value and is Skew mod Align.

auto dyn_cast_or_null(const Y &Val)

bool is_contained(R &&Range, const E &Element)

Returns true if Element is found in Range.

BumpPtrAllocatorImpl<> BumpPtrAllocator

The standard BumpPtrAllocator which just uses the default template parameters.

constexpr uint64_t value() const

This is a hole in the type system and should not be abused.

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

This class should be specialized by any type that needs to be converted to/from a YAML mapping.

void mappingImpl(yaml::IO &YamlIO) override

Definition RISCVMachineFunctionInfo.cpp:83

RISCVMachineFunctionInfo()=default