[PATCH] D78298: [LV] Invalidate cost model decisions along with interleave groups.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 07:16:13 PDT 2020


fhahn created this revision.
fhahn added reviewers: gilr, rengolin, Ayal, hsaito.
Herald added subscribers: rogfer01, rkruppe, bollu, hiraditya.
Herald added a project: LLVM.

Cost-modeling decisions are tied to the compute interleave groups
(widening decisions, scalar and uniform values). We invalidating the
interleave groups, those decisions also need to be invalidated.

Otherwise there is a mis-match during VPlan construction where no
VPInterleave recipes are created and VPWidenMemoryRecipes are left
around for instructions marked as interleaved. This happens if
a vectorization factor is chosen for which computeMaxVF already computed
the CM decisions.

Alternatively to forcing a complete recompute later on, we could try
to selectively invalidate the decisions connected to the interleave
groups. But we would likely need to run the uniform/scalar value
detection parts again anyways and the extra complexity is probably not
worth it.

Fixes PR45572.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78298

Files:
  llvm/include/llvm/Analysis/VectorUtils.h
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/Hexagon/invalidate-cm-after-invalidating-interleavegroups.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78298.258047.patch
Type: text/x-patch
Size: 4671 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200416/bb4b2282/attachment.bin>


More information about the llvm-commits mailing list