[all-commits] [llvm/llvm-project] 71bcea: [SLP] Make reordering aware of external vectorizab...

vporpo via All-commits all-commits at lists.llvm.org
Tue May 10 15:27:49 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 71bcead98b2e655031208e5ad0ce89f8971a6343
      https://github.com/llvm/llvm-project/commit/71bcead98b2e655031208e5ad0ce89f8971a6343
  Author: Vasileios Porpodas <vporpodas at google.com>
  Date:   2022-05-10 (Tue, 10 May 2022)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Transforms/SLPVectorizer/X86/reorder_with_external_users.ll

  Log Message:
  -----------
  [SLP] Make reordering aware of external vectorizable scalar stores.

The current reordering scheme only checks the ordering of in-tree operands.
There are some cases, however, where we need to adjust the ordering based on
the ordering of a future SLP-tree who's instructions are not part of the
current tree, but are external users.

This patch is a simple implementation of this. We keep track of scalar stores
that are users of TreeEntries and if they look profitable to vectorize, then
we keep track of their ordering. During the reordering step we take this new
index order into account. This can remove some shuffles in cases like in the
lit test.

Differential Revision: https://reviews.llvm.org/D125111




More information about the All-commits mailing list