[PATCH] D103638: [SLP]Improve vectorization of PHI instructions.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 3 11:18:58 PDT 2021


ABataev created this revision.
ABataev added reviewers: RKSimon, spatel, vdmitrie, dtemirbulatov, anton-afanasyev.
Herald added a subscriber: hiraditya.
ABataev requested review of this revision.
Herald added a project: LLVM.

Perform better analysis when trying to vectorize PHIs.

1. Do not try to vectorize vector PHIs.
2. Do deeper analysis for more profitable nodes for the vectorization.

Before we just tried to vectorize the PHIs of the same type. Patch
improves this and tries to vectorize PHIs with incoming values which
come from the same basic block, have the same and/or alternative
opcodes.

It allows to save the compile time and provides better vectorization
results in general.

Part of D57059 <https://reviews.llvm.org/D57059>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D103638

Files:
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Transforms/SLPVectorizer/slp-max-phi-size.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103638.349616.patch
Type: text/x-patch
Size: 49117 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210603/e718f200/attachment.bin>


More information about the llvm-commits mailing list