[PATCH] D118020: [RISCV] Set CostPerUse for floating point registers

Wang Pengcheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 24 02:00:45 PST 2022


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

Set CostPerUse to 1 for floating point registers when RVC is
enabled so that more compressed instructions will be generated.

Code size and performance have some improvements.

SPEC FP 2006 (On Allwinner's D1 <https://reviews.llvm.org/D1> chip, with XuanTie C906):

                   Code size     Performance
  453.povray        -1.145%        +7.926%
  433.milc             -           +1.399%
  450.soplex        -0.905%        +1.177%
  470.lbm              -           +0.188%
  444.namd          -1.882%        +0.124%
  447.dealII        -0.440%        +0.053%
  482.sphinx3          -           -1.569%

For CSiBE, we reduced 1%-5% code size under `-Oz`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D118020

Files:
  llvm/lib/Target/RISCV/RISCVRegisterInfo.td
  llvm/test/CodeGen/RISCV/rvv/vsetvli-insert-crossbb.ll
  llvm/test/CodeGen/RISCV/rvv/vsetvli-insert.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118020.402435.patch
Type: text/x-patch
Size: 5272 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220124/0f791786/attachment.bin>


More information about the llvm-commits mailing list