[PATCH] D44885: [RISCV] Expand function call to auipc and jalr

Mandeep Singh Grang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 4 11:40:06 PDT 2018


mgrang added inline comments.


================
Comment at: lib/Target/RISCV/RISCVAsmPrinter.cpp:106
+  TmpInst = MCInstBuilder(RISCV::JALR)
+              .addReg(Ra)
+              .addReg(Ra)
----------------
apazos wrote:
> I think creating the instruction with RISCV::X1 would be clearer than referencing the alternative return address name. 
Although it is cleaner to create the instruction with RISCV::X1 specified explicitly, it prevents PseudoTailCall from re-using this function. PseudoTailCall is still a call but does not use X1.

@shiva0217 Could you please restore the use of "unsigned Ra" to reference the return address name?


Repository:
  rL LLVM

https://reviews.llvm.org/D44885





More information about the llvm-commits mailing list