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

Vyacheslav Klochkov via All-commits all-commits at lists.llvm.org
Tue Jan 7 17:17:48 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9184c42869b87a59839cafdb8a3679e7ec2faeb1
      https://github.com/llvm/llvm-project/commit/9184c42869b87a59839cafdb8a3679e7ec2faeb1
  Author: Vyacheslav Klochkov <vyacheslav.n.klochkov at intel.com>
  Date:   2025-01-07 (Tue, 07 Jan 2025)

  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 (#121861)

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