[all-commits] [llvm/llvm-project] bb1586: [MemCpyOpt] Relax libcall checks

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Aug 4 12:18:06 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bb15861e149ac1ce01ed5bd87f760e9469b20a9d
      https://github.com/llvm/llvm-project/commit/bb15861e149ac1ce01ed5bd87f760e9469b20a9d
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-08-04 (Wed, 04 Aug 2021)

  Changed paths:
    M llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
    A llvm/test/Transforms/MemCpyOpt/no-libcalls.ll

  Log Message:
  -----------
  [MemCpyOpt] Relax libcall checks

Rather than blocking the whole MemCpyOpt pass if the libcalls are
not available, only disable creation of new memset/memcpy intrinsics
where only load/stores were used previously. This only affects the
store merging and load-store conversion optimization. Other
optimizations are derived from existing intrinsics, which are
well-defined in the absence of libcalls -- not having the libcalls
just means that call simplification won't convert them to intrinsics.

This is a weaker variation of D104801, which dropped these checks
entirely. Ideally we would not couple emission of intrinsics to
libcall availability at all, but as the intrinsics may be legalized
to libcalls we need to be a bit careful right now.

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




More information about the All-commits mailing list