[all-commits] [llvm/llvm-project] c64770: Remove static registration for dialects, and the "...

Mehdi Amini via All-commits all-commits at lists.llvm.org
Wed Feb 12 01:14:15 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c64770506b89a2376fe13080bc3b72789e6c752d
      https://github.com/llvm/llvm-project/commit/c64770506b89a2376fe13080bc3b72789e6c752d
  Author: Mehdi Amini <joker-eph at gmail.com>
  Date:   2020-02-12 (Wed, 12 Feb 2020)

  Changed paths:
    M mlir/examples/toy/Ch5/CMakeLists.txt
    M mlir/examples/toy/Ch5/toyc.cpp
    M mlir/examples/toy/Ch6/CMakeLists.txt
    M mlir/examples/toy/Ch6/toyc.cpp
    M mlir/examples/toy/Ch7/CMakeLists.txt
    M mlir/examples/toy/Ch7/toyc.cpp
    M mlir/include/mlir/Analysis/Passes.h
    A mlir/include/mlir/InitAllDialects.h
    A mlir/include/mlir/InitAllPasses.h
    M mlir/include/mlir/Quantizer/Transforms/Passes.h
    M mlir/include/mlir/Transforms/Passes.h
    M mlir/lib/Dialect/AffineOps/CMakeLists.txt
    R mlir/lib/Dialect/AffineOps/DialectRegistration.cpp
    M mlir/lib/Dialect/CMakeLists.txt
    M mlir/lib/Dialect/FxpMathOps/CMakeLists.txt
    R mlir/lib/Dialect/FxpMathOps/IR/DialectRegistration.cpp
    M mlir/lib/Dialect/GPU/CMakeLists.txt
    R mlir/lib/Dialect/GPU/IR/DialectRegistration.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
    M mlir/lib/Dialect/LLVMIR/IR/ROCDLDialect.cpp
    M mlir/lib/Dialect/Linalg/IR/CMakeLists.txt
    R mlir/lib/Dialect/Linalg/IR/LinalgRegistration.cpp
    R mlir/lib/Dialect/LoopOps/DialectRegistration.cpp
    M mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
    M mlir/lib/Dialect/QuantOps/CMakeLists.txt
    R mlir/lib/Dialect/QuantOps/IR/DialectRegistration.cpp
    M mlir/lib/Dialect/SDBM/CMakeLists.txt
    R mlir/lib/Dialect/SDBM/SDBMDialect.cpp
    M mlir/lib/Dialect/SPIRV/CMakeLists.txt
    R mlir/lib/Dialect/SPIRV/DialectRegistration.cpp
    R mlir/lib/Dialect/StandardOps/DialectRegistration.cpp
    M mlir/lib/Dialect/VectorOps/CMakeLists.txt
    R mlir/lib/Dialect/VectorOps/DialectRegistration.cpp
    M mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
    M mlir/lib/Support/JitRunner.cpp
    M mlir/lib/Transforms/OpStats.cpp
    M mlir/test/Dialect/SPIRV/TestAvailability.cpp
    M mlir/test/EDSC/builder-api-test.cpp
    M mlir/test/SDBM/sdbm-api-test.cpp
    M mlir/test/lib/IR/TestFunc.cpp
    M mlir/test/lib/IR/TestMatchers.cpp
    M mlir/test/lib/IR/TestSymbolUses.cpp
    M mlir/test/lib/Pass/TestPassManager.cpp
    M mlir/test/lib/TestDialect/TestPatterns.cpp
    M mlir/test/lib/Transforms/TestAllReduceLowering.cpp
    M mlir/test/lib/Transforms/TestCallGraph.cpp
    M mlir/test/lib/Transforms/TestConstantFold.cpp
    M mlir/test/lib/Transforms/TestGpuMemoryPromotion.cpp
    M mlir/test/lib/Transforms/TestInlining.cpp
    M mlir/test/lib/Transforms/TestLinalgTransforms.cpp
    M mlir/test/lib/Transforms/TestLiveness.cpp
    M mlir/test/lib/Transforms/TestLoopFusion.cpp
    M mlir/test/lib/Transforms/TestLoopMapping.cpp
    M mlir/test/lib/Transforms/TestLoopParametricTiling.cpp
    M mlir/test/lib/Transforms/TestMemRefBoundCheck.cpp
    M mlir/test/lib/Transforms/TestMemRefDependenceCheck.cpp
    M mlir/test/lib/Transforms/TestMemRefStrideCalculation.cpp
    M mlir/test/lib/Transforms/TestOpaqueLoc.cpp
    M mlir/test/lib/Transforms/TestParallelismDetection.cpp
    M mlir/test/lib/Transforms/TestVectorToLoopsConversion.cpp
    M mlir/test/lib/Transforms/TestVectorTransforms.cpp
    M mlir/test/lib/Transforms/TestVectorizationUtils.cpp
    M mlir/tools/mlir-cpu-runner/CMakeLists.txt
    M mlir/tools/mlir-opt/CMakeLists.txt
    M mlir/tools/mlir-opt/mlir-opt.cpp
    M mlir/tools/mlir-translate/CMakeLists.txt
    M mlir/tools/mlir-translate/mlir-translate.cpp
    M mlir/unittests/Dialect/QuantOps/QuantizationUtilsTest.cpp
    M mlir/unittests/Dialect/SPIRV/DeserializationTest.cpp
    M mlir/unittests/SDBM/SDBMTest.cpp

  Log Message:
  -----------
  Remove static registration for dialects, and the "alwayslink" hack for passes

In the previous state, we were relying on forcing the linker to include
all libraries in the final binary and the global initializer to self-register
every piece of the system. This change help moving away from this model, and
allow users to compose pieces more freely. The current change is only "fixing"
the dialect registration and avoiding relying on "whole link" for the passes.
The translation is still relying on the global registry, and some refactoring
is needed to make this all more convenient.

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




More information about the All-commits mailing list