♻️ Consolidate shared MLIR infrastructure - #2202
Conversation
Move cross-dialect transforms and quantum helpers under the MQT dialect, split generic constant folding into support, and share phase and parameter validation across QC and QCO. Assisted-by: Codex
Build the quantum-aware module equivalence checker only for unit tests and remove its dialect dependencies from the production support library. Assisted-by: Codex
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
|
@denialhaag @simon1hofmann could one of you cross check this? This feels like a pretty natural follow-up to the MQT introduction. |
denialhaag
left a comment
There was a problem hiding this comment.
I like this change a lot! Thanks, @burgholzer! 🙂
I have four nitpicks and one actual comment, all of which you can find below.
Keep dialect-independent folding helpers in support infrastructure while making their MQT ownership explicit in the include path and C++ namespace. Assisted-by: Codex
@denialhaag is too fast with reviews 😅 |
Use mutable MLIR handles consistently, document the folding contract, fix direct include dependencies, and root-qualify test-support namespace references. Assisted-by: Codex
|
@denialhaag I think the latest commit should address most of your concerns (hopefully all). Would you mind to take another look? |
|
Important Approval pendingCodeRabbit has no unresolved comments, but it has not reviewed the latest commit. Use the checkbox below to review the latest commit. CodeRabbit will approve the changes if it finds no blocking issues.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
denialhaag
left a comment
There was a problem hiding this comment.
I'll approve because the namespaces are good now. Two of the comments are technically still open, but I don't want to unnecessarily block this. Feel free to resolve and merge. 🙂
Place all IR-aware shared helpers under Dialect/MQT/Utils, split broad utility headers by contract, and move non-template implementations into MLIRMQTUtils. Model direct consumer dependencies explicitly and keep support and dialect registration layers free of the helper target. Assisted-by: Codex
|
Okay. Took this for another spin and I think this is now ready to be merged 🚀 I'll tag this for auto-merge now so that it hopefully goes through over night 😴 |
I really like how this looks now! Thanks for addressing all of my comments! 🙂 |
Thanks for the good feedback! 🙌🏼 |
main moved the contents of `mlir/Dialect/Utils/Utils.h` into the `MQT/Utils` headers in #2202. This file uses none of those symbols, and the replacement includes it does need are already in place. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
main moved `IRVerification` out of the library and into `mlir/unittests` in #2202, where the tests include it by its unittest-relative path. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
🤖 AI text below 🤖
Description
This pull request follows #2150 and gives shared compiler infrastructure clear ownership:
Dialect/Utilsto the MQT dialect.Dialect/MQT/Utilswithout introducing a shared QC/QCO unitary interface.mlir/Support.Dialect/Utilsfiles and document the MQT passes.The existing pass names and behavior remain unchanged. The new layout separates MQT-owned quantum semantics, generic MLIR support, and test-only infrastructure.
Validation completed after rebasing onto the merged #2150:
Checklist
If PR contains AI-assisted content:
🤖 *AI text below* 🤖(titles are exempt).