[mlir] Test updates for the precise internal fnptr dispatch tables - #172
Open
abinavpp wants to merge 1 commit into
Open
[mlir] Test updates for the precise internal fnptr dispatch tables#172abinavpp wants to merge 1 commit into
abinavpp wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Updates MLIR codegen and test expectations to reflect the new “precise internal fnptr dispatch table” lowering/printing behavior (notably around indirect calls and internal dispatch helpers), and adds a new semantic regression test that exercises recursive dispatch through function pointers.
Changes:
- Refreshes multiple
litFileCheck baselines to match updated function-pointer/indirect-call type formatting and updated EVM-side internal dispatch structure. - Adds a new MLIR semantic test covering recursive function-pointer dispatch scenarios (
_sort/_quickSortwith comparator fnptr plus additional same-signature candidates). - Adjusts
SolidityToMLIRPass::genExprsto constructmlir::sol::ICallOpwith the updated operand/attribute signature.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/lit/mlirCodegen/load-store-memory-cleanup.sol | Updates expected sol.ext_icall type formatting for loaded external fnptrs. |
| test/lit/mlirCodegen/load-calldata-cleanup.sol | Updates expected sol.ext_icall type formatting for calldata-loaded external fnptrs. |
| test/lit/mlirCodegen/internal-fn-ref-cmp.sol | Updates expected printing for internal sol.func_constant fn-ref values. |
| test/lit/mlirCodegen/indirect-call.sol | Updates expected printing for sol.default_func_constant, sol.func_constant, sol.icall, and sol.ext_icall. |
| test/lit/mlirCodegen/free_func_ptr.sol | Updates expected printing for free function pointer constant and indirect call. |
| test/lit/mlirCodegen/EVM/indirect-call.sol | Updates EVM IR checks to match the new, narrower internal dispatch helper shape for indirect calls. |
| test/lit/mlirCodegen/EVM/free_func_ptr.sol | Updates EVM IR checks for free-fnptr dispatch to the new helper signature/control flow. |
| test/lit/mlirCodegen/EVM/ctor-fnptr.sol | Updates EVM IR checks for constructor-time fnptr usage and runtime dispatch helper changes. |
| test/lit/mlirCodegen/ctor-fnptr.sol | Updates MLIR checks for ctor fnptr constant and indirect call type formatting. |
| test/lit/mlirCodegen/call-targets.sol | Updates expected sol.ext_icall type formatting for call-target tests. |
| test/libsolidity/semanticTests/mlir/recursive_fnptr_dispatch.sol | Adds a new semantic regression test stressing recursive fnptr dispatch and candidate selection. |
| libsolidity/codegen/mlir/SolidityToMLIR.cpp | Updates ICallOp construction to match the updated op signature. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
abinavpp
force-pushed
the
app-fnptr-dispatch
branch
from
August 12, 2026 08:35
9d70129 to
4a6ed0a
Compare
abinavpp
marked this pull request as ready for review
August 12, 2026 12:47
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#141