Skip to content

First merge from main#2971

Closed
mshinwell wants to merge 55 commits intooxcaml:merge-5.2from
mshinwell:merge-5.2-first-merge-from-main
Closed

First merge from main#2971
mshinwell wants to merge 55 commits intooxcaml:merge-5.2from
mshinwell:merge-5.2-first-merge-from-main

Conversation

@mshinwell
Copy link
Copy Markdown
Collaborator

This merges with main at the revision where the first such merge was performed into 5.2-runtime-wip-main. Some conflict resolution was required. This can be reviewed by redoing the merge (go to 97a087f3f5 then merge with 57461473bf) then diffing areas of conflict.

liam923 and others added 30 commits July 16, 2024 16:36
* make f32 modules amd64 only

* format

* update f32/simd tests to also only run on amd64
* Make pprintast handle new modes

* Fix mode printing when there are no legacies

* User optional_legacy_modalities
…aml#2786)

* Add counter column to profiler

* Add option for function level profiling

* Implement CFG spill and reload counter functionality

* Clean up formatting

* Always print ancestors of stages determined worth displaying

* Remove unnecessary string to int conversion

Co-authored-by: Xavier Clerc <xclerc@users.noreply.github.com>

* Prevent Counter methods from raising exceptions

* Only compute counters if requested by user

* Avoid underscore in function name

* Fix accumulation of counters

* Correct reference to Function_level in codegen_main.ml

* Change -dfunc-level to -dgranularity and make profile granularity settable by OCAMLPARAM

* Remove catch-all pattern for profile granularity

* Fix dynamic linking dependencies

* Accumulate spill and reload counts locally before passing to Counter

* Improve readability of profile wrapper for function declaration compilation

* Move counter profiling for regalloc outside pipeline

---------

Co-authored-by: Xavier Clerc <xclerc@users.noreply.github.com>
* `or_null` predef

* More tests

* Gate `or_null` behind `Layouts Alpha`

* Fix merge

* Split and generalize `check_coherence`

* Update ocaml/typing/typedecl.ml

Co-authored-by: Richard Eisenberg <reisenberg@janestreet.com>

* Accept tests

* More tests

* comments

* object tests

* `Stdlib_alpha.Or_null` (oxcaml#2751)

* `Or_null` module

* Tests

---------

Co-authored-by: Diana Kalinichenko <dkalinichenko@janestreet.com>

---------

Co-authored-by: Diana Kalinichenko <dkalinichenko@janestreet.com>
Co-authored-by: Richard Eisenberg <reisenberg@janestreet.com>
* Probes are `value_or_null`

* `Captured_in_object` variables can be null

* fix build on macos?

* fix mac os

* comment

* fix?

* Update ocaml/typing/env.ml

Co-authored-by: Richard Eisenberg <reisenberg@janestreet.com>

* `not-macos`

* wrong `not-macos`

---------

Co-authored-by: Diana Kalinichenko <dkalinichenko@janestreet.com>
Co-authored-by: Richard Eisenberg <reisenberg@janestreet.com>
* Update string to mode cross

* Update tests

* Add cr for test

* Fix formatting
* Typing rules support kind polymorphism

* Horrible concreteness check

* More toward kind inference. I will need a reduction relation

* A little more text in examples

* Example showing unsoundness

* Reduction relation.

Still need to fix Xi(k) usages, as well as rationalize calls
to |-ground.

* I think it's good?

* Propagate kinds of abbreviations during inclusion

* Don't remember user-written jkind for e.g. records

* Update stale comment about nominative types
* Add -dump-into-csv command line flag

* Implement exporting profile information to CSV

* Don't always print ancestors when outputting to CSV

* Sanitise profile columns before adding to CSV

* Leave empty cells blank in CSV

* Add headers to CSV profile output

* Don't print to stdout if -dump-into-csv selected

* Don't print gc info to stdout either if -dump-into-csv selected

* Make match case explicit

* Avoid implying formatter can only be for file

* Avoid unnecessary use of optional arguments

* Use "pass" rather than "stage"

* Force newline in CSV output
* Update arrow types to cross contention and uniqueness

* Remove arg_type and ret_type from for_arrow

* Fix typo in test portable-contend.ml

* Fix failing tests

* Update cr

* remove bad tests

---------

Co-authored-by: Zesen Qian <github@riaqn.org>
* Move float32 back to beta

* Fix `make runtest`

* Fix runtime5 tests
oxcaml#2767)

* commit test with spurious type error

* Zap modalities in a better way

* Add some more tests documenting the behavior.

* fix spurious test failure
* Remove Jane Syntax for n-ary functions

* Delete now-unnecessary coercions

* Remove unintentional space

* Add unintentionally dropped comment

* Remove no-longer-useful Jane Syntax check

* Rework pprintast to differentiate pexp_newtype from pexp_function
* draft implementation

* Add to `Stdlib_alpha`

* `portable` functions

* tests

* Enable tests only on runtime 5

* fixes

* tests

* Move annotations

* `Ptr` -> `Data`

* clarify what exceptions are caught

---------

Co-authored-by: Diana Kalinichenko <dkalinichenko@janestreet.com>
…xcaml#2846)

* Fix printing still happening even if -dump-into-csv set

* Dirty fix to avoid outputting profile information when using make install to dump CSVs for whole compiler

* Add scripts to combine profile information for all compiler files

* Automatically detect summary field names from CSV files

* Make output argument clearer

* Remove total aggregation (leave to end user)

* Support displaying data for multiple passes per file (when they both contain counter data)

* Fix pass name prefix sanitisation issue for CSV

* Move units to second header of summary CSV

* Clean up

* Rename script

* Add use case to hack comment

* Inline script to build compiler

* Fix Python file docstring

* Use _profile as dump directory to convey idea of artifacts being generated

* Simplify OCAMLPARAM using oxcaml#2855

* Move removal completely to script and remove before (with additional checks)

* Remove redundant reverting of environment variables

* Clean up

* Remove unnecessary hack from ocaml/driver/optmaindriver.ml
freemagma and others added 20 commits August 1, 2024 16:29
* added modes to the parsetree and removed `Jane_syntax.Mode_expr`

---------

Co-authored-by: Charlie Gunn <cgunn@janestreet.com>
Co-authored-by: Richard Eisenberg <reisenberg@janestreet.com>
Co-authored-by: Nick Roberts <nroberts@janestreet.com>
* `or_null_reexport`

* fix `or_null` mli

* fix test

* Fixes

* Variance and injectivity annotations

* type parameter tests

* more fixes

---------

Co-authored-by: Diana Kalinichenko <dkalinichenko@janestreet.com>
…aml#2880)

* mend

* Removed accidentally included lrgrep build artifacts from build file

* Make sure parser.cmly gets put into the _install directory

* Removed unnecessary cat of parser_types because Menhir adds the interface they come from. Also, more clearly explained why the parser_types module is necessary

* Undo style changes to preprocess clause

* Undo style changes to preprocess clause

* Removed unnecessary preprocessor depedencies

* Update parser and parser types to account for changes from rebase

* Remove accidental modifications to .gitignore

* Re-added strategy simplified and fixed-exception flags
* Fix for unboxed tuples in closures

* Fix failure when an unboxed pair was in the scope of a function that did not use it, and that function itself contained another function

* Fix closure conversion failure when unboxed variable was the result of a switch

* Fix (needs cleanup)

* cleanup

* make fmt
Avoid generating empty profile.dump files
…ation_context (oxcaml#2848)

Co-authored-by: Mark Shinwell <mshinwell@pm.me>
-vectorize -no-vectorize -dvectorize
Skeleton of the vectorizer pass that does nothing for now.
Tests
* monadic modalities always implied by mutable

* refactor the logic

* add tests
…nt_as_pointer") (oxcaml#2682)

Co-authored-by: Nathanaëlle Courant <nathanaelle.courant@ocamlpro.com>
* refactor string-like access primitives

to make it easier to add primitives for unboxed access without
duplicating as much code

Signed-off-by: David Vulakh <dvulakh@janestreet.com>

* hoist out [indexing_primitives]

don't close over [mode] when constructing the [indexing_primitives]
map, and hoist the computation out of [lookup_primitive]

(previously we were recomputing the cartesian product each time we
entered [lookup_primitive])

Signed-off-by: David Vulakh <dvulakh@janestreet.com>

* make fmt

Signed-off-by: David Vulakh <dvulakh@janestreet.com>

* label [index] and [bound] in [check_bound]

Signed-off-by: David Vulakh <dvulakh@janestreet.com>

* move annotation in [actual_max_length_for_string]

Signed-off-by: David Vulakh <dvulakh@janestreet.com>

* move annotation in [string_like_load]

Signed-off-by: David Vulakh <dvulakh@janestreet.com>

* replace cartesian product helper with let operator

Signed-off-by: David Vulakh <dvulakh@janestreet.com>

* review changes

- change type of [bound_kind] in [bound]
- move some type constraints to arguments
- return old comment about bounds checks
- move [is_substring] to [misc]

Signed-off-by: David Vulakh <dvulakh@janestreet.com>

---------

Signed-off-by: David Vulakh <dvulakh@janestreet.com>
@mshinwell
Copy link
Copy Markdown
Collaborator Author

Please don't merge this PR, I will do it.

Copy link
Copy Markdown
Contributor

@lukemaurer lukemaurer left a comment

Choose a reason for hiding this comment

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

LGTM

@mshinwell
Copy link
Copy Markdown
Collaborator Author

Merged manually

@mshinwell mshinwell closed this Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.