[PATCH] D80127: [ARM][MachineOutliner] Add LR RegSave mode.

Yvan Roux via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 9 02:42:58 PDT 2020


yroux added inline comments.


================
Comment at: llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp:5653
+        Reg != ARM::LR &&  // LR is not reserved, but don't use it.
+        Reg != ARM::R12 && // R12 is not guaranteed to be preserved.
+        C.LRU.available(Reg) && C.UsedInSequence.available(Reg))
----------------
samparker wrote:
> Is PC already covered by getReservedRegs or do we need to check here too? Also do you mean tGPR? That seems too restrictive for Thumb2. I think it would be better, easier and safer to just use the rGPR for both.
Yes PC is marked as reserved by getReservedRegs, but you're right rGPR is a much better choice


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80127





More information about the llvm-commits mailing list