[all-commits] [llvm/llvm-project] 6577ce: [CodeGen] New pass: Replace vector intrinsics with...

Lukas Sommer via All-commits all-commits at lists.llvm.org
Fri Feb 12 09:54:05 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6577cef9b03fb4d151bd997a720ceaf78447f6a2
      https://github.com/llvm/llvm-project/commit/6577cef9b03fb4d151bd997a720ceaf78447f6a2
  Author: Lukas Sommer <sommer at esa.tu-darmstadt.de>
  Date:   2021-02-12 (Fri, 12 Feb 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/CodeGenPassBuilder.h
    M llvm/include/llvm/CodeGen/MachinePassRegistry.def
    M llvm/include/llvm/CodeGen/Passes.h
    A llvm/include/llvm/CodeGen/ReplaceWithVeclib.h
    M llvm/include/llvm/InitializePasses.h
    M llvm/lib/CodeGen/CMakeLists.txt
    A llvm/lib/CodeGen/ReplaceWithVeclib.cpp
    M llvm/lib/CodeGen/TargetPassConfig.cpp
    M llvm/test/CodeGen/AArch64/O3-pipeline.ll
    M llvm/test/CodeGen/ARM/O3-pipeline.ll
    A llvm/test/CodeGen/Generic/replace-intrinsics-with-veclib.ll
    M llvm/test/CodeGen/X86/opt-pipeline.ll
    M llvm/tools/llc/llc.cpp
    M llvm/tools/opt/opt.cpp
    M llvm/utils/gn/secondary/llvm/lib/CodeGen/BUILD.gn

  Log Message:
  -----------
  [CodeGen] New pass: Replace vector intrinsics with call to vector library

This patch adds a pass to replace calls to vector intrinsics (i.e., LLVM
intrinsics operating on vector operands) with calls to a vector library.

Currently, calls to LLVM intrinsics are only replaced with calls to vector
libraries when scalar calls to intrinsics are vectorized by the Loop- or
SLP-Vectorizer.

With this pass, it is now possible to replace calls to LLVM intrinsics
already operating on vector operands, e.g., if such code was generated
by MLIR. For the replacement, information from the TargetLibraryInfo,
e.g., as specified via -vector-library is used.

This is a re-try of the original commit 2303e93e66 that was reverted
due to pass manager problems. Other minor changes have also been made.

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




More information about the All-commits mailing list