From ce254598b73b119c9463f5b7f4131559e276e844 Mon Sep 17 00:00:00 2001 From: Matthias Springer Date: Mon, 14 Aug 2023 08:40:13 +0200 Subject: [mlir][Conversion] Store const type converter in ConversionPattern ConversionPatterns do not (and should not) modify the type converter that they are using. * Make `ConversionPattern::typeConverter` const. * Make member functions of the `LLVMTypeConverter` const. * Conversion patterns take a const type converter. * Various helper functions (that are called from patterns) now also take a const type converter. Differential Revision: https://reviews.llvm.org/D157601 --- mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp') diff --git a/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp b/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp index f7caf02..2a26587 100644 --- a/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp +++ b/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp @@ -464,7 +464,7 @@ LogicalResult GPUPrintfOpToVPrintfLowering::matchAndRewrite( /// Unrolls op if it's operating on vectors. LogicalResult impl::scalarizeVectorOp(Operation *op, ValueRange operands, ConversionPatternRewriter &rewriter, - LLVMTypeConverter &converter) { + const LLVMTypeConverter &converter) { TypeRange operandTypes(operands); if (llvm::none_of(operandTypes, [](Type type) { return isa(type); })) { -- cgit v1.1