Skip to content

[mlir] Test updates for the precise internal fnptr dispatch tables - #172

Open
abinavpp wants to merge 1 commit into
mainfrom
app-fnptr-dispatch
Open

[mlir] Test updates for the precise internal fnptr dispatch tables#172
abinavpp wants to merge 1 commit into
mainfrom
app-fnptr-dispatch

Conversation

@abinavpp

@abinavpp abinavpp commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

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.

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 lit FileCheck 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 / _quickSort with comparator fnptr plus additional same-signature candidates).
  • Adjusts SolidityToMLIRPass::genExprs to construct mlir::sol::ICallOp with 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
abinavpp force-pushed the app-fnptr-dispatch branch from 9d70129 to 4a6ed0a Compare August 12, 2026 08:35
@abinavpp
abinavpp marked this pull request as ready for review August 12, 2026 12:47
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.

2 participants