[PATCH] D68011: [RISCV] Split SP adjustment to reduce the offset of callee saved register spill and restore

Shiva Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 02:27:50 PDT 2019


shiva0217 created this revision.
shiva0217 added reviewers: asb, lenary, luismarques.
Herald added subscribers: pzheng, s.egerton, Jim, benna, psnobl, jocewei, PkmX, rkruppe, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, MaskRay, jrtc27, kito-cheng, niosHD, sabuasal, apazos, simoncook, johnrusso, rbar.
Herald added a project: LLVM.

We would like to split the SP adjustment to reduce the instructions in prologue and epilogue as the following case. In this way, the offset of the callee saved register could fit in a single store.

  add     sp,sp,-2032
  sw      ra,2028(sp)
  sw      s0,2024(sp)
  sw      s1,2020(sp)
  sw      s3,2012(sp)
  sw      s4,2008(sp)
  add     sp,sp,-64


Repository:
  rL LLVM

https://reviews.llvm.org/D68011

Files:
  lib/Target/RISCV/RISCVFrameLowering.cpp
  lib/Target/RISCV/RISCVFrameLowering.h
  test/CodeGen/RISCV/large-stack.ll
  test/CodeGen/RISCV/rv64-large-stack.ll
  test/CodeGen/RISCV/stack-realignment.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68011.221692.patch
Type: text/x-patch
Size: 21397 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190925/189ee2bc/attachment-0001.bin>


More information about the llvm-commits mailing list