[all-commits] [llvm/llvm-project] fd2f8d: [LoadStoreVectorizer] Postprocess and merge equiva...

Vyacheslav Klochkov via All-commits all-commits at lists.llvm.org
Wed Dec 11 19:01:56 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fd2f8d485df7742320317b14d49b9d808f70625c
      https://github.com/llvm/llvm-project/commit/fd2f8d485df7742320317b14d49b9d808f70625c
  Author: Vyacheslav Klochkov <vyacheslav.n.klochkov at intel.com>
  Date:   2024-12-11 (Wed, 11 Dec 2024)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp
    A llvm/test/Transforms/LoadStoreVectorizer/X86/massive_indirection.ll

  Log Message:
  -----------
  [LoadStoreVectorizer] Postprocess and merge equivalence classes (#114501)

This patch introduces a new method:
void Vectorizer::mergeEquivalenceClasses(EquivalenceClassMap &EQClasses)
const

The method is called at the end of
Vectorizer::collectEquivalenceClasses() and is needed to merge
equivalence classes that differ only by their underlying objects (UO1
and UO2), where UO1 is 1-level-indirection underlying base for UO2. This
situation arises due to the limited lookup depth used during the search
of underlying bases with llvm::getUnderlyingObject(ptr).

Using any fixed lookup depth can result into creation of multiple
equivalence classes that only differ by 1-level indirection bases.

The new approach merges equivalence classes if they have adjacent bases
(1-level indirection). If a series of equivalence classes form ladder
formed of 1-step/level indirections, they are all merged into a single
equivalence class. This provides more opportunities for the load-store
vectorizer to generate better vectors.

---------

Signed-off-by: Klochkov, Vyacheslav N <vyacheslav.n.klochkov at intel.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list