Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Lambda optimiser pipeline so that argument-transformation/flattening of calls to imported (already-transformed) functions still happens even when optimisation is disabled (-no_opt / noopt). This prevents mismatches between call sites and imported function calling conventions in “no optimisation” builds.
Changes:
- Extend
FixFlatten.flattento also rewriteCHECK_REMLnodes when a referenced lvar has aFIXphitransformation. - When
optimise_p()is false, run a “noopt” flattening pass (FixFlatten.flattening_noopt) instead of returning the input lambda unchanged. - Add a regression test (
stringconcat.sml) executed withnoopt.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/Compiler/Lambda/OptLambda.sml |
Runs flattening even with optimiser disabled; updates flatten traversal for CHECK_REML. |
test/all.tst |
Documents noopt and runs the new regression test with optimisation disabled. |
test/stringconcat.sml |
New regression program to exercise imported-function call transformation under noopt. |
test/stringconcat.sml.out.ok |
Expected output for the new regression test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| nobasislib ; do not import basis library | ||
| nooptimiser ; disable lambda optimiser | ||
| noopt ; disable lambda optimiser | ||
| ccl ; compare compiler logs |
There was a problem hiding this comment.
The token name for disabling the optimiser is updated to noopt here, but other .tst files still document nooptimiser (e.g. test/parallelism/all.tst). To avoid confusion for contributors and to keep the test-suite documentation consistent, update those headers too (or make the tester accept nooptimiser as an alias if that’s intended).
No description provided.