Skip to content

Commit cb9267f

Browse files
authored
[mlir][vector] Rename LowerVectorToLLVM to ConvertVectorToLLVM (NFC) (#104785)
There was some inconsistency with ConvertVectorToLLVM Pass builder, files and option names. This patch aims to move all occurences to ConvertVectorToLLVM.
1 parent 3d1c63e commit cb9267f

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

mlir/include/mlir/Dialect/SparseTensor/Pipelines/Passes.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ struct SparsifierOptions : public PassPipelineOptions<SparsifierOptions> {
162162
}
163163

164164
/// Projects out the options for `createConvertVectorToLLVMPass`.
165-
ConvertVectorToLLVMPassOptions lowerVectorToLLVMOptions() const {
165+
ConvertVectorToLLVMPassOptions convertVectorToLLVMOptions() const {
166166
ConvertVectorToLLVMPassOptions opts{};
167167
opts.reassociateFPReductions = reassociateFPReductions;
168168
opts.force32BitVectorIndices = force32BitVectorIndices;

mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ using namespace mlir;
3535
using namespace mlir::vector;
3636

3737
namespace {
38-
struct LowerVectorToLLVMPass
39-
: public impl::ConvertVectorToLLVMPassBase<LowerVectorToLLVMPass> {
38+
struct ConvertVectorToLLVMPass
39+
: public impl::ConvertVectorToLLVMPassBase<ConvertVectorToLLVMPass> {
4040

4141
using Base::Base;
4242

@@ -58,7 +58,7 @@ struct LowerVectorToLLVMPass
5858
};
5959
} // namespace
6060

61-
void LowerVectorToLLVMPass::runOnOperation() {
61+
void ConvertVectorToLLVMPass::runOnOperation() {
6262
// Perform progressive lowering of operations on slices and
6363
// all contraction operations. Also applies folding and DCE.
6464
{

mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,19 @@ void mlir::sparse_tensor::buildSparsifier(OpPassManager &pm,
7676
pm.addNestedPass<func::FuncOp>(createConvertSCFToCFPass());
7777
pm.addPass(memref::createExpandStridedMetadataPass());
7878
pm.addPass(createLowerAffinePass());
79-
pm.addPass(createConvertVectorToLLVMPass(options.lowerVectorToLLVMOptions()));
79+
pm.addPass(
80+
createConvertVectorToLLVMPass(options.convertVectorToLLVMOptions()));
8081
pm.addPass(createFinalizeMemRefToLLVMConversionPass());
8182
pm.addNestedPass<func::FuncOp>(createConvertComplexToStandardPass());
8283
pm.addNestedPass<func::FuncOp>(arith::createArithExpandOpsPass());
8384
pm.addNestedPass<func::FuncOp>(createConvertMathToLLVMPass());
8485
pm.addPass(createConvertMathToLibmPass());
8586
pm.addPass(createConvertComplexToLibmPass());
86-
pm.addPass(createConvertVectorToLLVMPass(options.lowerVectorToLLVMOptions()));
87+
pm.addPass(
88+
createConvertVectorToLLVMPass(options.convertVectorToLLVMOptions()));
8789
pm.addPass(createConvertComplexToLLVMPass());
88-
pm.addPass(createConvertVectorToLLVMPass(options.lowerVectorToLLVMOptions()));
90+
pm.addPass(
91+
createConvertVectorToLLVMPass(options.convertVectorToLLVMOptions()));
8992
pm.addPass(createConvertFuncToLLVMPass());
9093

9194
// Finalize GPU code generation.

0 commit comments

Comments
 (0)