[all-commits] [llvm/llvm-project] 2e080e: [SVE] Add support for scalable vectorization of lo...

Jay Foad via All-commits all-commits at lists.llvm.org
Fri Jan 22 01:53:13 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e080eb00ad76654313e0e119bb7fa0ffe2f9866
      https://github.com/llvm/llvm-project/commit/2e080eb00ad76654313e0e119bb7fa0ffe2f9866
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2021-01-22 (Fri, 22 Jan 2021)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    A llvm/test/Analysis/CostModel/sve-cmpsel.ll
    A llvm/test/Transforms/LoopVectorize/AArch64/sve-basic-vec.ll

  Log Message:
  -----------
  [SVE] Add support for scalable vectorization of loops with selects and cmps

I have removed an unnecessary assert in LoopVectorizationCostModel::getInstructionCost
that prevented a cost being calculated for select instructions when using
scalable vectors. In addition, I have changed AArch64TTIImpl::getCmpSelInstrCost
to only do special cost calculations for fixed width vectors and fall
back to the base version for scalable vectors.

I have added a simple cost model test for cmps and selects:

  test/Analysis/CostModel/sve-cmpsel.ll

and some simple tests that show we vectorize loops with cmp and select:

  test/Transforms/LoopVectorize/AArch64/sve-basic-vec.ll

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


  Commit: 14eea6b0ecddfe7d1c68754a8bfb7c21cde82df8
      https://github.com/llvm/llvm-project/commit/14eea6b0ecddfe7d1c68754a8bfb7c21cde82df8
  Author: Jay Foad <jay.foad at amd.com>
  Date:   2021-01-22 (Fri, 22 Jan 2021)

  Changed paths:
    M llvm/include/llvm/IR/LegacyPassManagers.h
    M llvm/lib/IR/LegacyPassManager.cpp

  Log Message:
  -----------
  [LegacyPM] Update InversedLastUser on the fly. NFC.

This speeds up setLastUser enough to give a 5% to 10% speed up on
trivial invocations of opt and llc, as measured by:

perf stat -r 100 opt -S -o /dev/null -O3 /dev/null
perf stat -r 100 llc -march=amdgcn /dev/null -filetype null

Don't dump last use information unless -debug-pass=Details to avoid
printing lots of spam that will break some existing lit tests. Before
this patch, dumping last use information was broken anyway, because it
used InversedLastUser before it had been populated.

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


Compare: https://github.com/llvm/llvm-project/compare/3e8d1e8b12ba...14eea6b0ecdd


More information about the All-commits mailing list