[PATCH] D45395: [RISCV] Implement tail call optimization

Mandeep Singh Grang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 6 18:21:37 PDT 2018


mgrang added inline comments.


================
Comment at: lib/Target/RISCV/RISCVISelLowering.cpp:787
+  // The callee has to preserve all registers the caller needs to preserve.
+  const RISCVRegisterInfo *TRI = Subtarget.getRegisterInfo();
+  const uint32_t *CallerPreserved = TRI->getCallPreservedMask(MF, CallerCC);
----------------
TODO: I couldn't write a test case to simulate this.

@asb What calling convention could result in a difference between caller and callee saved regs?


Repository:
  rL LLVM

https://reviews.llvm.org/D45395





More information about the llvm-commits mailing list