[flang-commits] [flang] [mlir] [mlir][NFC] Mark type converter in `populate...` functions as `const` (PR #111250)
via flang-commits
flang-commits at lists.llvm.org
Sat Oct 5 05:06:58 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 91fdfec263ff2b8e88433c4294a550cabb0f2314 f69065c14b133bbfb38162c6e6094c10c001c157 --extensions h,cpp -- flang/include/flang/Optimizer/CodeGen/CodeGen.h flang/include/flang/Optimizer/CodeGen/CodeGenOpenMP.h flang/include/flang/Optimizer/Transforms/CufOpConversion.h flang/lib/Optimizer/CodeGen/CodeGen.cpp flang/lib/Optimizer/CodeGen/CodeGenOpenMP.cpp flang/lib/Optimizer/Transforms/CufOpConversion.cpp mlir/include/mlir/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.h mlir/include/mlir/Conversion/ArithToLLVM/ArithToLLVM.h mlir/include/mlir/Conversion/ArithToSPIRV/ArithToSPIRV.h mlir/include/mlir/Conversion/ComplexToLLVM/ComplexToLLVM.h mlir/include/mlir/Conversion/ComplexToSPIRV/ComplexToSPIRV.h mlir/include/mlir/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.h mlir/include/mlir/Conversion/ControlFlowToSPIRV/ControlFlowToSPIRV.h mlir/include/mlir/Conversion/FuncToLLVM/ConvertFuncToLLVM.h mlir/include/mlir/Conversion/FuncToSPIRV/FuncToSPIRV.h mlir/include/mlir/Conversion/GPUToLLVMSPV/GPUToLLVMSPVPass.h mlir/include/mlir/Conversion/GPUToNVVM/GPUToNVVMPass.h mlir/include/mlir/Conversion/GPUToROCDL/GPUToROCDLPass.h mlir/include/mlir/Conversion/GPUToSPIRV/GPUToSPIRV.h mlir/include/mlir/Conversion/IndexToLLVM/IndexToLLVM.h mlir/include/mlir/Conversion/IndexToSPIRV/IndexToSPIRV.h mlir/include/mlir/Conversion/MathToLLVM/MathToLLVM.h mlir/include/mlir/Conversion/MathToROCDL/MathToROCDL.h mlir/include/mlir/Conversion/MathToSPIRV/MathToSPIRV.h mlir/include/mlir/Conversion/MemRefToEmitC/MemRefToEmitC.h mlir/include/mlir/Conversion/MemRefToLLVM/MemRefToLLVM.h mlir/include/mlir/Conversion/MemRefToSPIRV/MemRefToSPIRV.h mlir/include/mlir/Conversion/NVGPUToNVVM/NVGPUToNVVM.h mlir/include/mlir/Conversion/OpenMPToLLVM/ConvertOpenMPToLLVM.h mlir/include/mlir/Conversion/SCFToSPIRV/SCFToSPIRV.h mlir/include/mlir/Conversion/SPIRVToLLVM/SPIRVToLLVM.h mlir/include/mlir/Conversion/TensorToSPIRV/TensorToSPIRV.h mlir/include/mlir/Conversion/TosaToLinalg/TosaToLinalg.h mlir/include/mlir/Conversion/TosaToTensor/TosaToTensor.h mlir/include/mlir/Conversion/UBToLLVM/UBToLLVM.h mlir/include/mlir/Conversion/UBToSPIRV/UBToSPIRV.h mlir/include/mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h mlir/include/mlir/Conversion/VectorToSPIRV/VectorToSPIRV.h mlir/include/mlir/Dialect/AMX/Transforms.h mlir/include/mlir/Dialect/Arith/Transforms/Passes.h mlir/include/mlir/Dialect/ArmSVE/Transforms/Transforms.h mlir/include/mlir/Dialect/Bufferization/Transforms/Bufferize.h mlir/include/mlir/Dialect/Func/Transforms/DecomposeCallGraphTypes.h mlir/include/mlir/Dialect/Func/Transforms/FuncConversions.h mlir/include/mlir/Dialect/Func/Transforms/OneToNFuncConversions.h mlir/include/mlir/Dialect/Math/Transforms/Passes.h mlir/include/mlir/Dialect/MemRef/Transforms/Transforms.h mlir/include/mlir/Dialect/SCF/Transforms/Patterns.h mlir/include/mlir/Dialect/SPIRV/Transforms/SPIRVConversion.h mlir/include/mlir/Dialect/SparseTensor/Transforms/Passes.h mlir/include/mlir/Dialect/Vector/Transforms/VectorRewritePatterns.h mlir/include/mlir/Dialect/X86Vector/Transforms.h mlir/include/mlir/Transforms/OneToNTypeConversion.h mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp mlir/lib/Conversion/ArithToLLVM/ArithToLLVM.cpp mlir/lib/Conversion/ArithToSPIRV/ArithToSPIRV.cpp mlir/lib/Conversion/ComplexToLLVM/ComplexToLLVM.cpp mlir/lib/Conversion/ComplexToSPIRV/ComplexToSPIRV.cpp mlir/lib/Conversion/ControlFlowToLLVM/ControlFlowToLLVM.cpp mlir/lib/Conversion/ControlFlowToSPIRV/ControlFlowToSPIRV.cpp mlir/lib/Conversion/ConvertToSPIRV/ConvertToSPIRVPass.cpp mlir/lib/Conversion/FuncToLLVM/FuncToLLVM.cpp mlir/lib/Conversion/FuncToSPIRV/FuncToSPIRV.cpp mlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h mlir/lib/Conversion/GPUToLLVMSPV/GPUToLLVMSPV.cpp mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp mlir/lib/Conversion/GPUToNVVM/WmmaOpsToNvvm.cpp mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp mlir/lib/Conversion/GPUToSPIRV/WmmaOpsToSPIRV.cpp mlir/lib/Conversion/IndexToLLVM/IndexToLLVM.cpp mlir/lib/Conversion/IndexToSPIRV/IndexToSPIRV.cpp mlir/lib/Conversion/MathToLLVM/MathToLLVM.cpp mlir/lib/Conversion/MathToROCDL/MathToROCDL.cpp mlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp mlir/lib/Conversion/MemRefToEmitC/MemRefToEmitC.cpp mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp mlir/lib/Conversion/MemRefToSPIRV/MemRefToSPIRV.cpp mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp mlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp mlir/lib/Conversion/SCFToSPIRV/SCFToSPIRV.cpp mlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp mlir/lib/Conversion/TensorToSPIRV/TensorToSPIRV.cpp mlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp mlir/lib/Conversion/TosaToTensor/TosaToTensor.cpp mlir/lib/Conversion/UBToLLVM/UBToLLVM.cpp mlir/lib/Conversion/UBToSPIRV/UBToSPIRV.cpp mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp mlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp mlir/lib/Dialect/AMX/Transforms/LegalizeForLLVMExport.cpp mlir/lib/Dialect/Arith/Transforms/EmulateNarrowType.cpp mlir/lib/Dialect/Arith/Transforms/EmulateUnsupportedFloats.cpp mlir/lib/Dialect/Arith/Transforms/EmulateWideInt.cpp mlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp mlir/lib/Dialect/Func/Transforms/DecomposeCallGraphTypes.cpp mlir/lib/Dialect/Func/Transforms/FuncConversions.cpp mlir/lib/Dialect/Func/Transforms/OneToNFuncConversions.cpp mlir/lib/Dialect/Math/Transforms/ExtendToSupportedTypes.cpp mlir/lib/Dialect/MemRef/Transforms/EmulateNarrowType.cpp mlir/lib/Dialect/MemRef/Transforms/EmulateWideInt.cpp mlir/lib/Dialect/SCF/Transforms/OneToNTypeConversion.cpp mlir/lib/Dialect/SCF/Transforms/StructuralTypeConversions.cpp mlir/lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp mlir/lib/Dialect/SparseTensor/Transforms/SparseIterationToScf.cpp mlir/lib/Dialect/SparseTensor/Transforms/SparseStorageSpecifierToLLVM.cpp mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp mlir/lib/Dialect/Vector/Transforms/VectorEmulateNarrowType.cpp mlir/lib/Dialect/Vector/Transforms/VectorLinearize.cpp mlir/lib/Dialect/X86Vector/Transforms/LegalizeForLLVMExport.cpp mlir/lib/Transforms/Utils/OneToNTypeConversion.cpp mlir/test/lib/Conversion/OneToNTypeConversion/TestOneToNTypeConversionPass.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/mlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h b/mlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h
index ba4de3cb6b..c9ddc942bd 100644
--- a/mlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h
+++ b/mlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h
@@ -41,8 +41,8 @@ public:
indexBitwidth(typeConverter.getIndexTypeBitwidth()),
indexKind(IndexKind::Other), intrType(IntrType::None) {}
- explicit OpLowering(const LLVMTypeConverter &typeConverter, IndexKind indexKind,
- IntrType intrType)
+ explicit OpLowering(const LLVMTypeConverter &typeConverter,
+ IndexKind indexKind, IntrType intrType)
: ConvertOpToLLVMPattern<Op>(typeConverter),
indexBitwidth(typeConverter.getIndexTypeBitwidth()),
indexKind(indexKind), intrType(intrType) {}
diff --git a/mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h b/mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
index edfbb7895e..1cf8a1acb3 100644
--- a/mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
+++ b/mlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h
@@ -42,9 +42,9 @@ namespace mlir {
template <typename SourceOp>
struct OpToFuncCallLowering : public ConvertOpToLLVMPattern<SourceOp> {
public:
- explicit OpToFuncCallLowering(const LLVMTypeConverter &lowering, StringRef f32Func,
- StringRef f64Func, StringRef f32ApproxFunc,
- StringRef f16Func)
+ explicit OpToFuncCallLowering(const LLVMTypeConverter &lowering,
+ StringRef f32Func, StringRef f64Func,
+ StringRef f32ApproxFunc, StringRef f16Func)
: ConvertOpToLLVMPattern<SourceOp>(lowering), f32Func(f32Func),
f64Func(f64Func), f32ApproxFunc(f32ApproxFunc), f16Func(f16Func) {}
``````````
</details>
https://github.com/llvm/llvm-project/pull/111250
More information about the flang-commits
mailing list