[PATCH] D125021: [RISCV] Fix VSETVLI insertion by syncing phases 2 and 3
Fraser Cormack via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 5 09:52:33 PDT 2022
frasercrmck created this revision.
frasercrmck added reviewers: craig.topper, rogfer01, reames, khchen, fakepaper56, jacquesguan.
Herald added subscribers: sunshaoce, VincentWu, luke957, StephenFan, vkmr, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, arichardson.
Herald added a project: All.
frasercrmck requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.
This patch attempts to make the VSETVLI insertion pass more stable. A
lot of bugs are ultimately introduced due to phases being out of sync.
This is most notable when we skip VSETVLI insertion in phase 3 by re-using a
previous config, but still rely on phase 2 information which was
calculated without full knowledge of what we're going to skip.
The idea used in this patch is something @rogfer01 suggested in D124089 <https://reviews.llvm.org/D124089>.
By ensuring that VSETVLI "skips" are calculated in one re-usable place
(a new overload of needVSETVLI) we can use it during phases 1 and 2 to
produce more accurate information. In addition, during phase 2, we now
re-compute block-local VTYPE changes once predecessors have been
computed.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D125021
Files:
llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
llvm/test/CodeGen/RISCV/rvv/vsetvli-insert-crossbb.mir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125021.427366.patch
Type: text/x-patch
Size: 9097 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220505/ebba8910/attachment.bin>
More information about the llvm-commits
mailing list