Skip to content

Middle and backend support for unboxed float/int32/int64/nativeint arrays #1926

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

mshinwell
Copy link
Collaborator

@mshinwell mshinwell commented Oct 12, 2023

This adds the arrays of the following element layouts to Lambda array kinds:

  • unboxed float
  • unboxed int32
  • unboxed int64
  • unboxed nativeint

It then threads this through the middle end and backend. It should support all the usual things e.g. static allocation. There are still two things missing [update: now both fixed - see below]:

  • implementations at the Cmm level for the 32-bit arrays, which need packing
  • it uses Abstract_tag instead of Custom_tag just for the moment.

There are some places in flambda2 where we could probably now factor out some code.

@mshinwell mshinwell marked this pull request as draft October 12, 2023 13:59
@mshinwell mshinwell linked an issue Oct 12, 2023 that may be closed by this pull request
@mshinwell mshinwell added flambda2 Prerequisite for, or part of, flambda2 lambda Lambda language changes labels Oct 12, 2023
Copy link
Collaborator

@goldfirere goldfirere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only file owned by me.

@mshinwell mshinwell force-pushed the more-unboxed-arrays branch 2 times, most recently from 0e6a9c8 to 3e8fc6b Compare October 17, 2023 13:42
@mshinwell
Copy link
Collaborator Author

mshinwell commented Oct 17, 2023

This has been updated and now uses custom blocks to represent the arrays. The unboxed int32 implementations have also now been provided for flambda2. I am hoping we may be able to remove flambda1 from the tree soon enough that we can avoid providing those implementations in Cmmgen.

@mshinwell mshinwell force-pushed the more-unboxed-arrays branch from 3e8fc6b to 2b127b6 Compare October 17, 2023 13:59
@mshinwell mshinwell marked this pull request as ready for review October 17, 2023 14:20
@goldfirere
Copy link
Collaborator

Who is going to review this? @mshinwell and I discussed yesterday that 1) there is no way to test the new codepaths in this PR and 2) we should merge anyway. Tests will come when we add frontend support. But first some review would be good, I think.

@mshinwell
Copy link
Collaborator Author

@Gbury is reviewing

@Gbury
Copy link
Contributor

Gbury commented Dec 22, 2023

Closing this one since it is superseded by #2185

@Gbury Gbury closed this Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flambda2 Prerequisite for, or part of, flambda2 lambda Lambda language changes unboxed types
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Arrays of unboxed integer types
3 participants