[all-commits] [llvm/llvm-project] 2a6c8b: [mlir][PassIncGen] Refactor how pass registration ...

River Riddle via All-commits all-commits at lists.llvm.org
Fri Jul 31 13:26:48 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2a6c8b2e9581ebca4b05d1e64458f2dccf3db61f
      https://github.com/llvm/llvm-project/commit/2a6c8b2e9581ebca4b05d1e64458f2dccf3db61f
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2020-07-31 (Fri, 31 Jul 2020)

  Changed paths:
    M flang/include/flang/Optimizer/CodeGen/CMakeLists.txt
    M flang/include/flang/Optimizer/CodeGen/CodeGen.h
    M flang/include/flang/Optimizer/Transforms/CMakeLists.txt
    M flang/include/flang/Optimizer/Transforms/Passes.h
    M mlir/docs/PassManagement.md
    M mlir/include/mlir/Conversion/AVX512ToLLVM/ConvertAVX512ToLLVM.h
    M mlir/include/mlir/Conversion/AffineToStandard/AffineToStandard.h
    M mlir/include/mlir/Conversion/CMakeLists.txt
    A mlir/include/mlir/Conversion/Passes.h
    M mlir/include/mlir/Dialect/Affine/CMakeLists.txt
    M mlir/include/mlir/Dialect/Affine/Passes.h
    M mlir/include/mlir/Dialect/GPU/CMakeLists.txt
    M mlir/include/mlir/Dialect/GPU/Passes.h
    M mlir/include/mlir/Dialect/LLVMIR/Transforms/CMakeLists.txt
    A mlir/include/mlir/Dialect/LLVMIR/Transforms/Passes.h
    M mlir/include/mlir/Dialect/Linalg/CMakeLists.txt
    M mlir/include/mlir/Dialect/Linalg/Passes.h
    M mlir/include/mlir/Dialect/Quant/CMakeLists.txt
    M mlir/include/mlir/Dialect/Quant/Passes.h
    M mlir/include/mlir/Dialect/SCF/CMakeLists.txt
    M mlir/include/mlir/Dialect/SCF/Passes.h
    M mlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
    M mlir/include/mlir/Dialect/SPIRV/Passes.h
    M mlir/include/mlir/Dialect/Shape/Transforms/CMakeLists.txt
    M mlir/include/mlir/Dialect/Shape/Transforms/Passes.h
    M mlir/include/mlir/Dialect/StandardOps/Transforms/CMakeLists.txt
    M mlir/include/mlir/Dialect/StandardOps/Transforms/Passes.h
    M mlir/include/mlir/InitAllPasses.h
    M mlir/include/mlir/Transforms/CMakeLists.txt
    M mlir/include/mlir/Transforms/Passes.h
    M mlir/tools/mlir-tblgen/PassGen.cpp

  Log Message:
  -----------
  [mlir][PassIncGen] Refactor how pass registration is generated

The current output is a bit clunky and requires including files+macros everywhere, or manually wrapping the file inclusion in a registration function. This revision refactors the pass backend to automatically generate `registerFooPass`/`registerFooPasses` functions that wrap the pass registration. `gen-pass-decls` now takes a `-name` input that specifies a tag name for the group of passes that are being generated. For each pass, the generator now produces a `registerFooPass` where `Foo` is the name of the definition specified in tablegen. It also generates a `registerGroupPasses`, where `Group` is the tag provided via the `-name` input parameter, that registers all of the passes present.

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




More information about the All-commits mailing list