[Mlir-commits] [mlir] 29794ab - [mlir] Use context provided rather than getContext
Jacques Pienaar
llvmlistbot at llvm.org
Sat Jun 4 12:18:56 PDT 2022
Author: Jacques Pienaar
Date: 2022-06-04T12:18:51-07:00
New Revision: 29794ab0fae526073cb1f0f8cd4662243c7e3c3a
URL: https://github.com/llvm/llvm-project/commit/29794ab0fae526073cb1f0f8cd4662243c7e3c3a
DIFF: https://github.com/llvm/llvm-project/commit/29794ab0fae526073cb1f0f8cd4662243c7e3c3a.diff
LOG: [mlir] Use context provided rather than getContext
Avoids "pass state was never initialized" assertion failure.
Added:
Modified:
mlir/test/lib/Tools/PDLL/TestPDLL.cpp
Removed:
################################################################################
diff --git a/mlir/test/lib/Tools/PDLL/TestPDLL.cpp b/mlir/test/lib/Tools/PDLL/TestPDLL.cpp
index c847a027172f4..a8103d4e95255 100644
--- a/mlir/test/lib/Tools/PDLL/TestPDLL.cpp
+++ b/mlir/test/lib/Tools/PDLL/TestPDLL.cpp
@@ -29,7 +29,7 @@ struct TestPDLLPass : public PassWrapper<TestPDLLPass, OperationPass<>> {
LogicalResult initialize(MLIRContext *ctx) override {
// Build the pattern set within the `initialize` to avoid recompiling PDL
// patterns during each `runOnOperation` invocation.
- RewritePatternSet patternList(&getContext());
+ RewritePatternSet patternList(ctx);
populateGeneratedPDLLPatterns(patternList);
patterns = std::move(patternList);
return success();
More information about the Mlir-commits
mailing list