[all-commits] [llvm/llvm-project] 7c5166: [memcpyopt] Restructure store(load src, dest) form...

Philip Reames via All-commits all-commits at lists.llvm.org
Sun Apr 3 20:16:59 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7c51669c21f1b28ad865fb8b9556144d544dce1b
      https://github.com/llvm/llvm-project/commit/7c51669c21f1b28ad865fb8b9556144d544dce1b
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2022-04-03 (Sun, 03 Apr 2022)

  Changed paths:
    M llvm/include/llvm/Transforms/Scalar/MemCpyOptimizer.h
    M llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp

  Log Message:
  -----------
  [memcpyopt] Restructure store(load src, dest) form of callslotopt for compile time

The search for the clobbering call is fairly expensive if uses are not optimized at construction.  Defer the clobber walk to the point in the implementation we need it; there are a bunch of bailouts before that point.  (e.g. If the source pointer is not an alloca, we can't do callslotopt.)

On a test case which involves a bunch of copies from argument pointers, this switches memcpyopt from > 1/2 second to < 10ms.


  Commit: 88de27e3fd9fccec9abd1d224282a6374931fb64
      https://github.com/llvm/llvm-project/commit/88de27e3fd9fccec9abd1d224282a6374931fb64
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2022-04-03 (Sun, 03 Apr 2022)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    A llvm/test/Transforms/LoopVectorize/X86/pr54634.ll

  Log Message:
  -----------
  [LV] Handle non-integral types when considering interleave widening legality

In general, anywhere we might need to insert a blind bitcast, we need to make sure the types are losslessly convertible.

This fixes pr54634.


Compare: https://github.com/llvm/llvm-project/compare/c0f90c84b1a8...88de27e3fd9f


More information about the All-commits mailing list