[all-commits] [llvm/llvm-project] 6a9cf2: [CUDA, MemCpyOpt] Add a flag to force-enable memcp...

Artem Belevich via All-commits all-commits at lists.llvm.org
Fri Aug 6 11:22:31 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6a9cf21f5a2dcd02f90075d6d3576a87f1abd8a9
      https://github.com/llvm/llvm-project/commit/6a9cf21f5a2dcd02f90075d6d3576a87f1abd8a9
  Author: Artem Belevich <tra at google.com>
  Date:   2021-08-06 (Fri, 06 Aug 2021)

  Changed paths:
    M clang/lib/Driver/ToolChains/Cuda.cpp
    M llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
    M llvm/test/Transforms/MemCpyOpt/no-libcalls.ll

  Log Message:
  -----------
  [CUDA, MemCpyOpt] Add a flag to force-enable memcpyopt and use it for CUDA.

Attempt to enable MemCpyOpt unconditionally in D104801 uncovered the fact that
there are users that do not expect LLVM to materialize `memset` intrinsic.

While other passes can do that, too, MemCpyOpt triggers it more frequently and
breaks sanitizers and some downstream users.

For now introduce a flag to force-enable the flag and opt-in only CUDA
compilation with NVPTX back-end.

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




More information about the All-commits mailing list