[all-commits] [llvm/llvm-project] 2f265e: [MLIR] Move from using target_link_libraries to LI...

stephenneuendorffer via All-commits all-commits at lists.llvm.org
Fri Feb 28 11:48:28 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2f265e35285127de376afc2243e3b5d0c5842cc2
      https://github.com/llvm/llvm-project/commit/2f265e35285127de376afc2243e3b5d0c5842cc2
  Author: Stephen Neuendorffer <stephen.neuendorffer at xilinx.com>
  Date:   2020-02-28 (Fri, 28 Feb 2020)

  Changed paths:
    M mlir/examples/toy/Ch6/CMakeLists.txt
    M mlir/examples/toy/Ch7/CMakeLists.txt
    M mlir/lib/Analysis/CMakeLists.txt
    M mlir/lib/Conversion/AffineToStandard/CMakeLists.txt
    M mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
    M mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt
    M mlir/lib/Conversion/GPUToROCDL/CMakeLists.txt
    M mlir/lib/Conversion/GPUToSPIRV/CMakeLists.txt
    M mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt
    M mlir/lib/Conversion/LinalgToSPIRV/CMakeLists.txt
    M mlir/lib/Conversion/LoopToStandard/CMakeLists.txt
    M mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt
    M mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt
    M mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt
    M mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt
    M mlir/lib/Conversion/VectorToLoops/CMakeLists.txt
    M mlir/lib/Dialect/AffineOps/CMakeLists.txt
    M mlir/lib/Dialect/CMakeLists.txt
    M mlir/lib/Dialect/FxpMathOps/CMakeLists.txt
    M mlir/lib/Dialect/GPU/CMakeLists.txt
    M mlir/lib/Dialect/LLVMIR/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/Analysis/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/EDSC/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/IR/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt
    M mlir/lib/Dialect/LoopOps/CMakeLists.txt
    M mlir/lib/Dialect/OpenMP/CMakeLists.txt
    M mlir/lib/Dialect/QuantOps/CMakeLists.txt
    M mlir/lib/Dialect/SDBM/CMakeLists.txt
    M mlir/lib/Dialect/SPIRV/CMakeLists.txt
    M mlir/lib/Dialect/SPIRV/Serialization/CMakeLists.txt
    M mlir/lib/Dialect/SPIRV/Transforms/CMakeLists.txt
    M mlir/lib/Dialect/StandardOps/CMakeLists.txt
    M mlir/lib/Dialect/VectorOps/CMakeLists.txt
    M mlir/lib/EDSC/CMakeLists.txt
    M mlir/lib/ExecutionEngine/CMakeLists.txt
    M mlir/lib/IR/CMakeLists.txt
    M mlir/lib/Parser/CMakeLists.txt
    M mlir/lib/Pass/CMakeLists.txt
    M mlir/lib/Quantizer/CMakeLists.txt
    M mlir/lib/Support/CMakeLists.txt
    M mlir/lib/TableGen/CMakeLists.txt
    M mlir/lib/Target/CMakeLists.txt
    M mlir/lib/Transforms/CMakeLists.txt
    M mlir/lib/Transforms/Utils/CMakeLists.txt
    M mlir/lib/Translation/CMakeLists.txt
    M mlir/test/EDSC/CMakeLists.txt
    M mlir/test/lib/Dialect/SPIRV/CMakeLists.txt
    M mlir/test/lib/IR/CMakeLists.txt
    M mlir/test/lib/Pass/CMakeLists.txt
    M mlir/test/lib/TestDialect/CMakeLists.txt
    M mlir/test/lib/Transforms/CMakeLists.txt
    M mlir/test/mlir-cpu-runner/CMakeLists.txt
    M mlir/tools/mlir-cuda-runner/CMakeLists.txt
    M mlir/tools/mlir-opt/CMakeLists.txt
    M mlir/unittests/Dialect/SPIRV/CMakeLists.txt
    M mlir/unittests/Pass/CMakeLists.txt
    M mlir/unittests/SDBM/CMakeLists.txt

  Log Message:
  -----------
  [MLIR] Move from using target_link_libraries to LINK_LIBS for llvm libraries.

When compiling libLLVM.so, add_llvm_library() manipulates the link libraries
being used.  This means that when using add_llvm_library(), we need to pass
the list of libraries to be linked (using the LINK_LIBS keyword) instead of
using the standard target_link_libraries call.  This is preparation for
properly dealing with creating libMLIR.so as well.

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


  Commit: e1cb15c8f92215585105fc00d6eab80860dbc68d
      https://github.com/llvm/llvm-project/commit/e1cb15c8f92215585105fc00d6eab80860dbc68d
  Author: Stephen Neuendorffer <stephen.neuendorffer at xilinx.com>
  Date:   2020-02-28 (Fri, 28 Feb 2020)

  Changed paths:
    M mlir/lib/Analysis/CMakeLists.txt
    M mlir/lib/Conversion/AffineToStandard/CMakeLists.txt
    M mlir/lib/Conversion/LoopToStandard/CMakeLists.txt
    M mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt
    M mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt
    M mlir/lib/Dialect/AffineOps/CMakeLists.txt
    M mlir/lib/Dialect/FxpMathOps/CMakeLists.txt
    M mlir/lib/Dialect/GPU/CMakeLists.txt
    M mlir/lib/Dialect/LLVMIR/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/Analysis/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/EDSC/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/IR/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt
    M mlir/lib/Dialect/LoopOps/CMakeLists.txt
    M mlir/lib/Dialect/QuantOps/CMakeLists.txt
    M mlir/lib/Dialect/SDBM/CMakeLists.txt
    M mlir/lib/Dialect/StandardOps/CMakeLists.txt
    M mlir/lib/EDSC/CMakeLists.txt
    M mlir/lib/IR/CMakeLists.txt
    M mlir/lib/Parser/CMakeLists.txt
    M mlir/lib/Pass/CMakeLists.txt
    M mlir/lib/Quantizer/CMakeLists.txt
    M mlir/test/lib/IR/CMakeLists.txt

  Log Message:
  -----------
  [MLIR] Remove redundant library dependencies

In cmake, it is redundant to have a target list under target_link_libraries()
and add_dependency().  This patch removes the redundant dependency from
add_dependency().

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


  Commit: 8a2b86b2c20a50f4a32931ae311b8e2457e591eb
      https://github.com/llvm/llvm-project/commit/8a2b86b2c20a50f4a32931ae311b8e2457e591eb
  Author: Stephen Neuendorffer <stephen.neuendorffer at xilinx.com>
  Date:   2020-02-28 (Fri, 28 Feb 2020)

  Changed paths:
    M mlir/examples/toy/Ch2/CMakeLists.txt
    M mlir/examples/toy/Ch3/CMakeLists.txt
    M mlir/examples/toy/Ch4/CMakeLists.txt
    M mlir/examples/toy/Ch5/CMakeLists.txt
    M mlir/examples/toy/Ch6/CMakeLists.txt
    M mlir/examples/toy/Ch7/CMakeLists.txt
    M mlir/lib/Analysis/CMakeLists.txt
    M mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt
    M mlir/lib/Conversion/GPUToSPIRV/CMakeLists.txt
    M mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt
    M mlir/lib/Dialect/AffineOps/CMakeLists.txt
    M mlir/lib/Dialect/FxpMathOps/CMakeLists.txt
    M mlir/lib/Dialect/GPU/CMakeLists.txt
    M mlir/lib/Dialect/LLVMIR/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
    M mlir/lib/Dialect/LoopOps/CMakeLists.txt
    M mlir/lib/Dialect/OpenMP/CMakeLists.txt
    M mlir/lib/Dialect/QuantOps/CMakeLists.txt
    M mlir/lib/Dialect/SPIRV/CMakeLists.txt
    M mlir/lib/Dialect/SPIRV/Serialization/CMakeLists.txt
    M mlir/lib/Dialect/StandardOps/CMakeLists.txt
    M mlir/lib/Dialect/VectorOps/CMakeLists.txt
    M mlir/lib/IR/CMakeLists.txt
    M mlir/lib/Quantizer/CMakeLists.txt
    M mlir/lib/Transforms/CMakeLists.txt
    M mlir/lib/Transforms/Utils/CMakeLists.txt
    M mlir/test/lib/TestDialect/CMakeLists.txt
    M mlir/test/lib/Transforms/CMakeLists.txt
    M mlir/tools/mlir-cuda-runner/CMakeLists.txt

  Log Message:
  -----------
  [MLIR] Move from add_dependencies() to DEPENDS

add_llvm_library and add_llvm_executable may need to create new targets with
appropriate dependencies.  As a result, it is not sufficient in some
configurations (namely LLVM_BUILD_LLVM_DYLIB=on) to only call
add_dependencies().  Instead, the explicit TableGen dependencies must
be passed to add_llvm_library() or add_llvm_executable() using the DEPENDS
keyword.

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


  Commit: 1246e867164b06fc3f0de6bfaaa0922d99cb5ce9
      https://github.com/llvm/llvm-project/commit/1246e867164b06fc3f0de6bfaaa0922d99cb5ce9
  Author: Valentin Churavy <v.churavy at gmail.com>
  Date:   2020-02-28 (Fri, 28 Feb 2020)

  Changed paths:
    M mlir/CMakeLists.txt
    M mlir/cmake/modules/AddMLIR.cmake
    M mlir/lib/Analysis/CMakeLists.txt
    M mlir/lib/Dialect/CMakeLists.txt
    M mlir/lib/EDSC/CMakeLists.txt
    M mlir/lib/ExecutionEngine/CMakeLists.txt
    M mlir/lib/IR/CMakeLists.txt
    M mlir/lib/Parser/CMakeLists.txt
    M mlir/lib/Pass/CMakeLists.txt
    M mlir/lib/Quantizer/CMakeLists.txt
    M mlir/lib/Support/CMakeLists.txt
    M mlir/lib/Target/CMakeLists.txt
    M mlir/lib/Transforms/CMakeLists.txt
    M mlir/lib/Transforms/Utils/CMakeLists.txt
    M mlir/lib/Translation/CMakeLists.txt
    M mlir/tools/CMakeLists.txt
    M mlir/tools/mlir-opt/CMakeLists.txt
    A mlir/tools/mlir-shlib/CMakeLists.txt
    A mlir/tools/mlir-shlib/mlir-shlib.cpp

  Log Message:
  -----------
  [MLIR] Add support for libMLIR.so

Putting this up mainly for discussion on
how this should be done. I am interested in MLIR from
the Julia side and we currently have a strong preference
to dynamically linking against the LLVM shared library,
and would like to have a MLIR shared library.

This patch adds a new cmake function add_mlir_library()
which accumulates a list of targets to be compiled into
libMLIR.so.  Note that not all libraries make sense to
be compiled into libMLIR.so.  In particular, we want
to avoid libraries which primarily exist to support
certain tools (such as mlir-opt and mlir-cpu-runner).

Note that the resulting libMLIR.so depends on LLVM, but
does not contain any LLVM components.  As a result, it
is necessary to link with libLLVM.so to avoid linkage
errors. So, libMLIR.so requires LLVM_BUILD_LLVM_DYLIB=on

FYI, Currently it appears that LLVM_LINK_LLVM_DYLIB is broken
because mlir-tblgen is linked against libLLVM.so and
and independent LLVM components

(updated by Stephen Neuendorffer)

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


  Commit: c767dc9394b4cca26c3eb40f1270092594e539c2
      https://github.com/llvm/llvm-project/commit/c767dc9394b4cca26c3eb40f1270092594e539c2
  Author: Stephen Neuendorffer <stephen.neuendorffer at xilinx.com>
  Date:   2020-02-28 (Fri, 28 Feb 2020)

  Changed paths:
    M mlir/examples/toy/Ch5/CMakeLists.txt
    M mlir/examples/toy/Ch6/CMakeLists.txt
    M mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
    M mlir/lib/Conversion/GPUToVulkan/CMakeLists.txt
    M mlir/lib/Dialect/LoopOps/Transforms/CMakeLists.txt
    M mlir/lib/Dialect/VectorOps/CMakeLists.txt
    M mlir/test/SDBM/CMakeLists.txt
    M mlir/tools/mlir-cpu-runner/CMakeLists.txt

  Log Message:
  -----------
  [MLIR] Fixes for BUILD_SHARED_LIBS=on

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


Compare: https://github.com/llvm/llvm-project/compare/b7d50ba1ee39...c767dc9394b4


More information about the All-commits mailing list