[PATCH] D57779: [SLP] Add support for throttling.

Dinar Temirbulatov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 6 06:50:28 PDT 2021


dtemirbulatov updated this revision to Diff 343392.
dtemirbulatov added a comment.

1. Fixed issue in getInsertCost(), I incorrectly added gather costs which were not in relation with any proposed to vectorized nodes, I thought of this and used before "ScalarToTreeEntry.count(Op) > 0", but I discovered that I am not updating ScalarToTreeEntry while reducing the tree. 2) Now I am checking with isTreeTinyAndNotFullyVectorizable() before decide to vectorize. 3) I introduced "MinVecNodes" parameter, which sets how many minimal vectorizable nodes we would like to have while throttling, currently it is equal to 2 by default. For example, we have 3 total nodes in the tree and it is satisfied with MinTreeSize and we would like to have at least two nodes to be vectorizable while reducing the tree to have a positive decision.


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

https://reviews.llvm.org/D57779

Files:
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Transforms/SLPVectorizer/AMDGPU/packed-math.ll
  llvm/test/Transforms/SLPVectorizer/X86/PR31847.ll
  llvm/test/Transforms/SLPVectorizer/X86/arith-fix.ll
  llvm/test/Transforms/SLPVectorizer/X86/ctlz.ll
  llvm/test/Transforms/SLPVectorizer/X86/ctpop.ll
  llvm/test/Transforms/SLPVectorizer/X86/cttz.ll
  llvm/test/Transforms/SLPVectorizer/X86/fma.ll
  llvm/test/Transforms/SLPVectorizer/X86/fptosi-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/X86/fptosi.ll
  llvm/test/Transforms/SLPVectorizer/X86/fptoui.ll
  llvm/test/Transforms/SLPVectorizer/X86/fround.ll
  llvm/test/Transforms/SLPVectorizer/X86/powof2div.ll
  llvm/test/Transforms/SLPVectorizer/X86/pr35497.ll
  llvm/test/Transforms/SLPVectorizer/X86/pr46983.ll
  llvm/test/Transforms/SLPVectorizer/X86/pr47629-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/X86/pr47629.ll
  llvm/test/Transforms/SLPVectorizer/X86/shift-ashr.ll
  llvm/test/Transforms/SLPVectorizer/X86/shift-lshr.ll
  llvm/test/Transforms/SLPVectorizer/X86/shift-shl.ll
  llvm/test/Transforms/SLPVectorizer/X86/sitofp-inseltpoison.ll
  llvm/test/Transforms/SLPVectorizer/X86/sitofp.ll
  llvm/test/Transforms/SLPVectorizer/X86/slp-throttle.ll
  llvm/test/Transforms/SLPVectorizer/X86/uitofp.ll



More information about the llvm-commits mailing list