[all-commits] [llvm/llvm-project] 6438ea: [VectorCombine] position pass after SLP in the opt...

RotateRight via All-commits all-commits at lists.llvm.org
Fri May 22 09:23:11 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6438ea45e053378a3c461a879805174eaa864bdb
      https://github.com/llvm/llvm-project/commit/6438ea45e053378a3c461a879805174eaa864bdb
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2020-05-22 (Fri, 22 May 2020)

  Changed paths:
    M llvm/lib/Passes/PassBuilder.cpp
    M llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
    M llvm/test/CodeGen/AMDGPU/opt-pipeline.ll
    M llvm/test/Other/new-pm-defaults.ll
    M llvm/test/Other/new-pm-thinlto-defaults.ll
    M llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
    M llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
    M llvm/test/Other/opt-O2-pipeline.ll
    M llvm/test/Other/opt-O3-pipeline.ll
    M llvm/test/Other/opt-Os-pipeline.ll
    M llvm/test/Other/opt-pipeline-vector-passes.ll
    M llvm/test/Transforms/PhaseOrdering/X86/addsub.ll
    M llvm/test/Transforms/PhaseOrdering/X86/horiz-math.ll
    M llvm/test/Transforms/PhaseOrdering/X86/vector-reductions.ll

  Log Message:
  -----------
  [VectorCombine] position pass after SLP in the optimization pipeline rather than before

There are 2 known problem patterns shown in the test diffs here:
vector horizontal ops (an x86 specialization) and vector reductions.

SLP has greater ability to match and fold those than vector-combine,
so let SLP have first chance at that.

This is a quick fix while we continue to improve vector-combine and
possibly canonicalize to reduction intrinsics.

In the longer term, we should improve matching of these patterns
because if they were created in the "bad" forms shown here, then we
would miss optimizing them.

I'm not sure what is happening with alias analysis on the addsub test.
The old pass manager now shows an extra line for that, and we see an
improvement that comes from SLP vectorizing a store. I don't know
what's missing with the new pass manager to make that happen.
Strangely, I can't reproduce the behavior if I compile from C++ with
clang and invoke the new PM with "-fexperimental-new-pass-manager".

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




More information about the All-commits mailing list