🐛 Harden MLIR conversion pass boundaries - #2282
Merged
Merged
Conversation
Declare module-wide conversion passes on ModuleOp and use the typed pass root in their implementations. This prevents unsafe nested invocation and removes redundant runtime casts. Assisted-by: Codex
Validate the jeff entry-point attributes before dialect conversion and report invalid metadata through the pass diagnostic instead of terminating the process. Assisted-by: Codex
Check the QC entry function before normalization and type conversion. Unsupported multi-block input now fails through the pass diagnostic without mutating the module or terminating the process. Assisted-by: Codex
Remove the one-call cleanup wrapper now that the module pass contract makes its failure path impossible. Assisted-by: Codex
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Member
Author
|
FYI: @munich-quantum-toolkit/mqt-cc some genuinely useful simplifications found while working on #2077 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
Description
Make the module-wide MLIR conversion contract explicit and fail closed at two unsafe conversion boundaries.
mlir::ModuleOp, then use the typed pass root directly.No new dependencies or public API changes are introduced.
Codex materially assisted with implementation, review, validation, and this pull-request text.
Validation:
uvx nox -s lintuvx nox -s cpp-lintcmake --build --preset release -j2ctest --preset release --output-on-failure(4,033 passed; one expected skip)Checklist
If PR contains AI-assisted content:
🤖 *AI text below* 🤖(titles are exempt).