[mlir] Update tests after reworking deep copy and clearing procedures - #159
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the MLIR codegen lit FileCheck tests to match recent changes in deep-copy and storage-clearing logic, including updated control-flow structure and loop metadata in the printed MLIR.
Changes:
- Add new regression tests for free-function recursive-struct deep-copy and large static-array clearing (both init-MLIR and EVM MLIR pipelines).
- Refresh expected MLIR output across multiple existing EVM tests to reflect new CFG shapes (new/basic-block renumbering) and loop unroll/annotation metadata.
- Introduce/expect new helper routines in emitted MLIR (e.g., string copy/tail-clearing helpers) where the lowering now factors out logic.
Reviewed changes
Copilot reviewed 31 out of 40 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/lit/mlirCodegen/free-function-recursive-struct.sol | New init-MLIR test for copying a recursive struct from storage to memory. |
| test/lit/mlirCodegen/EVM/free-function-recursive-struct.sol | New EVM-MLIR version of the free-function recursive-struct copy test. |
| test/lit/mlirCodegen/clear-large-static-array.sol | New init-MLIR test for clearing a large static storage array. |
| test/lit/mlirCodegen/EVM/clear-large-static-array.sol | New EVM-MLIR test for clearing a large static storage array. |
| test/lit/mlirCodegen/EVM/storage-packed-shrink.sol | Updates expected CFG targets/basic blocks in shrink logic. |
| test/lit/mlirCodegen/EVM/storage-array.sol | Updates loop structure and adds loop annotation metadata expectations. |
| test/lit/mlirCodegen/EVM/recursive-struct-packed.sol | Updates clearing/copying loop CFG and adds loop annotation metadata expectations. |
| test/lit/mlirCodegen/EVM/recursive-struct-mapping.sol | Updates clear-storage lowering expectations (looped clearing) and loop metadata. |
| test/lit/mlirCodegen/EVM/recursive-struct-delete.sol | Updates delete/clear-storage lowering expectations and loop metadata. |
| test/lit/mlirCodegen/EVM/recursive-struct-copy.sol | Updates clear/copy lowering expectations and loop metadata. |
| test/lit/mlirCodegen/EVM/mapping.sol | Updates location IDs and expects a new helper for copying string data from storage to memory. |
| test/lit/mlirCodegen/EVM/delete.sol | Updates multiple delete/clear paths to loop-based clearing with loop annotation metadata. |
| test/lit/mlirCodegen/EVM/chained-assign.sol | Updates clearing/copy sequences and adds loop annotation metadata expectations. |
| test/lit/mlirCodegen/EVM/array-pop-fixed-scalar.sol | Updates pop/clear sequences to loop-based clearing and adds loop metadata. |
| test/lit/mlirCodegen/EVM/array-pop-dyn.sol | Adds expected helpers for string tail clearing and updates pop/clear CFG + loop metadata. |
| test/lit/mlirCodegen/EVM/array-copy-packed.sol | Updates clearing/copy CFG and loop structure expectations. |
| test/lit/mlirCodegen/EVM/array_pop_packed.sol | Updates packed-pop clearing CFG to loop-based structure and adds loop metadata. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
PavelKopyl
force-pushed
the
kpv-recursive-structs
branch
2 times, most recently
from
July 23, 2026 22:40
9108da7 to
8ed6ead
Compare
PavelKopyl
force-pushed
the
kpv-outline-copy
branch
from
August 6, 2026 16:26
8795fde to
ef88164
Compare
PavelKopyl
force-pushed
the
kpv-outline-copy
branch
from
August 7, 2026 23:42
ef88164 to
ecdfe1c
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.
NomicFoundation/solx-llvm#114