[PATCH] D115244: [LICM] Promote conditional, loop-invariant memory accesses to scalars
Dimitrije Milošević via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 9 02:36:29 PDT 2022
dmilosevic141 updated this revision to Diff 428010.
dmilosevic141 edited the summary of this revision.
dmilosevic141 set the repository for this revision to rG LLVM Github Monorepo.
dmilosevic141 added a comment.
Thanks @reames!
I took some time to dive deeper into the predicated instructions. So far, two things stand out to me:
- The //ScalarizeMaskedMemIntrin// pass, which is a standard part of the //CodeGen// pipeline. This pass translates the masked memory intrinsics into chains of basic blocks, by loading/storing elements one-by-one. For single-value vectors, handling looks pretty much identical to the initial version of the patch. Scalarization of the masked memory intrinsics is, however, target-dependent (e.g. for //x86//, the scalarization of calls with single-value vectors passed in as arguments does occur; for //RISC-V//, it does not).
- The Vector Predication Roadmap (Vector Predication Roadmap <https://llvm.org/docs/Proposals/VectorPredication.html>).
Having said that, I'm a little bit stuck in regards to the next steps towards better handling of single-value vectors, as I'm not sure that the //ScalarieMaskedMemIntrin// pass is //*the*// place for that. The Vector Predication Roadmap is a little bit overwhelming - i.e. I'm not sure which part of it is related to the better handling of single-value vectors. If you (or anyone else) have something concrete to point me to, I'd be really thankful. :)
I've updated the patch to use the //llvm.masked.store// intrinsic, instead of the complicated //CFG// manipulation.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115244/new/
https://reviews.llvm.org/D115244
Files:
llvm/lib/Transforms/Scalar/LICM.cpp
llvm/test/Transforms/LICM/conditional-access-promotion.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115244.428010.patch
Type: text/x-patch
Size: 12446 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220509/1cff46f6/attachment.bin>
More information about the llvm-commits
mailing list