[llvm] [PATCH] [Xtensa] Implement FrameLowering methods and stack operation lowering. (PR #92960)

Andrei Safronov via llvm-commits llvm-commits at lists.llvm.org
Wed May 29 03:56:38 PDT 2024


================
@@ -33,6 +33,70 @@ bool XtensaFrameLowering::hasFP(const MachineFunction &MF) const {
          MFI.hasVarSizedObjects();
 }
 
+#ifndef NDEBUG
+/* Check whether instruction I stores some callee-saved register from CSI
+ */
+static bool checkStoreInstruction(MachineBasicBlock::iterator I,
+                                  const std::vector<CalleeSavedInfo> &CSI) {
----------------
andreisfr wrote:

Yes, I will implement then isStoreToStackSlot /isLoadFromStackSlot functions. Current PrologueEpilogueInsterter implementation places stores in direct order:
.. for (const CalleeSavedInfo &CS : CSI)..
and uses reverse order for placement loads at the end of basic block. So, we can assume that we always have such order and create redundant version which checks instructions. Is it acceptable?

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


More information about the llvm-commits mailing list