[all-commits] [llvm/llvm-project] 61d795: [SLP][NFC]Cache IsExternallyUsed by Value in cost ...

Alexey Bataev via All-commits all-commits at lists.llvm.org
Tue Apr 28 07:07:22 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 61d795c79733703f7612c22bfc99ceada555576e
      https://github.com/llvm/llvm-project/commit/61d795c79733703f7612c22bfc99ceada555576e
  Author: Alexey Bataev <a.bataev at outlook.com>
  Date:   2026-04-28 (Tue, 28 Apr 2026)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

  Log Message:
  -----------
  [SLP][NFC]Cache IsExternallyUsed by Value in cost computation

Same V is commonly seen in multiple TEs (shared scalars), and the
expensive part of IsExternallyUsed walks V->users() with multiple
match() pattern checks plus per-user getTreeEntries lookups - all
V-only-dependent. Split out the V-dependent body and memoize by
Value pointer, leaving the TE-specific copyable check at the call
site. DeletedNodes is read-only during the cost loop, so caching
is safe.

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/194637



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