[PATCH] D150416: [RISCV] Add a pass to combine `cm.pop` and `ret` insts

Xinlong Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 11 18:59:24 PDT 2023


VincentWu created this revision.
VincentWu added reviewers: jrtc27, kito-cheng, MaskRay, craig.topper, HsiangKai, asb, Jim.
Herald added subscribers: jobnoorman, luke, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, shiva0217, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, arichardson.
Herald added a project: All.
VincentWu requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD.
Herald added a project: LLVM.

`RISCVPushPopOptimizer.cpp` combine `cm.pop` and `ret` to generates `cm.popretz` or `cm.popret` .


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150416

Files:
  llvm/lib/Target/RISCV/CMakeLists.txt
  llvm/lib/Target/RISCV/RISCV.h
  llvm/lib/Target/RISCV/RISCVInstrInfo.cpp
  llvm/lib/Target/RISCV/RISCVInstrInfo.h
  llvm/lib/Target/RISCV/RISCVPushPopOptimizer.cpp
  llvm/lib/Target/RISCV/RISCVTargetMachine.cpp
  llvm/test/CodeGen/RISCV/O0-pipeline.ll
  llvm/test/CodeGen/RISCV/O3-pipeline.ll
  llvm/test/CodeGen/RISCV/callee-saved-gprs.ll
  llvm/test/CodeGen/RISCV/push-pop-popret.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150416.521526.patch
Type: text/x-patch
Size: 17332 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230512/6634f026/attachment.bin>


More information about the llvm-commits mailing list