[PATCH] D102834: [SLPVectorizer] WIP Implement initial memory versioning (WIP!)

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 11 11:02:33 PDT 2021


fhahn updated this revision to Diff 351502.
fhahn added a comment.

Finished off the main functionality, update includes

- computing & comparing the cost of the versioned block to the original block,
- more tests,
- preserving LI & DT if changes to the CFG are made.

We now also undo the CFG changes, if the versioning is not profitable. Currently for MultiSource, SPEC2000 & SPEC2006 with -O3 on X86/AVX2+AVX512, versioning is tried and deemed beneficial 123 times and deemed unprofitable 224 times. Hopefully we can reduce the failure rate in the future.

Note that the numbers include 2 improvements to SCEV to catch additional cases which I'll share soon. There's also some additional refactoring that needs doing.

I also put up D104126 <https://reviews.llvm.org/D104126> add a first set of micro benchmarks that require SLP versioning. Those are some of my motivating cases and fairly simple, so any additions on that front would also be greatly appreciated.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102834/new/

https://reviews.llvm.org/D102834

Files:
  llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Transforms/SLPVectorizer/AArch64/memory-runtime-checks.ll
  llvm/test/Transforms/SLPVectorizer/X86/memory-runtime-checks.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102834.351502.patch
Type: text/x-patch
Size: 48294 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210611/d94b8e4a/attachment-0001.bin>


More information about the llvm-commits mailing list