Skip to content

[mlir][Yul] Follow up on the review of the direct LLVM IR translation - #229

Merged
abinavpp merged 3 commits into
mainfrom
app-yul-dialect-cleanup
Nov 5, 2026
Merged

abinavpp merged 3 commits into
mainfrom
app-yul-dialect-cleanup

Conversation

@abinavpp

@abinavpp abinavpp commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #203: Yul region ops take a single block, a multi-result yul.switch prints its types in parentheses, and the unused yul.upd_free_ptr goes with yul-fuse-free-ptr.

Companion: NomicFoundation/solx#926

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.switch types 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

Comment thread mlir/include/mlir/Dialect/Yul/YulOps.td Resolved
@abinavpp
abinavpp force-pushed the app-yul-dialect-cleanup branch from c4c8b5e to a14e237 Compare November 4, 2026 22:01
@abinavpp
abinavpp added this pull request to stack #231 November 4, 2026 22:14

@PavelKopyl PavelKopyl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@abinavpp
abinavpp merged commit 1c574ec into main Nov 5, 2026
8 checks passed
@abinavpp
abinavpp deleted the app-yul-dialect-cleanup branch November 5, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants