This allows to defers the check for traits to the execution instead of forcing it on the pipeline creation.
In particular, this is making our pipeline creation tolerant to dialects not being loaded in the context yet.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Pass/Pass.cpp | ||
---|---|---|
342 | Check is delayed here now FYI |
Thanks!
mlir/lib/Pass/Pass.cpp | ||
---|---|---|
342 | I think the distinction in the error message between "not registered" and "not IsolatedFromAbove" was useful and should be preserved. I predict someone will otherwise spend a while trying to figure out why it doesn't like their operation that is marked "IsolatedFromAbove" | |
502–503 | While you're here, fix this typo? |
mlir/include/mlir/Pass/PassInstrumentation.h | ||
---|---|---|
17–18 | These should be sorted. | |
46 | These can be changed to value-typed now. | |
mlir/include/mlir/Pass/PassManager.h | ||
31–32 | These should be sorted. | |
73 | This should be value-typed. | |
96 | Same here. | |
mlir/lib/Pass/Pass.cpp | ||
338 | Return the error directly, it converts to failure | |
502–503 | It wasn't a typo, iff means if and only if. It's a logical conjunction. | |
mlir/unittests/Pass/PassManagerTest.cpp | ||
79 | nit: Remove the double public and just make this a struct. | |
86 | The explicit StringRef seems unnecessary here. | |
88 | Virtual here is unnecessary. |
mlir/lib/Pass/Pass.cpp | ||
---|---|---|
502–503 | That wasn't the typo I was referring to. I meant "the any" :-D |
mlir/lib/Pass/Pass.cpp | ||
---|---|---|
502–503 | Nice! |
mlir/lib/Pass/Pass.cpp | ||
---|---|---|
342 | Sure, I just added it back. This is some check that we're losing by the way: with the dialects registered "late" we would have to do more work to catch this. | |
502–503 | Since the upgrade comments can be made on a specific subset of a line, if you hover over @GMNGeoffrey 's comment you see the highlighted section :) | |
mlir/unittests/Pass/PassManagerTest.cpp | ||
86 | no known conversion from 'const char [11]' to 'Optional<llvm::StringRef> Any alternative? |
mlir/unittests/Pass/PassManagerTest.cpp | ||
---|---|---|
86 | Ah right, forgot about the Optional. Keeping it is fine. |
mlir/include/mlir/Pass/PassInstrumentation.h | ||
---|---|---|
12 | ERROR: mlir/include/mlir/Pass/PassInstrumentation.h:46:51 variable has incomplete type 'const mlir::Identifier' virtual void runBeforePipeline(const Identifier name, | |
mlir/unittests/Pass/PassManagerTest.cpp | ||
81 | It's not, I'll remove. | |
119 | If I don't assert, the test continues and it'll crash on the next line. |
Why do you need the include in this file?