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

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed May 29 03:42:35 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) {
----------------
arsenm wrote:

Name is too general. Also, this is way more code than I expected for this assert. Don't you expect these instructions to appear in order? 

Can you use TII->isStoreToStackSlot and isCopyInstr to avoid special casing these specific opcodes? 

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


More information about the llvm-commits mailing list