[all-commits] [llvm/llvm-project] 1b7089: [SLP] Add ScalarizationOverheadBuilder helper to t...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Tue Sep 27 06:52:15 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1b7089fe67b924bdd5ecef786a34bdba7a88778f
      https://github.com/llvm/llvm-project/commit/1b7089fe67b924bdd5ecef786a34bdba7a88778f
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-09-27 (Tue, 27 Sep 2022)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Transforms/Coroutines/coro-retcon-resume-values.ll
    M llvm/test/Transforms/PhaseOrdering/X86/vector-reductions.ll
    M llvm/test/Transforms/SLPVectorizer/X86/bool-mask.ll
    M llvm/test/Transforms/SLPVectorizer/X86/c-ray.ll
    M llvm/test/Transforms/SLPVectorizer/X86/crash_reordering_undefs.ll
    M llvm/test/Transforms/SLPVectorizer/X86/geps-non-pow-2.ll
    M llvm/test/Transforms/SLPVectorizer/X86/reduction2.ll

  Log Message:
  -----------
  [SLP] Add ScalarizationOverheadBuilder helper to track vector extractions

Instead of accumulating all extraction costs separately and then adjusting for repeated subvector extractions, this patch collects all the extractions and then converts to calls to getScalarizationOverhead to improve the accuracy of the costs.

I'm not entirely satisfied with the getExtractWithExtendCost handling yet - this still just adds all the getExtractWithExtendCost costs together - it really needs to be replaced with a "getScalarizationOverheadWithExtend", but that will require further refactoring first.

This replaces my initial attempt in D124769.

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




More information about the All-commits mailing list