[PATCH] D102739: [RISCV] Enable cross basic block aware vsetvli insertion

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 18 17:02:17 PDT 2021


craig.topper created this revision.
craig.topper added reviewers: frasercrmck, evandro, HsiangKai, arcbbb, khchen, rogfer01.
Herald added subscribers: StephenFan, vkmr, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya.
craig.topper requested review of this revision.
Herald added a subscriber: MaskRay.
Herald added a project: LLVM.

This patch extends D102737 <https://reviews.llvm.org/D102737> to allow VL/VTYPE changes to be taken
into account before adding an explicit vsetvli.

We do this by using a data flow analysis to propagate VL/VTYPE
information from predecessors until we've determined a value for
every value in the function.

We use this information combined with the requirements with each
block to determine if a vsetvli needs to be inserted before the
first vector instruction in the block.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D102739

Files:
  llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-ctlz.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-cttz.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int.ll
  llvm/test/CodeGen/RISCV/rvv/fixed-vectors-select-fp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102739.346307.patch
Type: text/x-patch
Size: 120734 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210519/a62b64d8/attachment-0001.bin>


More information about the llvm-commits mailing list