Repository navigation
[mlir][Yul] Follow up on the review of the direct LLVM IR translation - #229
Merged
Merged
Conversation
abinavpp
requested review from
PavelKopyl and
vladimirradosavljevic
and
a balanced review from Copilot
November 4, 2026 19:46
There was a problem hiding this comment.
🟡 Changes recommended
Verifier test coverage is missing for the tightened region constraints, including the deleted multi-block yul.if negative case, multi-block else regions, switch cases, and a valid empty else region.
1 open issue
What changed in this PR
This follow-up to #203 tightens Yul region constraints for direct LLVM IR translation, fixes multi-result switch printing, and removes unused free-pointer functionality.
Changes:
- Enforce single-block control-flow regions through dialect constraints instead of translation-time checks.
- Print multi-result
yul.switchtypes in parentheses and add regression coverage. - Remove
yul.upd_free_ptr, its fusion pass, and associated build, registration, C API, and test code.
| File | Description |
|---|---|
| mlir/test/Target/LLVMIR/Yul/invalid.mlir | Remove obsolete translation diagnostic cases. |
| mlir/test/Dialect/Yul/switch.mlir | Test multi-result switch printing. |
| mlir/test/Dialect/Yul/fuse-free-ptr.mlir | Delete fusion-pass tests. |
| mlir/test/CAPI/yul.c | Remove Yul pass API tests. |
| mlir/lib/Target/LLVMIR/Dialect/Yul/YulToLLVMIRTranslation.cpp | Rely on dialect region-size constraints. |
| mlir/lib/Dialect/Yul/YulOps.cpp | Use arrow type-list printing for switch results. |
| mlir/lib/Dialect/Yul/Transforms/YulFuseFreePtr.cpp | Delete the fusion pass implementation. |
| mlir/lib/Dialect/Yul/Transforms/CMakeLists.txt | Delete the transforms library target. |
| mlir/lib/Dialect/Yul/CMakeLists.txt | Stop building Yul transforms. |
| mlir/lib/CAPI/Dialect/YulPasses.cpp | Delete Yul pass C API bindings. |
| mlir/lib/CAPI/Dialect/CMakeLists.txt | Remove Yul pass sources and dependencies. |
| mlir/include/mlir/InitAllPasses.h | Remove Yul pass registration. |
| mlir/include/mlir/Dialect/Yul/YulOps.td | Tighten region constraints and remove upd_free_ptr. |
| mlir/include/mlir/Dialect/Yul/Transforms/Passes.td | Delete the fusion pass definition. |
| mlir/include/mlir/Dialect/Yul/Transforms/Passes.h | Delete Yul pass declarations. |
| mlir/include/mlir/Dialect/Yul/CMakeLists.txt | Remove pass declaration and C API generation. |
| mlir/include/mlir-c/Dialect/Yul.h | Remove the generated pass API include. |
Review effort: Balanced
abinavpp
force-pushed
the
app-yul-dialect-cleanup
branch
from
November 4, 2026 20:59
78355fe to
c4c8b5e
Compare
abinavpp
force-pushed
the
app-yul-dialect-cleanup
branch
from
November 4, 2026 22:01
c4c8b5e to
a14e237
Compare
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.

Follow-up to #203: Yul region ops take a single block, a multi-result
yul.switchprints its types in parentheses, and the unusedyul.upd_free_ptrgoes withyul-fuse-free-ptr.Companion: NomicFoundation/solx#926