[Mlir-commits] [mlir] [mlir][vector] Rename LowerVectorToLLVM to ConvertVectorToLLVM (NFC) (PR #104785)
Hugo Trachino
llvmlistbot at llvm.org
Mon Aug 19 07:19:58 PDT 2024
https://github.com/nujaa created https://github.com/llvm/llvm-project/pull/104785
There was some inconsistency with ConvertVectorToLLVM Pass builder, files and option names.
This patch aims to move all occurences to ConvertVectorToLLVM.
>From b1a42339b368a765335220d21c2c8d6d587f0021 Mon Sep 17 00:00:00 2001
From: Hugo <hugo.trachino at huawei.com>
Date: Fri, 16 Aug 2024 17:05:59 +0800
Subject: [PATCH] [mlir][vector] Rename LowerVectorToLLVM to
ConvertVectorToLLVM (NFC)
---
.../include/mlir/Dialect/SparseTensor/Pipelines/Passes.h | 2 +-
.../Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp | 6 +++---
.../SparseTensor/Pipelines/SparseTensorPipelines.cpp | 9 ++++++---
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/mlir/include/mlir/Dialect/SparseTensor/Pipelines/Passes.h b/mlir/include/mlir/Dialect/SparseTensor/Pipelines/Passes.h
index 90021ffa7c380b..efbe5c56a219b3 100644
--- a/mlir/include/mlir/Dialect/SparseTensor/Pipelines/Passes.h
+++ b/mlir/include/mlir/Dialect/SparseTensor/Pipelines/Passes.h
@@ -162,7 +162,7 @@ struct SparsifierOptions : public PassPipelineOptions<SparsifierOptions> {
}
/// Projects out the options for `createConvertVectorToLLVMPass`.
- ConvertVectorToLLVMPassOptions lowerVectorToLLVMOptions() const {
+ ConvertVectorToLLVMPassOptions convertVectorToLLVMOptions() const {
ConvertVectorToLLVMPassOptions opts{};
opts.reassociateFPReductions = reassociateFPReductions;
opts.force32BitVectorIndices = force32BitVectorIndices;
diff --git a/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp b/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp
index 55143d5939ba25..842d239cf6a512 100644
--- a/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp
+++ b/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp
@@ -35,8 +35,8 @@ using namespace mlir;
using namespace mlir::vector;
namespace {
-struct LowerVectorToLLVMPass
- : public impl::ConvertVectorToLLVMPassBase<LowerVectorToLLVMPass> {
+struct ConvertVectorToLLVMPass
+ : public impl::ConvertVectorToLLVMPassBase<ConvertVectorToLLVMPass> {
using Base::Base;
@@ -58,7 +58,7 @@ struct LowerVectorToLLVMPass
};
} // namespace
-void LowerVectorToLLVMPass::runOnOperation() {
+void ConvertVectorToLLVMPass::runOnOperation() {
// Perform progressive lowering of operations on slices and
// all contraction operations. Also applies folding and DCE.
{
diff --git a/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp b/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
index c5eb965884396a..12e330ac7efbdf 100644
--- a/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
@@ -76,16 +76,19 @@ void mlir::sparse_tensor::buildSparsifier(OpPassManager &pm,
pm.addNestedPass<func::FuncOp>(createConvertSCFToCFPass());
pm.addPass(memref::createExpandStridedMetadataPass());
pm.addPass(createLowerAffinePass());
- pm.addPass(createConvertVectorToLLVMPass(options.lowerVectorToLLVMOptions()));
+ pm.addPass(
+ createConvertVectorToLLVMPass(options.convertVectorToLLVMOptions()));
pm.addPass(createFinalizeMemRefToLLVMConversionPass());
pm.addNestedPass<func::FuncOp>(createConvertComplexToStandardPass());
pm.addNestedPass<func::FuncOp>(arith::createArithExpandOpsPass());
pm.addNestedPass<func::FuncOp>(createConvertMathToLLVMPass());
pm.addPass(createConvertMathToLibmPass());
pm.addPass(createConvertComplexToLibmPass());
- pm.addPass(createConvertVectorToLLVMPass(options.lowerVectorToLLVMOptions()));
+ pm.addPass(
+ createConvertVectorToLLVMPass(options.convertVectorToLLVMOptions()));
pm.addPass(createConvertComplexToLLVMPass());
- pm.addPass(createConvertVectorToLLVMPass(options.lowerVectorToLLVMOptions()));
+ pm.addPass(
+ createConvertVectorToLLVMPass(options.convertVectorToLLVMOptions()));
pm.addPass(createConvertFuncToLLVMPass());
// Finalize GPU code generation.
More information about the Mlir-commits
mailing list