aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Conversion/VectorToLLVM
diff options
context:
space:
mode:
authorChris Lattner <clattner@nondot.org>2021-03-20 16:29:41 -0700
committerChris Lattner <clattner@nondot.org>2021-03-21 10:06:31 -0700
commit3a506b31a341585a21b21c42253ea9fc54c55b37 (patch)
treeef62eda91c35b5d5a4a7b37366fa23da92830418 /mlir/lib/Conversion/VectorToLLVM
parent9f864d202558b4206adc26789aff8a204ebbe0b2 (diff)
Change OwningRewritePatternList to carry an MLIRContext with it.
This updates the codebase to pass the context when creating an instance of OwningRewritePatternList, and starts removing extraneous MLIRContext parameters. There are many many more to be removed. Differential Revision: https://reviews.llvm.org/D99028
Diffstat (limited to 'mlir/lib/Conversion/VectorToLLVM')
-rw-r--r--mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp b/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp
index 85657742413f..b8c43c8c70c8 100644
--- a/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp
+++ b/mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp
@@ -61,16 +61,16 @@ void LowerVectorToLLVMPass::runOnOperation() {
// Perform progressive lowering of operations on slices and
// all contraction operations. Also applies folding and DCE.
{
- OwningRewritePatternList patterns;
- populateVectorToVectorCanonicalizationPatterns(patterns, &getContext());
- populateVectorSlicesLoweringPatterns(patterns, &getContext());
- populateVectorContractLoweringPatterns(patterns, &getContext());
+ OwningRewritePatternList patterns(&getContext());
+ populateVectorToVectorCanonicalizationPatterns(patterns);
+ populateVectorSlicesLoweringPatterns(patterns);
+ populateVectorContractLoweringPatterns(patterns);
(void)applyPatternsAndFoldGreedily(getOperation(), std::move(patterns));
}
// Convert to the LLVM IR dialect.
LLVMTypeConverter converter(&getContext());
- OwningRewritePatternList patterns;
+ OwningRewritePatternList patterns(&getContext());
populateVectorToLLVMMatrixConversionPatterns(converter, patterns);
populateVectorToLLVMConversionPatterns(
converter, patterns, reassociateFPReductions, enableIndexOptimizations);
@@ -98,7 +98,7 @@ void LowerVectorToLLVMPass::runOnOperation() {
return false;
};
// Remove any ArmSVE-specific types from function signatures and results.
- populateFuncOpTypeConversionPattern(patterns, &getContext(), converter);
+ populateFuncOpTypeConversionPattern(patterns, converter);
target.addDynamicallyLegalOp<FuncOp>([hasScalableVectorType](FuncOp op) {
return !hasScalableVectorType(op.getType().getInputs()) &&
!hasScalableVectorType(op.getType().getResults());