[all-commits] [llvm/llvm-project] 206fad: [mlir][NFC] Mark type converter in `populate...` f...

Matthias Springer via All-commits all-commits at lists.llvm.org
Sat Oct 5 12:33:01 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 206fad0e218e83799e49ca15545d997c6c5e8a03
      https://github.com/llvm/llvm-project/commit/206fad0e218e83799e49ca15545d997c6c5e8a03
  Author: Matthias Springer <me at m-sp.org>
  Date:   2024-10-05 (Sat, 05 Oct 2024)

  Changed paths:
    M flang/include/flang/Optimizer/CodeGen/CodeGen.h
    M flang/include/flang/Optimizer/CodeGen/CodeGenOpenMP.h
    M flang/include/flang/Optimizer/Transforms/CufOpConversion.h
    M flang/lib/Optimizer/CodeGen/CodeGen.cpp
    M flang/lib/Optimizer/CodeGen/CodeGenOpenMP.cpp
    M flang/lib/Optimizer/Transforms/CufOpConversion.cpp
    M mlir/docs/Bufferization.md
    M mlir/include/mlir/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.h
    M mlir/include/mlir/Conversion/ArithToLLVM/ArithToLLVM.h
    M mlir/include/mlir/Conversion/ArithToSPIRV/ArithToSPIRV.h
    M mlir/include/mlir/Conversion/ComplexToLLVM/ComplexToLLVM.h
    M mlir/include/mlir/Conversion/ComplexToSPIRV/ComplexToSPIRV.h
    M mlir/include/mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h
    M mlir/include/mlir/Conversion/ControlFlowToSPIRV/ControlFlowToSPIRV.h
    M mlir/include/mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h
    M mlir/include/mlir/Conversion/FuncToSPIRV/FuncToSPIRV.h
    M mlir/include/mlir/Conversion/GPUToLLVMSPV/GPUToLLVMSPVPass.h
    M mlir/include/mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h
    M mlir/include/mlir/Conversion/GPUToROCDL/GPUToROCDLPass.h
    M mlir/include/mlir/Conversion/GPUToSPIRV/GPUToSPIRV.h
    M mlir/include/mlir/Conversion/IndexToLLVM/IndexToLLVM.h
    M mlir/include/mlir/Conversion/IndexToSPIRV/IndexToSPIRV.h
    M mlir/include/mlir/Conversion/MathToLLVM/MathToLLVM.h
    M mlir/include/mlir/Conversion/MathToROCDL/MathToROCDL.h
    M mlir/include/mlir/Conversion/MathToSPIRV/MathToSPIRV.h
    M mlir/include/mlir/Conversion/MemRefToEmitC/MemRefToEmitC.h
    M mlir/include/mlir/Conversion/MemRefToLLVM/MemRefToLLVM.h
    M mlir/include/mlir/Conversion/MemRefToSPIRV/MemRefToSPIRV.h
    M mlir/include/mlir/Conversion/NVGPUToNVVM/NVGPUToNVVM.h
    M mlir/include/mlir/Conversion/OpenMPToLLVM/ConvertOpenMPToLLVM.h
    M mlir/include/mlir/Conversion/SCFToSPIRV/SCFToSPIRV.h
    M mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVM.h
    M mlir/include/mlir/Conversion/TensorToSPIRV/TensorToSPIRV.h
    M mlir/include/mlir/Conversion/TosaToLinalg/TosaToLinalg.h
    M mlir/include/mlir/Conversion/TosaToTensor/TosaToTensor.h
    M mlir/include/mlir/Conversion/UBToLLVM/UBToLLVM.h
    M mlir/include/mlir/Conversion/UBToSPIRV/UBToSPIRV.h
    M mlir/include/mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h
    M mlir/include/mlir/Conversion/VectorToSPIRV/VectorToSPIRV.h
    M mlir/include/mlir/Dialect/AMX/Transforms.h
    M mlir/include/mlir/Dialect/Arith/Transforms/Passes.h
    M mlir/include/mlir/Dialect/ArmSVE/Transforms/Transforms.h
    M mlir/include/mlir/Dialect/Bufferization/Transforms/Bufferize.h
    M mlir/include/mlir/Dialect/Func/Transforms/DecomposeCallGraphTypes.h
    M mlir/include/mlir/Dialect/Func/Transforms/FuncConversions.h
    M mlir/include/mlir/Dialect/Func/Transforms/OneToNFuncConversions.h
    M mlir/include/mlir/Dialect/Math/Transforms/Passes.h
    M mlir/include/mlir/Dialect/MemRef/Transforms/Transforms.h
    M mlir/include/mlir/Dialect/SCF/Transforms/Patterns.h
    M mlir/include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h
    M mlir/include/mlir/Dialect/SparseTensor/Transforms/Passes.h
    M mlir/include/mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h
    M mlir/include/mlir/Dialect/X86Vector/Transforms.h
    M mlir/include/mlir/Transforms/OneToNTypeConversion.h
    M mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp
    M mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp
    M mlir/lib/Conversion/ArithToSPIRV/ArithToSPIRV.cpp
    M mlir/lib/Conversion/ComplexToLLVM/ComplexToLLVM.cpp
    M mlir/lib/Conversion/ComplexToSPIRV/ComplexToSPIRV.cpp
    M mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp
    M mlir/lib/Conversion/ControlFlowToSPIRV/ControlFlowToSPIRV.cpp
    M mlir/lib/Conversion/ConvertToSPIRV/ConvertToSPIRVPass.cpp
    M mlir/lib/Conversion/FuncToLLVM/FuncToLLVM.cpp
    M mlir/lib/Conversion/FuncToSPIRV/FuncToSPIRV.cpp
    M mlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h
    M mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
    M mlir/lib/Conversion/GPUToLLVMSPV/GPUToLLVMSPV.cpp
    M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
    M mlir/lib/Conversion/GPUToNVVM/WmmaOpsToNvvm.cpp
    M mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
    M mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
    M mlir/lib/Conversion/GPUToSPIRV/WmmaOpsToSPIRV.cpp
    M mlir/lib/Conversion/IndexToLLVM/IndexToLLVM.cpp
    M mlir/lib/Conversion/IndexToSPIRV/IndexToSPIRV.cpp
    M mlir/lib/Conversion/MathToLLVM/MathToLLVM.cpp
    M mlir/lib/Conversion/MathToROCDL/MathToROCDL.cpp
    M mlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp
    M mlir/lib/Conversion/MemRefToEmitC/MemRefToEmitC.cpp
    M mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
    M mlir/lib/Conversion/MemRefToSPIRV/MemRefToSPIRV.cpp
    M mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp
    M mlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp
    M mlir/lib/Conversion/SCFToSPIRV/SCFToSPIRV.cpp
    M mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp
    M mlir/lib/Conversion/TensorToSPIRV/TensorToSPIRV.cpp
    M mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
    M mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp
    M mlir/lib/Conversion/UBToLLVM/UBToLLVM.cpp
    M mlir/lib/Conversion/UBToSPIRV/UBToSPIRV.cpp
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp
    M mlir/lib/Dialect/AMX/Transforms/LegalizeForLLVMExport.cpp
    M mlir/lib/Dialect/Arith/Transforms/EmulateNarrowType.cpp
    M mlir/lib/Dialect/Arith/Transforms/EmulateUnsupportedFloats.cpp
    M mlir/lib/Dialect/Arith/Transforms/EmulateWideInt.cpp
    M mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp
    M mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp
    M mlir/lib/Dialect/Func/Transforms/DecomposeCallGraphTypes.cpp
    M mlir/lib/Dialect/Func/Transforms/FuncConversions.cpp
    M mlir/lib/Dialect/Func/Transforms/OneToNFuncConversions.cpp
    M mlir/lib/Dialect/Math/Transforms/ExtendToSupportedTypes.cpp
    M mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp
    M mlir/lib/Dialect/MemRef/Transforms/EmulateWideInt.cpp
    M mlir/lib/Dialect/SCF/Transforms/OneToNTypeConversion.cpp
    M mlir/lib/Dialect/SCF/Transforms/StructuralTypeConversions.cpp
    M mlir/lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseIterationToScf.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseStorageSpecifierToLLVM.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
    M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
    M mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp
    M mlir/lib/Dialect/Vector/Transforms/VectorLinearize.cpp
    M mlir/lib/Dialect/X86Vector/Transforms/LegalizeForLLVMExport.cpp
    M mlir/lib/Transforms/Utils/OneToNTypeConversion.cpp
    M mlir/test/lib/Conversion/OneToNTypeConversion/TestOneToNTypeConversionPass.cpp

  Log Message:
  -----------
  [mlir][NFC] Mark type converter in `populate...` functions as `const` (#111250)

This commit marks the type converter in `populate...` functions as
`const`. This is useful for debugging.

Patterns already take a `const` type converter. However, some
`populate...` functions do not only add new patterns, but also add
additional type conversion rules. That makes it difficult to find the
place where a type conversion was added in the code base. With this
change, all `populate...` functions that only populate pattern now have
a `const` type converter. Programmers can then conclude from the
function signature that these functions do not register any new type
conversion rules.

Also some minor cleanups around the 1:N dialect conversion
infrastructure, which did not always pass the type converter as a
`const` object internally.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list