[all-commits] [llvm/llvm-project] 8d67d1: [mlir][DialectConversion] Refactor how block argum...
River Riddle via All-commits
all-commits at lists.llvm.org
Thu Jun 18 16:01:35 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 8d67d187ba1bdb201f83ce25725e9be59b0141a7
https://github.com/llvm/llvm-project/commit/8d67d187ba1bdb201f83ce25725e9be59b0141a7
Author: River Riddle <riddleriver at gmail.com>
Date: 2020-06-18 (Thu, 18 Jun 2020)
Changed paths:
M mlir/docs/DialectConversion.md
M mlir/docs/Tutorials/Toy/Ch-6.md
M mlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
M mlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
M mlir/include/mlir/IR/PatternMatch.h
M mlir/include/mlir/Support/LogicalResult.h
M mlir/include/mlir/Transforms/BufferPlacement.h
M mlir/include/mlir/Transforms/DialectConversion.h
M mlir/lib/Conversion/AVX512ToLLVM/ConvertAVX512ToLLVM.cpp
M mlir/lib/Conversion/GPUCommon/GPUOpsLowering.h
M mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
M mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp
M mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRVPass.cpp
M mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
M mlir/lib/Conversion/LinalgToSPIRV/LinalgToSPIRVPass.cpp
M mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVMPass.cpp
M mlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp
M mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
M mlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp
M mlir/lib/Dialect/Linalg/Transforms/TensorsToBuffers.cpp
M mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp
M mlir/lib/Dialect/SPIRV/Transforms/LowerABIAttributesPass.cpp
M mlir/lib/Transforms/DialectConversion.cpp
M mlir/test/Transforms/test-legalizer.mlir
M mlir/test/lib/Dialect/Test/TestPatterns.cpp
M mlir/test/lib/Transforms/TestBufferPlacement.cpp
Log Message:
-----------
[mlir][DialectConversion] Refactor how block argument types get converted
This revision removes the TypeConverter parameter passed to the apply* methods, and instead moves the responsibility of region type conversion to patterns. The types of a region can be converted using the 'convertRegionTypes' method, which acts similarly to the existing 'applySignatureConversion'. This method ensures that all blocks within, and including those moved into, a region will have the block argument types converted using the provided converter.
This has the benefit of making more of the legalization logic controlled by patterns, instead of being handled explicitly by the driver. It also opens up the possibility to support multiple type conversions at some point in the future.
This revision also adds a new utility class `FailureOr<T>` that provides a LogicalResult friendly facility for returning a failure or a valid result value.
Differential Revision: https://reviews.llvm.org/D81681
More information about the All-commits
mailing list