Skip to content

Ordering symbols for closures and code, and closure projection substitution#540

Closed
Keryan-dev wants to merge 3 commits intoocaml-flambda:flambda2.0-stablefrom
Keryan-dev:symbol-ordering
Closed

Ordering symbols for closures and code, and closure projection substitution#540
Keryan-dev wants to merge 3 commits intoocaml-flambda:flambda2.0-stablefrom
Keryan-dev:symbol-ordering

Conversation

@Keryan-dev
Copy link
Copy Markdown

@Keryan-dev Keryan-dev commented Jul 6, 2021

This finish the job of #511 by replacing closure projections by the corresponding lifted symbols and ordering the symbols topologically before declaring them, and grouping when necessary.

This is concurrent to #541, which simply groups declarations together in a single let-binding.

The patch is not in a mergeable state, see issue #542.

I open the two PRs to discuss which approach is preferable as I have little insight on the way Simplify deals with let-symbols, performance-wise.

This patch is heavier than #541 (which doesn't add cost to the transformation) but produce code that might be more easily handled down the line. Sorting the declarations is done in a very similar way than Sorted_lifted_constants, which is a bit frustrating but I didn't think wise to try to adapt it to be of use in Lambda_to_flambda.

@mshinwell
Copy link
Copy Markdown

Being done in the Flambda backend repo.

@mshinwell mshinwell closed this Jan 4, 2022
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