Backport ocaml/ocaml#10595 from upstream/trunk#471
Merged
mshinwell merged 4 commits intooxcaml:mainfrom Feb 8, 2022
Merged
Conversation
Contributor
Author
|
Oh, so we're in the very unusual case where flambda2 succeeds, but flambda1 and closure fail, I'll try and look at what's happening. |
Contributor
Author
|
CI is fixed, this is ready for review. |
Collaborator
|
@xclerc do you think you could review this please? (Background: some of the Flambda 2 simplifier has been made non-tail-recursive by accident due to functions with lots of arguments, and this seems like a good patch to have anyway.) |
Contributor
|
Sure, I will review it today; sorry for the delay. |
xclerc
approved these changes
Feb 1, 2022
Contributor
There was a problem hiding this comment.
Two remarks (both fairly orthogonal to this pull request):
- the tests in this pull request are not executed on
this repository for flambda2 since they are in a
directory either not opted-in or opted-opt (depending
on which side of #494 you live); - it is not clear we need to keep
ocaml/asmcomp/xyz
whenxyzis neitheramd64norarm64.
Note: PR#10595 from upstream/trunk does not apply cleanly, considering that a lof of changes to the backend have not been backported yet. Most notably, there are two PR that also changes the same files: - PR#8936 factored away most of the global mutable state used in emit.mlp files into an env passed to a lot of functions. Luckily it does not interact with these changes (apart from creating annoying conflicts in diffs) - PR#10578 raised the number of registers used on s390x and power, (thus altering the max_arguments_for_tailcalls and some calls to "calling_conventions" in the `proc.ml` files)
899efe5 to
852d0a3
Compare
mshinwell
pushed a commit
that referenced
this pull request
Mar 3, 2022
stedolan
added a commit
to stedolan/flambda-backend
that referenced
this pull request
Mar 7, 2022
64235a3 flambda-backend: Change Float.nan from sNaN to qNaN (oxcaml#466) 14a8e27 flambda-backend: Track GC work for all managed bigarray allocations (upstream 11022) (oxcaml#569) c3cda96 flambda-backend: Add two new methods to targetint for dwarf (oxcaml#560) e6f1fed flambda-backend: Handle arithmetic overflow in select_addr (oxcaml#570) dab7209 flambda-backend: Add Target_system to ocaml/utils (oxcaml#542) 82d5044 flambda-backend: Enhance numbers.ml with more primitive types (oxcaml#544) 216be99 flambda-backend: Fix flambda_o3 and flambda_oclassic attributes (oxcaml#536) 4b56e07 flambda-backend: Test naked pointer root handling (oxcaml#550) 40d69ce flambda-backend: Stop local function optimisation from moving code into function bodies; opaque_identity fixes for class compilation (oxcaml#537) f08ae58 flambda-backend: Implemented inlining history and use it inside inlining reports (oxcaml#365) ac496bf flambda-backend: Disable the local keyword in typing (oxcaml#540) 7d46712 flambda-backend: Bugfix for Typedtree generation of arrow types (oxcaml#539) 61a7b47 flambda-backend: Insert missing page table check in roots_nat.c (oxcaml#541) 323bd36 flambda-backend: Compiler error when -disable-all-extensions and -extension are used (oxcaml#534) d8956b0 flambda-backend: Persistent environment and reproducibility (oxcaml#533) 4a0c89f flambda-backend: Revert "Revert bswap PRs (480 and 482)" (oxcaml#506) 7803705 flambda-backend: Cause a C warning when CAMLreturn is missing in C stubs. (oxcaml#376) 6199db5 flambda-backend: Improve unboxing during cmm for Flambda (oxcaml#295) 96b9e1b flambda-backend: Print diagnostics at runtime for Invalid (oxcaml#530) 42ab88e flambda-backend: Disable bytecode compilers in ocamltest (oxcaml#504) 58c72d5 flambda-backend: Backport ocaml/ocaml#10595 from upstream/trunk (oxcaml#471) 1010539 flambda-backend: Use C++ name mangling convention (oxcaml#483) 81881bb flambda-backend: Local allocation test no longer relies on lifting (oxcaml#525) f5c4719 flambda-backend: Fix an assertion in Closure that breaks probes (oxcaml#505) c2cf2b2 flambda-backend: Add some missing command line arguments to ocamlnat (oxcaml#499) git-subtree-dir: ocaml git-subtree-split: 64235a3
stedolan
added a commit
that referenced
this pull request
Mar 7, 2022
64235a3 flambda-backend: Change Float.nan from sNaN to qNaN (#466) 14a8e27 flambda-backend: Track GC work for all managed bigarray allocations (upstream 11022) (#569) c3cda96 flambda-backend: Add two new methods to targetint for dwarf (#560) e6f1fed flambda-backend: Handle arithmetic overflow in select_addr (#570) dab7209 flambda-backend: Add Target_system to ocaml/utils (#542) 82d5044 flambda-backend: Enhance numbers.ml with more primitive types (#544) 216be99 flambda-backend: Fix flambda_o3 and flambda_oclassic attributes (#536) 4b56e07 flambda-backend: Test naked pointer root handling (#550) 40d69ce flambda-backend: Stop local function optimisation from moving code into function bodies; opaque_identity fixes for class compilation (#537) f08ae58 flambda-backend: Implemented inlining history and use it inside inlining reports (#365) ac496bf flambda-backend: Disable the local keyword in typing (#540) 7d46712 flambda-backend: Bugfix for Typedtree generation of arrow types (#539) 61a7b47 flambda-backend: Insert missing page table check in roots_nat.c (#541) 323bd36 flambda-backend: Compiler error when -disable-all-extensions and -extension are used (#534) d8956b0 flambda-backend: Persistent environment and reproducibility (#533) 4a0c89f flambda-backend: Revert "Revert bswap PRs (480 and 482)" (#506) 7803705 flambda-backend: Cause a C warning when CAMLreturn is missing in C stubs. (#376) 6199db5 flambda-backend: Improve unboxing during cmm for Flambda (#295) 96b9e1b flambda-backend: Print diagnostics at runtime for Invalid (#530) 42ab88e flambda-backend: Disable bytecode compilers in ocamltest (#504) 58c72d5 flambda-backend: Backport ocaml/ocaml#10595 from upstream/trunk (#471) 1010539 flambda-backend: Use C++ name mangling convention (#483) 81881bb flambda-backend: Local allocation test no longer relies on lifting (#525) f5c4719 flambda-backend: Fix an assertion in Closure that breaks probes (#505) c2cf2b2 flambda-backend: Add some missing command line arguments to ocamlnat (#499) git-subtree-dir: ocaml git-subtree-split: 64235a3
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.
Backport ocaml/ocaml#10595 that raises the max number of arguments for a tailcall.
I had to manually edit files to apply the diff from the original PR because the diff could not be applied cleanly. Indeed, a lof of changes to the backend in ocaml/ocaml have not been backported yet. Most notably, there are two PR in trunk that also affect the same locations, but are not currently part of the
ocamltree inflambda-backend:proc.mlfiles)I wasn't quite sure what to do with the Changes part of the diff, @mshinwell what's the policy on that part ?
I think a careful review from @lthls is required to make sure I haven't made any typo (considering he reviewed the original PR).