Merged
Conversation
* 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
* Regression test with bad output * Fix
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
(cherry picked from commit 7a947c4)
* 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
… same way as errors) (oxcaml#2787)
* 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>
* Modify cms format * Convert cms_uid_to_loc to be an array * Add crs * Add comment to need_to_clear_env * Remove debugging type annotation * Convert directly to array * Remove loadpath from cms * Guard initial_env behind -bin-annot-occurrences * Revert "Convert directly to array" This reverts commit fc1857f. * Directly use array * Revert "Directly use array" This reverts commit 4ccb2ae. * Revert "Convert cms_uid_to_loc to be an array" This reverts commit 808b35b.
* Promote tests that remove redundant kind from error message history * Rename Primitive to Builtin * Remove Const.Sort and Const.Layout aliases * Remove pointless const definition * Remove stale crs about eg layout_float64 * Remove legacy layout usage in printing * Remove legacy layout usage in extension universe check * Rename has_imported_history to is_imported * Remove Legacy module * Remove unused builtins * Move const_of_user_written_annotation into Const module * Update comment * Remove redundant layout definition * Remove unnecessary layout aliases * Document jkind printing * Rename ModeParser to Mode_parser * Fix cr formatting * Remove stale cr * Remove incorrect CRs * Replace any with abstract layout in error message * Assert layout is value in value_kind_of_value_jkind * Don't print : value * Add CRs to remove annotation * Improve debug printing * Share parsing logic between modes and jkinds * Simplify parsing * Add tests * Create test for not calling caml_modify * Reformat files * Add comments to caml_modify test * Rename external_record to internal_record * Hide external_variant's immediacy * Add inlining test for caml_modify * Add copyright header * Clean up typemodifier * Fix prining typo * Add CR to Builtin * Stop calling crossing of nullability mode-crossing * Improve warning 211 message * Restore PRs about incorrect error messages * Cleanup typemodifier more * Fix bug in required maturity level for modes * Fix floatarray kind and promote tests
* Count occurrences of duplicate spills and reloads in a single CFG block * Move round number to regalloc state * Coalesce temporary reloads per block in first regalloc round * Coalesce temporary spills per block in first regalloc round * Avoid adding optimised block level temporaries to list of new temporaries * Split into block and instruction temporaries * Separate instruction and block temporaries in IRC state * Allow caller to select whether coalesce temporaries optimisation will be used * Remove unnecessary condition on setting spilled * Replace GADT with simple Boolean optimisation flag * Revert "Move round number to regalloc state" * Add `block_temporaries` command line flag * Refactor code for counting duplicate/total spills and reloads * Make optimization env variable match naming convention * Delete redundant instructions while iterating over block * Add fast path if no replacements made * Add comment describing the purpose of `coalesce_temp_spills_and_reloads` * Refactor * Fix typo * Refactor * Avoid opening `Cfg` module in `regalloc_rewrite` * Fix typo * Format * Use two diffs instead of constructing union for `diff_all_introduced_temporaries` * Avoid concatenating new instruction and block temporaries lists * Coalesce block temporaries only for blocks that are rewritten * Add CR for short circuiting stack operands * Add CR to avoid applying optimization when it will worsen spills/reloads * Make `coalesce_temp_spills_and_reloads` documentation clearer
* Revert "Move float32 back to beta (oxcaml#2843)" This reverts commit 4846e6c. * fix test * upstream_compatible test * upstream_compatible simd test
* unboxed access primitives for string-likes
index by: int32#,int64#,nativeint#
access width: int16,int32,float32,int64,int128,int32#,float32#,int64#
for bigstring, string, bytes
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* make fmt
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* remove [CAMLprim] from macro names
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* tweak formatting in [lambda.ml{,i}]
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* improve generated tests
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* better data in generated tests
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* add more tests of edge-case indices
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* reflect float32 -> stable in tests
fixes ci
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
---------
Signed-off-by: David Vulakh <dvulakh@janestreet.com>
* Improve regalloc notes. * Update backend/regalloc/NOTES.md Co-authored-by: Milan Tom <48379919+milan-tom@users.noreply.github.com> --------- Co-authored-by: Milan Tom <48379919+milan-tom@users.noreply.github.com>
(cherry picked from commit 53d0120)
(cherry picked from commit 2c60bdd)
Merged
Collaborator
Author
|
Please don't merge this PR, I will do it. |
5678df5 to
5a73fa6
Compare
Collaborator
Author
|
The |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is like #2971, but closer to current
HEADofmain; again it matches a merge point on5.2-runtime-wip-main.Based on #2972.