[PATCH] D51474: Consider CSRs in computeRegisterLiveness

Francis Visoiu Mistrih via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 3 07:05:47 PDT 2018


thegameg added inline comments.


================
Comment at: lib/CodeGen/MachineBasicBlock.cpp:1406
+    const MachineFrameInfo &MFI = MF.getFrameInfo();
+    if (isReturnBlock() && MFI.isCalleeSavedInfoValid()) {
+      const MachineRegisterInfo &MRI = MF.getRegInfo();
----------------
I wonder if this shouldn't be checking `MFI.getRestoreBlock()` instead/along with `isReturnBlock()`. IIUC CSRs are live after the epilogue, so I assume checking for `isReturnBlock()` is always safer.


https://reviews.llvm.org/D51474





More information about the llvm-commits mailing list