[PATCH] D62686: [WIP][RISCV] Add support for save/restore of callee-saved registers via libcalls

Lewis Revill via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 31 01:34:30 PDT 2019


lewis-revill planned changes to this revision.
lewis-revill added inline comments.


================
Comment at: lib/Target/RISCV/RISCVMachineFunctionInfo.h:70
+
+  const std::vector<CalleeSavedInfo> &getFixedCSRs() {
+    if (!FixedCSRs)
----------------
lewis-revill wrote:
> I have put these two functions here just to try to deduplicate this common operation of distinguishing between fixed and non-fixed callee saved registers. I'd appreciate advice on a neater approach.
I've realized that this is likely completely unneccessary anyway. I should think that since either all callee-saved registers are listed as having reserved spill slots or none are, then these two vectors are mutually exclusive. I'll test to see whether simply storing a boolean and interpreting the entire CSI vector differently gives the same behaviour.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D62686





More information about the llvm-commits mailing list