[PATCH] D122148: [SLP] Peak into loads when hitting the RecursionMaxDepth

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 21 08:28:10 PDT 2022


dmgreen created this revision.
dmgreen added reviewers: ABataev, RKSimon, vporpo, dtemirbulatov.
Herald added a subscriber: hiraditya.
Herald added a project: All.
dmgreen requested review of this revision.
Herald added a project: LLVM.

I have an issue where a SLP tree hit the RecursionMaxDepth limit in the SLP vectorizer, and is unable to analyze the whole tree because of it. This patch effectively slightly extends the limit, but only when it hits a load (or zext/sext of a load). This allows it to peak through in the places where it will be the most valuable, without ballooning out the O(..) by any 2^n factors.

The compile time I measured for this (and D122145 <https://reviews.llvm.org/D122145> together, as percentage differences) were small:
ClamAV	0.086
7zip	-0.012
tramp3d-v4	0.098
kimwitu++	0.008
sqlite3	0.046
mafft	0.003
lencod	0.169
SPASS	0.006
consumer-typeset	-0.019
Bullet	0.011


https://reviews.llvm.org/D122148

Files:
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Transforms/SLPVectorizer/AArch64/loadorder.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122148.416955.patch
Type: text/x-patch
Size: 42915 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220321/a10858d4/attachment.bin>


More information about the llvm-commits mailing list