[llvm] [RISCV] Add CFI information for vector callee-saved registers (PR #86811)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 28 21:19:34 PDT 2024


================
@@ -1532,6 +1583,63 @@ bool RISCVFrameLowering::spillCalleeSavedRegisters(
   return true;
 }
 
+void RISCVFrameLowering::emitCalleeSavedRVVPrologCFI(
+    MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, bool HasFP) const {
+  MachineFunction *MF = MBB.getParent();
+  const MachineFrameInfo &MFI = MF->getFrameInfo();
+  RISCVMachineFunctionInfo *RVFI = MF->getInfo<RISCVMachineFunctionInfo>();
+  const TargetInstrInfo &TII = *STI.getInstrInfo();
+  DebugLoc DL = MBB.findDebugLoc(MI);
+
+  const auto &RVVCSI = getRVVCalleeSavedInfo(*MF, MFI.getCalleeSavedInfo());
+  if (RVVCSI.empty())
+    return;
+
+  uint64_t FixedSize = getStackSizeWithRVVPadding(*MF) +
+                       RVFI->getLibCallStackSize() + RVFI->getRVPushStackSize();
----------------
topperc wrote:

I think getLibCallStackSize and getRVPushStackSize part of getStackSizeWithRVVPadding after 0de2b26942f890a6ec84cd75ac7abe3f6f2b2e37 last month

https://github.com/llvm/llvm-project/pull/86811


More information about the llvm-commits mailing list