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");
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;
65 assert(VarArgsSaveSize == 0 &&
66 "Interrupt functions should not having incoming varargs");
75 .
Case(
"SiFive-CLIC-preemptible",
78 .
Case(
"SiFive-CLIC-preemptible-stack-swap",
92 if (VarArgsSaveSize != 0)
142 SExt32Registers.push_back(Reg);
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
void initializeBaseYamlFields(const yaml::RISCVMachineFunctionInfo &YamlMFI)
InterruptStackKind getInterruptStackKind(const MachineFunction &MF) const
bool useSiFiveInterrupt(const MachineFunction &MF) const
bool isSExt32Register(Register Reg) const
MachineFunctionInfo * clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override
Make a functionally equivalent copy of this MachineFunctionInfo in MF.
PushPopKind getPushPopKind(const MachineFunction &MF) const
RISCVMachineFunctionInfo(const Function &F, const RISCVSubtarget *STI)
@ SiFiveCLICPreemptibleStackSwap
void addSExt32Register(Register Reg)
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)
BumpPtrAllocatorImpl BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
bool is_contained(R &&Range, const E &Element)
Returns true if Element is found in Range.
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
RISCVMachineFunctionInfo()=default