[llvm] [RISCV][CFI] add function epilogue cfi information (PR #110234)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 30 13:51:21 PDT 2024
================
@@ -1576,6 +1653,31 @@ void RISCVFrameLowering::emitCalleeSavedRVVPrologCFI(
}
}
+void RISCVFrameLowering::emitCalleeSavedRVVEpilogCFI(
+ MachineBasicBlock &MBB, MachineBasicBlock::iterator MI) const {
+ MachineFunction *MF = MBB.getParent();
+ const MachineFrameInfo &MFI = MF->getFrameInfo();
+ const RISCVRegisterInfo *RI = STI.getRegisterInfo();
+ const TargetInstrInfo &TII = *STI.getInstrInfo();
+ DebugLoc DL = MBB.findDebugLoc(MI);
+
+ const auto &RVVCSI = getRVVCalleeSavedInfo(*MF, MFI.getCalleeSavedInfo());
+ if (RVVCSI.empty())
----------------
topperc wrote:
Is this `if` necessary. The loop should see the vector is empty and do nothing.
https://github.com/llvm/llvm-project/pull/110234
More information about the llvm-commits
mailing list