[all-commits] [llvm/llvm-project] 011786: [mlir][spirv] NFC: Shuffle code around to better f...

Lei Zhang via All-commits all-commits at lists.llvm.org
Thu Dec 17 08:08:37 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 01178654121b1caadadd448d65d7fb4f806670d6
      https://github.com/llvm/llvm-project/commit/01178654121b1caadadd448d65d7fb4f806670d6
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2020-12-17 (Thu, 17 Dec 2020)

  Changed paths:
    M mlir/docs/Dialects/SPIR-V.md
    M mlir/include/mlir/Dialect/SPIRV/CMakeLists.txt
    A mlir/include/mlir/Dialect/SPIRV/IR/CMakeLists.txt
    A mlir/include/mlir/Dialect/SPIRV/IR/ParserUtils.h
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVArithmeticOps.td
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAtomicOps.td
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAttributes.h
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVAvailability.td
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBitOps.td
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCastOps.td
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCompositeOps.td
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVControlFlowOps.td
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVCooperativeMatrixOps.td
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVDialect.h
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVEnums.h
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGLSLOps.td
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGroupOps.td
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVLogicalOps.td
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVMatrixOps.td
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVModule.h
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVNonUniformOps.td
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVOCLOps.td
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVOps.h
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVOps.td
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVStructureOps.td
    A mlir/include/mlir/Dialect/SPIRV/IR/SPIRVTypes.h
    A mlir/include/mlir/Dialect/SPIRV/IR/TargetAndABI.h
    A mlir/include/mlir/Dialect/SPIRV/IR/TargetAndABI.td
    R mlir/include/mlir/Dialect/SPIRV/LayoutUtils.h
    A mlir/include/mlir/Dialect/SPIRV/Linking/ModuleCombiner.h
    R mlir/include/mlir/Dialect/SPIRV/ModuleCombiner.h
    R mlir/include/mlir/Dialect/SPIRV/ParserUtils.h
    R mlir/include/mlir/Dialect/SPIRV/Passes.h
    R mlir/include/mlir/Dialect/SPIRV/Passes.td
    R mlir/include/mlir/Dialect/SPIRV/SPIRVArithmeticOps.td
    R mlir/include/mlir/Dialect/SPIRV/SPIRVAtomicOps.td
    R mlir/include/mlir/Dialect/SPIRV/SPIRVAttributes.h
    R mlir/include/mlir/Dialect/SPIRV/SPIRVAvailability.td
    R mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
    R mlir/include/mlir/Dialect/SPIRV/SPIRVBitOps.td
    R mlir/include/mlir/Dialect/SPIRV/SPIRVCastOps.td
    R mlir/include/mlir/Dialect/SPIRV/SPIRVCompositeOps.td
    R mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
    R mlir/include/mlir/Dialect/SPIRV/SPIRVCooperativeMatrixOps.td
    R mlir/include/mlir/Dialect/SPIRV/SPIRVDialect.h
    R mlir/include/mlir/Dialect/SPIRV/SPIRVGLSLOps.td
    R mlir/include/mlir/Dialect/SPIRV/SPIRVGroupOps.td
    R mlir/include/mlir/Dialect/SPIRV/SPIRVLogicalOps.td
    R mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.h
    R mlir/include/mlir/Dialect/SPIRV/SPIRVMatrixOps.td
    R mlir/include/mlir/Dialect/SPIRV/SPIRVModule.h
    R mlir/include/mlir/Dialect/SPIRV/SPIRVNonUniformOps.td
    R mlir/include/mlir/Dialect/SPIRV/SPIRVOCLOps.td
    R mlir/include/mlir/Dialect/SPIRV/SPIRVOps.h
    R mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
    R mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
    R mlir/include/mlir/Dialect/SPIRV/SPIRVTypes.h
    R mlir/include/mlir/Dialect/SPIRV/TargetAndABI.h
    R mlir/include/mlir/Dialect/SPIRV/TargetAndABI.td
    A mlir/include/mlir/Dialect/SPIRV/Transforms/CMakeLists.txt
    A mlir/include/mlir/Dialect/SPIRV/Transforms/Passes.h
    A mlir/include/mlir/Dialect/SPIRV/Transforms/Passes.td
    A mlir/include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h
    A mlir/include/mlir/Dialect/SPIRV/Utils/LayoutUtils.h
    M mlir/include/mlir/InitAllDialects.h
    M mlir/include/mlir/InitAllPasses.h
    M mlir/include/mlir/Target/SPIRV/SPIRVBinaryUtils.h
    M mlir/lib/Conversion/GPUToSPIRV/CMakeLists.txt
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
    M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.cpp
    M mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.td
    M mlir/lib/Conversion/GPUToVulkan/ConvertGPULaunchFuncToVulkanLaunchFunc.cpp
    M mlir/lib/Conversion/LinalgToSPIRV/CMakeLists.txt
    M mlir/lib/Conversion/LinalgToSPIRV/LinalgToSPIRV.cpp
    M mlir/lib/Conversion/LinalgToSPIRV/LinalgToSPIRVPass.cpp
    M mlir/lib/Conversion/SCFToSPIRV/CMakeLists.txt
    M mlir/lib/Conversion/SCFToSPIRV/SCFToSPIRV.cpp
    M mlir/lib/Conversion/SPIRVToLLVM/CMakeLists.txt
    M mlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp
    M mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.cpp
    M mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVMPass.cpp
    M mlir/lib/Conversion/StandardToSPIRV/CMakeLists.txt
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRV.cpp
    M mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
    M mlir/lib/Conversion/StandardToSPIRV/LegalizeStandardForSPIRV.cpp
    M mlir/lib/Conversion/VectorToSPIRV/CMakeLists.txt
    M mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp
    M mlir/lib/Dialect/SPIRV/CMakeLists.txt
    A mlir/lib/Dialect/SPIRV/IR/CMakeLists.txt
    A mlir/lib/Dialect/SPIRV/IR/SPIRVAttributes.cpp
    A mlir/lib/Dialect/SPIRV/IR/SPIRVCanonicalization.cpp
    A mlir/lib/Dialect/SPIRV/IR/SPIRVCanonicalization.td
    A mlir/lib/Dialect/SPIRV/IR/SPIRVDialect.cpp
    A mlir/lib/Dialect/SPIRV/IR/SPIRVEnums.cpp
    A mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
    A mlir/lib/Dialect/SPIRV/IR/SPIRVTypes.cpp
    A mlir/lib/Dialect/SPIRV/IR/TargetAndABI.cpp
    R mlir/lib/Dialect/SPIRV/LayoutUtils.cpp
    M mlir/lib/Dialect/SPIRV/Linking/ModuleCombiner/ModuleCombiner.cpp
    R mlir/lib/Dialect/SPIRV/SPIRVAttributes.cpp
    R mlir/lib/Dialect/SPIRV/SPIRVCanonicalization.cpp
    R mlir/lib/Dialect/SPIRV/SPIRVCanonicalization.td
    R mlir/lib/Dialect/SPIRV/SPIRVDialect.cpp
    R mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
    R mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
    R mlir/lib/Dialect/SPIRV/SPIRVTypes.cpp
    R mlir/lib/Dialect/SPIRV/TargetAndABI.cpp
    M mlir/lib/Dialect/SPIRV/Transforms/CMakeLists.txt
    A mlir/lib/Dialect/SPIRV/Transforms/DecorateCompositeTypeLayoutPass.cpp
    R mlir/lib/Dialect/SPIRV/Transforms/DecorateSPIRVCompositeTypeLayoutPass.cpp
    M mlir/lib/Dialect/SPIRV/Transforms/LowerABIAttributesPass.cpp
    M mlir/lib/Dialect/SPIRV/Transforms/PassDetail.h
    M mlir/lib/Dialect/SPIRV/Transforms/RewriteInsertsPass.cpp
    A mlir/lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp
    M mlir/lib/Dialect/SPIRV/Transforms/UpdateVCEPass.cpp
    A mlir/lib/Dialect/SPIRV/Utils/CMakeLists.txt
    A mlir/lib/Dialect/SPIRV/Utils/LayoutUtils.cpp
    M mlir/lib/Target/SPIRV/Deserialization.cpp
    M mlir/lib/Target/SPIRV/SPIRVBinaryUtils.cpp
    M mlir/lib/Target/SPIRV/Serialization.cpp
    M mlir/lib/Target/SPIRV/TranslateRegistration.cpp
    A mlir/test/Dialect/SPIRV/IR/arithmetic-ops.mlir
    A mlir/test/Dialect/SPIRV/IR/atomic-ops.mlir
    A mlir/test/Dialect/SPIRV/IR/availability.mlir
    A mlir/test/Dialect/SPIRV/IR/bit-ops.mlir
    A mlir/test/Dialect/SPIRV/IR/composite-ops.mlir
    A mlir/test/Dialect/SPIRV/IR/control-flow-ops.mlir
    A mlir/test/Dialect/SPIRV/IR/cooperative-matrix-ops.mlir
    A mlir/test/Dialect/SPIRV/IR/glsl-ops.mlir
    A mlir/test/Dialect/SPIRV/IR/group-ops.mlir
    A mlir/test/Dialect/SPIRV/IR/logical-ops.mlir
    A mlir/test/Dialect/SPIRV/IR/matrix-ops.mlir
    A mlir/test/Dialect/SPIRV/IR/non-uniform-ops.mlir
    A mlir/test/Dialect/SPIRV/IR/ocl-ops.mlir
    A mlir/test/Dialect/SPIRV/IR/ops.mlir
    A mlir/test/Dialect/SPIRV/IR/structure-ops.mlir
    A mlir/test/Dialect/SPIRV/IR/target-and-abi.mlir
    A mlir/test/Dialect/SPIRV/IR/target-env.mlir
    A mlir/test/Dialect/SPIRV/IR/types.mlir
    A mlir/test/Dialect/SPIRV/Linking/ModuleCombiner/conflict-resolution.mlir
    R mlir/test/Dialect/SPIRV/Linking/ModuleCombiner/conflict_resolution.mlir
    A mlir/test/Dialect/SPIRV/Linking/ModuleCombiner/deduplication.mlir
    R mlir/test/Dialect/SPIRV/Linking/ModuleCombiner/deduplication_basic.mlir
    R mlir/test/Dialect/SPIRV/Serialization/arithmetic-ops.mlir
    R mlir/test/Dialect/SPIRV/Serialization/array.mlir
    R mlir/test/Dialect/SPIRV/Serialization/atomic-ops.mlir
    R mlir/test/Dialect/SPIRV/Serialization/barrier.mlir
    R mlir/test/Dialect/SPIRV/Serialization/bit-ops.mlir
    R mlir/test/Dialect/SPIRV/Serialization/cast-ops.mlir
    R mlir/test/Dialect/SPIRV/Serialization/composite-op.mlir
    R mlir/test/Dialect/SPIRV/Serialization/constant.mlir
    R mlir/test/Dialect/SPIRV/Serialization/cooperative-matrix.mlir
    R mlir/test/Dialect/SPIRV/Serialization/debug.mlir
    R mlir/test/Dialect/SPIRV/Serialization/decorations.mlir
    R mlir/test/Dialect/SPIRV/Serialization/entry-point.mlir
    R mlir/test/Dialect/SPIRV/Serialization/execution-mode.mlir
    R mlir/test/Dialect/SPIRV/Serialization/function-call.mlir
    R mlir/test/Dialect/SPIRV/Serialization/global-variable.mlir
    R mlir/test/Dialect/SPIRV/Serialization/glsl-ops.mlir
    R mlir/test/Dialect/SPIRV/Serialization/group-ops.mlir
    R mlir/test/Dialect/SPIRV/Serialization/logical-ops.mlir
    R mlir/test/Dialect/SPIRV/Serialization/loop.mlir
    R mlir/test/Dialect/SPIRV/Serialization/matrix.mlir
    R mlir/test/Dialect/SPIRV/Serialization/memory-ops.mlir
    R mlir/test/Dialect/SPIRV/Serialization/module.mlir
    R mlir/test/Dialect/SPIRV/Serialization/non-uniform-ops.mlir
    R mlir/test/Dialect/SPIRV/Serialization/ocl-ops.mlir
    R mlir/test/Dialect/SPIRV/Serialization/phi.mlir
    R mlir/test/Dialect/SPIRV/Serialization/selection.mlir
    R mlir/test/Dialect/SPIRV/Serialization/spec-constant.mlir
    R mlir/test/Dialect/SPIRV/Serialization/struct.mlir
    R mlir/test/Dialect/SPIRV/Serialization/terminator.mlir
    R mlir/test/Dialect/SPIRV/Serialization/undef.mlir
    A mlir/test/Dialect/SPIRV/Transforms/canonicalize.mlir
    R mlir/test/Dialect/SPIRV/arithmetic-ops.mlir
    R mlir/test/Dialect/SPIRV/atomic-ops.mlir
    R mlir/test/Dialect/SPIRV/availability.mlir
    R mlir/test/Dialect/SPIRV/bit-ops.mlir
    R mlir/test/Dialect/SPIRV/canonicalize.mlir
    R mlir/test/Dialect/SPIRV/composite-ops.mlir
    R mlir/test/Dialect/SPIRV/control-flow-ops.mlir
    R mlir/test/Dialect/SPIRV/cooperative-matrix.mlir
    R mlir/test/Dialect/SPIRV/glslops.mlir
    R mlir/test/Dialect/SPIRV/group-ops.mlir
    R mlir/test/Dialect/SPIRV/logical-ops.mlir
    R mlir/test/Dialect/SPIRV/matrix-ops.mlir
    R mlir/test/Dialect/SPIRV/non-uniform-ops.mlir
    R mlir/test/Dialect/SPIRV/ocl-ops.mlir
    R mlir/test/Dialect/SPIRV/ops.mlir
    R mlir/test/Dialect/SPIRV/structure-ops.mlir
    R mlir/test/Dialect/SPIRV/target-and-abi.mlir
    R mlir/test/Dialect/SPIRV/target-env.mlir
    R mlir/test/Dialect/SPIRV/types.mlir
    A mlir/test/Target/SPIRV/arithmetic-ops.mlir
    A mlir/test/Target/SPIRV/array.mlir
    A mlir/test/Target/SPIRV/atomic-ops.mlir
    A mlir/test/Target/SPIRV/barrier.mlir
    A mlir/test/Target/SPIRV/bit-ops.mlir
    A mlir/test/Target/SPIRV/cast-ops.mlir
    A mlir/test/Target/SPIRV/composite-op.mlir
    A mlir/test/Target/SPIRV/constant.mlir
    A mlir/test/Target/SPIRV/cooperative-matrix-ops.mlir
    A mlir/test/Target/SPIRV/debug.mlir
    A mlir/test/Target/SPIRV/decorations.mlir
    A mlir/test/Target/SPIRV/entry-point.mlir
    A mlir/test/Target/SPIRV/execution-mode.mlir
    A mlir/test/Target/SPIRV/function-call.mlir
    A mlir/test/Target/SPIRV/global-variable.mlir
    A mlir/test/Target/SPIRV/glsl-ops.mlir
    A mlir/test/Target/SPIRV/group-ops.mlir
    A mlir/test/Target/SPIRV/logical-ops.mlir
    A mlir/test/Target/SPIRV/loop.mlir
    A mlir/test/Target/SPIRV/matrix.mlir
    A mlir/test/Target/SPIRV/memory-ops.mlir
    A mlir/test/Target/SPIRV/module.mlir
    A mlir/test/Target/SPIRV/non-uniform-ops.mlir
    A mlir/test/Target/SPIRV/ocl-ops.mlir
    A mlir/test/Target/SPIRV/phi.mlir
    A mlir/test/Target/SPIRV/selection.mlir
    A mlir/test/Target/SPIRV/spec-constant.mlir
    A mlir/test/Target/SPIRV/struct.mlir
    A mlir/test/Target/SPIRV/terminator.mlir
    A mlir/test/Target/SPIRV/undef.mlir
    M mlir/test/lib/Dialect/SPIRV/CMakeLists.txt
    M mlir/test/lib/Dialect/SPIRV/TestAvailability.cpp
    M mlir/test/lib/Dialect/SPIRV/TestEntryPointAbi.cpp
    M mlir/test/lib/Dialect/SPIRV/TestModuleCombiner.cpp
    M mlir/test/lib/Transforms/TestGpuMemoryPromotion.cpp
    M mlir/tools/mlir-spirv-cpu-runner/CMakeLists.txt
    M mlir/tools/mlir-spirv-cpu-runner/mlir-spirv-cpu-runner.cpp
    M mlir/tools/mlir-tblgen/SPIRVUtilsGen.cpp
    M mlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
    M mlir/unittests/Dialect/SPIRV/DeserializationTest.cpp
    M mlir/unittests/Dialect/SPIRV/SerializationTest.cpp

  Log Message:
  -----------
  [mlir][spirv] NFC: Shuffle code around to better follow convention

This commit shuffles SPIR-V code around to better follow MLIR
convention. Specifically,

* Created IR/, Transforms/, Linking/, and Utils/ subdirectories and
  moved suitable code inside.
* Created SPIRVEnums.{h|cpp} for SPIR-V C/C++ enums generated from
  SPIR-V spec. Previously they are cluttered inside SPIRVTypes.{h|cpp}.
* Fixed include guards in various header files (both .h and .td).
* Moved serialization tests under test/Target/SPIRV.
* Renamed TableGen backend -gen-spirv-op-utils into -gen-spirv-attr-utils
  as it is only generating utility functions for attributes.

Reviewed By: mravishankar

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




More information about the All-commits mailing list