[mlir] Add tests for Improve ABI codegen#93
Open
vladimirradosavljevic wants to merge 8 commits intomainfrom
Open
[mlir] Add tests for Improve ABI codegen#93vladimirradosavljevic wants to merge 8 commits intomainfrom
vladimirradosavljevic wants to merge 8 commits intomainfrom
Conversation
Signed-off-by: Vladimir Radosavljevic <vr@matterlabs.dev>
Signed-off-by: Vladimir Radosavljevic <vr@matterlabs.dev>
Signed-off-by: Vladimir Radosavljevic <vr@matterlabs.dev>
…fset-based refs Signed-off-by: Vladimir Radosavljevic <vr@matterlabs.dev>
…cked Signed-off-by: Vladimir Radosavljevic <vr@matterlabs.dev>
…ements in encoding Signed-off-by: Vladimir Radosavljevic <vr@matterlabs.dev>
…nd encodePacked Signed-off-by: Vladimir Radosavljevic <vr@matterlabs.dev>
Signed-off-by: Vladimir Radosavljevic <vr@matterlabs.dev>
There was a problem hiding this comment.
Pull request overview
This PR updates and expands the MLIR/EVM codegen and MLIR semantic test suites to cover the “Improve ABI codegen” changes (notably calldata/memory allocation sizing, overflow/stride checks, and ABI encode/decode behavior across more aggregate/storage shapes).
Changes:
- Update MLIR EVM FileCheck assertions to reflect the new ABI-related codegen patterns (alignment/rounding, overflow checks, and revert payload construction).
- Extend MLIR semantic tests with additional ABI decode/encode coverage for calldata inputs and nested/static/storage aggregates.
- Add new targeted semantic test files for ABI tail cleanup and (packed) storage array encoding.
Reviewed changes
Copilot reviewed 58 out of 69 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/lit/mlirCodegen/EVM/tx-block-props.sol | Updates EVM MLIR checks to match new allocation/overflow-check codegen in entry path. |
| test/lit/mlirCodegen/EVM/transient.sol | Updates EVM MLIR checks; includes new allocation overflow-check pattern and some revert-path adjustments. |
| test/lit/mlirCodegen/EVM/this.sol | Updates EVM MLIR checks for new calldata copy/allocation logic and overflow checks. |
| test/lit/mlirCodegen/EVM/struct.sol | Updates malloc/codegen checks to include overflow checking and standardized revert payload. |
| test/lit/mlirCodegen/EVM/storage-scalar.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/storage-fnptr.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/storage-array.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/special-fn.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/send-transfer.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/revert.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/require.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/named-return.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/msg-data.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/modifier.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/library.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/interface.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/inline-asm.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/immutable.sol | Updates entry allocation/copy checks with alignment + overflow logic and adjusted immutable handling checks. |
| test/lit/mlirCodegen/EVM/getter.sol | Updates entry allocation/copy checks with alignment + overflow logic; includes a string getter path adjustment. |
| test/lit/mlirCodegen/EVM/event.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/crypto_hash.sol | Updates recover-path checks to include overflow checking around memory-pointer updates. |
| test/lit/mlirCodegen/EVM/contract-cmp.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/calldata-bytes.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/bytes.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/bool-storage.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/balance.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/assgn.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/assert.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/lit/mlirCodegen/EVM/address-cast.sol | Updates entry allocation/copy checks with alignment + overflow logic. |
| test/libsolidity/semanticTests/mlir/invalid-abi.sol | Adds new invalid calldata ABI decode/encode cases (dynamic + nested fixed/dynamic arrays). |
| test/libsolidity/semanticTests/mlir/enum.sol | Adjusts expected failure output for invalid enum input in id. |
| test/libsolidity/semanticTests/mlir/abi.sol | Adds calldata variants for abi.decode and adds nested static array encode coverage. |
| test/libsolidity/semanticTests/mlir/abi-encode-tail-cleanup.sol | New semantic test ensuring ABI encode/encodePacked zeroes tail padding even when reusing dirty memory. |
| test/libsolidity/semanticTests/mlir/abi-encode-struct.sol | Extends struct ABI encoding coverage including storage big/nested structs and struct arrays. |
| test/libsolidity/semanticTests/mlir/abi-encode-storage-array.sol | New semantic tests for abi.encode over multiple storage array shapes (static/dynamic, nested, struct arrays). |
| test/libsolidity/semanticTests/mlir/abi-encode-packed-storage-array.sol | New semantic tests for abi.encodePacked over storage arrays with varying element widths and sizes. |
| test/libsolidity/semanticTests/mlir/abi-encode-packed-nested-fixed-array.sol | New semantic tests for abi.encodePacked over nested fixed arrays across memory/calldata/storage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
solx-llvm PR.