[all-commits] [llvm/llvm-project] 8155e4: [mlir][Pass] Add a tablegen backend for defining P...

River Riddle via All-commits all-commits at lists.llvm.org
Wed Apr 1 02:12:08 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8155e41ac6196f035875229ee4fc5f2e3bfb4855
      https://github.com/llvm/llvm-project/commit/8155e41ac6196f035875229ee4fc5f2e3bfb4855
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2020-04-01 (Wed, 01 Apr 2020)

  Changed paths:
    M mlir/include/mlir/CMakeLists.txt
    M mlir/include/mlir/InitAllPasses.h
    A mlir/include/mlir/Pass/PassBase.td
    M mlir/include/mlir/Pass/PassRegistry.h
    A mlir/include/mlir/TableGen/Pass.h
    A mlir/include/mlir/Transforms/CMakeLists.txt
    M mlir/include/mlir/Transforms/LocationSnapshot.h
    A mlir/include/mlir/Transforms/Passes.td
    M mlir/lib/Pass/PassRegistry.cpp
    M mlir/lib/TableGen/CMakeLists.txt
    A mlir/lib/TableGen/Pass.cpp
    M mlir/lib/Transforms/CMakeLists.txt
    M mlir/lib/Transforms/CSE.cpp
    M mlir/lib/Transforms/Canonicalizer.cpp
    M mlir/lib/Transforms/Inliner.cpp
    M mlir/lib/Transforms/LocationSnapshot.cpp
    M mlir/lib/Transforms/LoopCoalescing.cpp
    M mlir/lib/Transforms/LoopFusion.cpp
    M mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
    M mlir/lib/Transforms/MemRefDataFlowOpt.cpp
    M mlir/lib/Transforms/OpStats.cpp
    M mlir/lib/Transforms/ParallelLoopCollapsing.cpp
    M mlir/lib/Transforms/PipelineDataTransfer.cpp
    M mlir/lib/Transforms/StripDebugInfo.cpp
    M mlir/lib/Transforms/SymbolDCE.cpp
    M mlir/lib/Transforms/ViewOpGraph.cpp
    M mlir/lib/Transforms/ViewRegionGraph.cpp
    M mlir/tools/mlir-tblgen/CMakeLists.txt
    A mlir/tools/mlir-tblgen/PassGen.cpp

  Log Message:
  -----------
  [mlir][Pass] Add a tablegen backend for defining Pass information

This will greatly simplify a number of things related to passes:
* Enables generation of pass registration
* Enables generation of boiler plate pass utilities
* Enables generation of pass documentation

This revision focuses on adding the basic structure and adds support for generating the registration for passes in the Transforms/ directory. Future revisions will add more support and move more passes over.

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


  Commit: e3d834a54afa65c615b8eb839f4fe5dbaf53e3e8
      https://github.com/llvm/llvm-project/commit/e3d834a54afa65c615b8eb839f4fe5dbaf53e3e8
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2020-04-01 (Wed, 01 Apr 2020)

  Changed paths:
    M mlir/include/mlir/CMakeLists.txt
    M mlir/include/mlir/Dialect/Affine/CMakeLists.txt
    M mlir/include/mlir/Dialect/Affine/Passes.h
    A mlir/include/mlir/Dialect/Affine/Passes.td
    M mlir/include/mlir/Dialect/FxpMathOps/CMakeLists.txt
    M mlir/include/mlir/Dialect/FxpMathOps/Passes.h
    A mlir/include/mlir/Dialect/FxpMathOps/Passes.td
    M mlir/include/mlir/Dialect/GPU/CMakeLists.txt
    A mlir/include/mlir/Dialect/GPU/Passes.td
    M mlir/include/mlir/Dialect/LLVMIR/CMakeLists.txt
    A mlir/include/mlir/Dialect/LLVMIR/Transforms/Passes.td
    M mlir/include/mlir/Dialect/Linalg/CMakeLists.txt
    M mlir/include/mlir/Dialect/Linalg/Passes.h
    A mlir/include/mlir/Dialect/Linalg/Passes.td
    M mlir/include/mlir/Dialect/LoopOps/CMakeLists.txt
    A mlir/include/mlir/Dialect/LoopOps/Passes.td
    M mlir/include/mlir/Dialect/Quant/CMakeLists.txt
    A mlir/include/mlir/Dialect/Quant/Passes.td
    M mlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
    A mlir/include/mlir/Dialect/SPIRV/Passes.td
    M mlir/include/mlir/InitAllPasses.h
    A mlir/include/mlir/Quantizer/CMakeLists.txt
    A mlir/include/mlir/Quantizer/Transforms/CMakeLists.txt
    M mlir/include/mlir/Quantizer/Transforms/Passes.h
    A mlir/include/mlir/Quantizer/Transforms/Passes.td
    M mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp
    M mlir/lib/Dialect/Affine/Transforms/AffineLoopInvariantCodeMotion.cpp
    M mlir/lib/Dialect/Affine/Transforms/CMakeLists.txt
    M mlir/lib/Dialect/Affine/Transforms/LoopTiling.cpp
    M mlir/lib/Dialect/Affine/Transforms/LoopUnroll.cpp
    M mlir/lib/Dialect/Affine/Transforms/LoopUnrollAndJam.cpp
    M mlir/lib/Dialect/Affine/Transforms/SimplifyAffineStructures.cpp
    M mlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp
    M mlir/lib/Dialect/FxpMathOps/CMakeLists.txt
    M mlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp
    M mlir/lib/Dialect/GPU/CMakeLists.txt
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/lib/Dialect/LLVMIR/Transforms/CMakeLists.txt
    M mlir/lib/Dialect/LLVMIR/Transforms/LegalizeForExport.cpp
    M mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/Dialect/LoopOps/Transforms/CMakeLists.txt
    M mlir/lib/Dialect/LoopOps/Transforms/ParallelLoopFusion.cpp
    M mlir/lib/Dialect/LoopOps/Transforms/ParallelLoopSpecialization.cpp
    M mlir/lib/Dialect/LoopOps/Transforms/ParallelLoopTiling.cpp
    M mlir/lib/Dialect/Quant/CMakeLists.txt
    M mlir/lib/Dialect/Quant/Transforms/ConvertConst.cpp
    M mlir/lib/Dialect/Quant/Transforms/ConvertSimQuant.cpp
    M mlir/lib/Dialect/SPIRV/Transforms/CMakeLists.txt
    M mlir/lib/Dialect/SPIRV/Transforms/DecorateSPIRVCompositeTypeLayoutPass.cpp
    M mlir/lib/Dialect/SPIRV/Transforms/LowerABIAttributesPass.cpp
    M mlir/lib/Dialect/SPIRV/Transforms/UpdateVCEPass.cpp
    M mlir/lib/Quantizer/CMakeLists.txt
    M mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
    M mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
    M mlir/lib/Quantizer/Transforms/RemoveInstrumentationPass.cpp

  Log Message:
  -----------
  [mlir][Pass] Move the registration of dialect passes to tablegen

This generates a Passes.td for all of the dialects that have transformation passes. This removes the need for global registration for all of the dialect passes.

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


  Commit: 3dddd8969f4d5bb05d65c6014934e24795843182
      https://github.com/llvm/llvm-project/commit/3dddd8969f4d5bb05d65c6014934e24795843182
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2020-04-01 (Wed, 01 Apr 2020)

  Changed paths:
    M mlir/include/mlir/CMakeLists.txt
    A mlir/include/mlir/Conversion/CMakeLists.txt
    M mlir/include/mlir/Conversion/LoopsToGPU/LoopsToGPUPass.h
    A mlir/include/mlir/Conversion/Passes.td
    M mlir/include/mlir/Conversion/VectorToLoops/ConvertVectorToLoops.h
    M mlir/include/mlir/InitAllPasses.h
    M mlir/lib/Conversion/AVX512ToLLVM/CMakeLists.txt
    M mlir/lib/Conversion/AVX512ToLLVM/ConvertAVX512ToLLVM.cpp
    M mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
    M mlir/lib/Conversion/AffineToStandard/CMakeLists.txt
    M mlir/lib/Conversion/GPUToCUDA/CMakeLists.txt
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/GPUToROCDL/CMakeLists.txt
    M mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
    M mlir/lib/Conversion/GPUToSPIRV/CMakeLists.txt
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.cpp
    M mlir/lib/Conversion/GPUToVulkan/CMakeLists.txt
    M mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp
    M mlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp
    M mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt
    M mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
    M mlir/lib/Conversion/LinalgToSPIRV/CMakeLists.txt
    M mlir/lib/Conversion/LinalgToSPIRV/LinalgToSPIRVPass.cpp
    M mlir/lib/Conversion/LoopToStandard/CMakeLists.txt
    M mlir/lib/Conversion/LoopToStandard/LoopToStandard.cpp
    M mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp
    M mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt
    M mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
    M mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
    M mlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp
    M mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp

  Log Message:
  -----------
  [mlir][Pass] Move the registration of conversion passes to tablegen

This removes the need to statically register conversion passes, and also puts all of the conversions within one centralized file.

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


  Commit: 9a277af2d429e1d53f65417400583d5ea66d3ed1
      https://github.com/llvm/llvm-project/commit/9a277af2d429e1d53f65417400583d5ea66d3ed1
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2020-04-01 (Wed, 01 Apr 2020)

  Changed paths:
    M mlir/include/mlir/Conversion/Passes.td
    M mlir/include/mlir/Dialect/Affine/Passes.td
    M mlir/include/mlir/Dialect/Linalg/Passes.td
    M mlir/include/mlir/Dialect/LoopOps/Passes.td
    M mlir/include/mlir/Pass/PassBase.td
    M mlir/include/mlir/TableGen/Pass.h
    M mlir/include/mlir/Transforms/Passes.td
    M mlir/lib/Conversion/AVX512ToLLVM/ConvertAVX512ToLLVM.cpp
    M mlir/lib/Conversion/AffineToStandard/AffineToStandard.cpp
    M mlir/lib/Conversion/GPUToCUDA/ConvertLaunchFuncToCudaCalls.cpp
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.cpp
    M mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp
    M mlir/lib/Conversion/GPUToVulkan/ConvertLaunchFuncToVulkanCalls.cpp
    M mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
    M mlir/lib/Conversion/LinalgToSPIRV/LinalgToSPIRVPass.cpp
    M mlir/lib/Conversion/LoopToStandard/LoopToStandard.cpp
    M mlir/lib/Conversion/LoopsToGPU/LoopsToGPUPass.cpp
    M mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
    M mlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp
    M mlir/lib/Dialect/Affine/Transforms/AffineLoopInvariantCodeMotion.cpp
    M mlir/lib/Dialect/Affine/Transforms/LoopTiling.cpp
    M mlir/lib/Dialect/Affine/Transforms/LoopUnroll.cpp
    M mlir/lib/Dialect/Affine/Transforms/LoopUnrollAndJam.cpp
    M mlir/lib/Dialect/Affine/Transforms/SimplifyAffineStructures.cpp
    M mlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp
    M mlir/lib/Dialect/FxpMathOps/Transforms/LowerUniformRealMath.cpp
    M mlir/lib/Dialect/GPU/Transforms/KernelOutlining.cpp
    M mlir/lib/Dialect/LLVMIR/Transforms/LegalizeForExport.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Fusion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/LinalgToLoops.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Promotion.cpp
    M mlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
    M mlir/lib/Dialect/LoopOps/Transforms/ParallelLoopFusion.cpp
    M mlir/lib/Dialect/LoopOps/Transforms/ParallelLoopSpecialization.cpp
    M mlir/lib/Dialect/LoopOps/Transforms/ParallelLoopTiling.cpp
    M mlir/lib/Dialect/Quant/Transforms/ConvertConst.cpp
    M mlir/lib/Dialect/Quant/Transforms/ConvertSimQuant.cpp
    M mlir/lib/Quantizer/Transforms/AddDefaultStatsTestPass.cpp
    M mlir/lib/Quantizer/Transforms/InferQuantizedTypesPass.cpp
    M mlir/lib/Quantizer/Transforms/RemoveInstrumentationPass.cpp
    M mlir/lib/TableGen/Pass.cpp
    M mlir/lib/Transforms/CSE.cpp
    M mlir/lib/Transforms/Canonicalizer.cpp
    M mlir/lib/Transforms/Inliner.cpp
    M mlir/lib/Transforms/LocationSnapshot.cpp
    M mlir/lib/Transforms/LoopCoalescing.cpp
    M mlir/lib/Transforms/LoopFusion.cpp
    M mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
    M mlir/lib/Transforms/MemRefDataFlowOpt.cpp
    M mlir/lib/Transforms/OpStats.cpp
    M mlir/lib/Transforms/ParallelLoopCollapsing.cpp
    M mlir/lib/Transforms/PipelineDataTransfer.cpp
    M mlir/lib/Transforms/StripDebugInfo.cpp
    M mlir/lib/Transforms/SymbolDCE.cpp
    M mlir/lib/Transforms/ViewOpGraph.cpp
    M mlir/lib/Transforms/ViewRegionGraph.cpp
    M mlir/tools/mlir-tblgen/PassGen.cpp

  Log Message:
  -----------
  [mlir][Pass] Add support for generating pass utilities via tablegen

This revision adds support for generating utilities for passes such as options/statistics/etc. that can be inferred from the tablegen definition. This removes additional boilerplate from the pass, and also makes it easier to remove the reliance on the pass registry to provide certain things(e.g. the pass argument).

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


  Commit: 9be4be3e53270fc12b184773203b9aa6eb4ad92b
      https://github.com/llvm/llvm-project/commit/9be4be3e53270fc12b184773203b9aa6eb4ad92b
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2020-04-01 (Wed, 01 Apr 2020)

  Changed paths:
    M mlir/docs/Passes.md
    M mlir/include/mlir/Conversion/CMakeLists.txt
    M mlir/include/mlir/Conversion/Passes.td
    M mlir/include/mlir/Dialect/Affine/CMakeLists.txt
    M mlir/include/mlir/Dialect/FxpMathOps/CMakeLists.txt
    M mlir/include/mlir/Dialect/GPU/CMakeLists.txt
    M mlir/include/mlir/Dialect/LLVMIR/CMakeLists.txt
    M mlir/include/mlir/Dialect/Linalg/CMakeLists.txt
    M mlir/include/mlir/Dialect/LoopOps/CMakeLists.txt
    M mlir/include/mlir/Dialect/Quant/CMakeLists.txt
    M mlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
    M mlir/include/mlir/Quantizer/Transforms/CMakeLists.txt
    M mlir/include/mlir/Transforms/CMakeLists.txt
    M mlir/include/mlir/Transforms/Passes.td
    M mlir/tools/mlir-tblgen/CMakeLists.txt
    A mlir/tools/mlir-tblgen/PassDocGen.cpp

  Log Message:
  -----------
  [mlir][Pass] Add support for generating pass documention from the tablegen definition

Summary:
This revision adds support for auto-generating pass documentation, replacing the need to manually keep Passes.md up-to-date. This matches the behavior already in place for dialect and interface documentation.

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


Compare: https://github.com/llvm/llvm-project/compare/038f03cb5ef5...9be4be3e5327


More information about the All-commits mailing list