[PATCH] D102342: [SPARC] Fix register reuse in leaf function remapping step

Daniel Cederman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 13 04:01:52 PDT 2021


dcederman added a comment.

Hello!

It seems that this patch contains a rewrite of the remapRegsForLeafProc() function in addition to the new check described in the summary. Could you split it up into two patches, one with the rewrite and one with the added check?

Is the problem that the isLeafProc() does not detect the case when inline assembly clobbers one of the output registers or have you been able to trigger it in some other way? Does it make sense to put the extra check in isLeafProc() instead?



================
Comment at: llvm/lib/Target/Sparc/SparcFrameLowering.cpp:394-396
+      SparcMachineFunctionInfo *MFI = MF.getInfo<SparcMachineFunctionInfo>();
+      MFI->setLeafProc(true);
+    }
----------------
Remove these tab characters.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102342/new/

https://reviews.llvm.org/D102342



More information about the llvm-commits mailing list