Skip to content

Flambda trunk#132

Closed
lefessan wants to merge 1269 commits intoocaml:trunkfrom
chambart:flambda_trunk
Closed

Flambda trunk#132
lefessan wants to merge 1269 commits intoocaml:trunkfrom
chambart:flambda_trunk

Conversation

@lefessan
Copy link
Contributor

Here is the branch of Pierre Chambart containing an improved optimization pass, called flambda. We are looking for testers and reviewers to help for its integration in trunk !

@avsm
Copy link
Member

avsm commented Dec 18, 2014

Awesome! For those wanting to experiment, you can quickly try this out in OPAM by:

opam update
opam switch 4.03.0+pr132
eval `opam config env`

@avsm
Copy link
Member

avsm commented Dec 18, 2014

I'm kicking off an OPAM bulk build with this patch and will report back with a URL with the logs when complete.

@gasche
Copy link
Member

gasche commented Dec 18, 2014

The patchset is cleaner than I expected, but it would still help if you tried to rebase to squash/fixup the commits that came during your own rebase to adapt to trunk changes. The idea is that if merging patches A and B together gives a patch that is exactly as simple as A, then the merge should be done.

(It would also be nice to try to ensure that intermediate state compiles (I don't think it is a problem if they emit warnings, however). It both makes the changes easier to review, and will make it easier to bisect the history later on.)

I like having the testsuite. I regret the lack of some text presenting the branch and documenting some of the design choices. I think there was something in this direction used in the previous reviews, would it be possible to update and include it? It's very helpful both for the junior reviewers that don't know what to expect, and for the reviewers that want to be able to check and comment on the general architecture before going into the patch details.

@chambart
Copy link
Contributor

Notice that the flambdasimplify file is not as clean as it should be. There is still quite some work to document the important invariants.

@lpw25
Copy link
Contributor

lpw25 commented Dec 18, 2014

Excellent to see this work progressing. I would like to start with some high-level questions, which I think would need to be explicitly answered before merging could be seriously considered:

  • Could you explain the decision to stick so closely to the existing lambda IL? It is a complicated language, close to a lisp source language, and optimising compilers (which your patch is a first-step in turning ocamlopt into) do not generally operate on such source-like languages. In particular, did you consider using something more csp/anf based, which is generally considered easier to implement inlining on?
  • Could you explain the decision to use a language in which closure conversion has already been done? Inlining is generally easier on a (sensible) intermediate language before closure conversion because it does not require a value analysis to remove unnecessary closures.
  • Could you explain why the compiler needs both clambda and flambda? Could clambda be removed and flambda lowered directly to cmm?

I appreciate that a lot of work has already gone into this patch, and such high level questions would have been better asked at an earlier stage. However, I only recently (a few weeks ago) started to look at the patch (the old version -- I'll have a proper look at the new version soon), so this is my first real opportunity to ask these questions.

@lefessan
Copy link
Contributor Author

I will reply to some questions, although Pierre is probably more competent:

Could you explain the decision to stick so closely to the existing lambda IL?

The goal was to improve the compiler, not to rewrite it completely. Switching to another IL would probably require to implement all subsequent passes on this IL, whereas flambda branches back to clambda to reuse all subsequent existing passes.

Could you explain the decision to use a language in which closure conversion has already been done?

In my own experience, doing inlining before closure conversion is actually more difficult, as the free variables in your inlined function might not be bound in the environment where the function is inlined. This problem disappears after closure conversion. Another reason would be that you want to perform inlining and other optimizations in the same pass, to check if inlining is useful for example, and having done closure conversion can provide opportunities for more optimizations.

Could you explain why the compiler needs both clambda and flambda?

There is still some work done between flambda -> clambda -> cmm. Doing flambda directly to cmm would require flambda to have a different representation for some concepts (variables, if I remember correctly), that would not be the best representation for the optimizations performed in flambda. Going through clambda is simpler and increase utilisation of existing code in the compiler, decreasing the risk to introduce more bugs.

@lpw25
Copy link
Contributor

lpw25 commented Dec 19, 2014

The goal was to improve the compiler, not to rewrite it completely. Switching to another IL would probably require to implement all subsequent passes on this IL, whereas flambda branches back to clambda to reuse all subsequent existing passes.

Surely that is just an argument for using an IL which can be converted to clambda (or a subset of clambda), rather than using a language which closely matches lambda.

In my own experience, doing inlining before closure conversion is actually more difficult, as the free variables in your inlined function might not be bound in the environment where the function is inlined.

This just illustrates that lambda is an inappropriate language for inlining, because it allows full lambda expressions to be bound by let expressions. This allows variables to go out of scope, preventing inlining is some cases. Most ILs do not provide such forms (only allowing let X = V in E where V is a value and E is an expression), and so avoid the problem completely.

Another reason would be that you want to perform inlining and other optimizations in the same pass, to check if inlining is useful for example, and having done closure conversion can provide opportunities for more optimizations.

Could you give an example of the kind of optimisation you have in mind?

@lefessan
Copy link
Contributor Author

Most ILs do not provide such forms (only allowing let X = V in E where V is a value and E is an expression), and so avoid the problem completely.

Isn't it the goal of closure conversion ? Once closure conversion is done, all lambdas are simple values, and can be bound by let without risk.

Could you give an example of the kind of optimisation you have in mind?

Typically, you would perform some inlining, and then go through constant propagation, simplification of expressions, CSE, deadcode elimination, and then check whether the code size has decreased or not, to decide to either backtrack on the decision to inline (if no simplification could be performed) or on the contrary inline even more (if it simplified so much that you are still under some growth threshold). I think Manuel Serrano's paper on Bigloo shows something like that.

@lpw25
Copy link
Contributor

lpw25 commented Dec 19, 2014

Isn't it the goal of closure conversion ? Once closure conversion is done, all lambdas are simple values, and can be bound by let without risk.

Sorry, I was not clear enough in my example. The point is that you do not allow a let form to appear within the expression bound within another let form, that way nothing ever goes out of scope and so the free variables of a function are always in scope if the function is in scope.

The point is you should not need closure conversion to solve this issue, since the issue should not arise in any sensible IL. For a good example of such an IL see "Compiling with continuations continued" by Kennedy.

Typically, you would perform some inlining, and then go through constant propagation, simplification of expressions, CSE, deadcode elimination, and then check whether the code size has decreased or not, to decide to either backtrack on the decision to inline (if no simplification could be performed) or on the contrary inline even more (if it simplified so much that you are still under some growth threshold). I think Manuel Serrano's paper on Bigloo shows something like that.

This either requires implementing these optimisations on flambda, or lowering the flambda to cmm and then performing them. Nothing immediately strikes me as making either of these options easier (or harder) after closure conversion. I'm also a little dubious about how they would affect compilation time and predictability of inlining, but that is a separate concern.

@gasche
Copy link
Member

gasche commented Dec 19, 2014

This either requires implementing these optimisations on flambda, or lowering the flambda to cmm and then performing them. Nothing immediately strikes me as making either of these options easier (or harder) after closure conversion.

Constant propagation (in fact a slightly more general value analysis) is currently done during closure conversion. Moving it to flambda is a natural choice that simplifies the closure conversion pass in a non-invasive way. Dead code elimination seems no harder to perform on flambda than another level, but I agree that CSE is probably more useful after cmm (typically to observe bound checks).

@mshinwell
Copy link
Contributor

Leo, I think (at least on this pull request) it would be sensible to step back a little from the arguments about the form of the intermediate language. There are clearly various possibilities about what form of IL could be used to implement these sorts of middle-end optimizations, and my general sense is that each will ultimately turn out to have its advantages and disadvantages---I suspect it's actually very difficult to label one as particularly more "sensible" than the others in any watertight manner. flambda has chosen to remain close to what the OCaml backend uses at the moment, which is probably sensible from a software engineering point of view (this is enough of an upheaval already).

I'm not an expert at the middle-end of compilers but my general feeling is that if you take the existing lambda/flambda-style of IL as a prior, then it's probably easiest to do some lightweight form of closure conversion (and I think flambda's is fairly lightweight) early and then do the inlining and further analyses afterwards. It would seem to be easier in terms of dealing with free variables, and potentially means that more optimization passes would be able to work on the same form of IL, hopefully leading to more sharing of code. I would be surprised if the value analysis wouldn't be useful for other optimizations too.

@lpw25
Copy link
Contributor

lpw25 commented Dec 19, 2014

Leo, I think (at least on this pull request) it would be sensible to step back a little from the arguments about the form of the intermediate language.

Sure. To be clear I'm not arguing against the merging of flambda. It seems no harder to simplify the middle-end after these changes have been merged, and it is a clear improvement over what exists currently (in terms of performance of code produced -- the complexity and performance of the implementation itself are less clearly improvements). I just think that, before merging, it is important that the design decisions inherent in the change are made clear.

I'm not an expert at the middle-end of compilers but my general feeling is that if you take the existing lambda/flambda-style of IL as a prior, then it's probably easiest to do some lightweight form of closure conversion (and I think flambda's is fairly lightweight) early and then do the inlining and further analyses afterwards.

I agree, but it is the "if you take the existing lambda/flambda-style of IL as a prior" that I'm not sure is the right design long term. I'm also interested if Fabrice or Pierre have reasons beyond this for doing the closure conversion before inlining. Again, it is clarity on the design decisions I am after, rather than any specific changes to this patch.

@lpw25
Copy link
Contributor

lpw25 commented Dec 19, 2014

I just think that, before merging, it is important that the design decisions inherent in the change are made clear.

Along the same lines, it would be useful to have a list of the passes/optimisations that the patch adds. Perhaps they are already listed somewhere in the patch, but I don't remember seeing it when I looked through the old version.

(Even more useful would be a list of all optimisation passes in the compiler both before and after this patch -- but it seems unfair to ask Fabrice and Pierre for this just because they happen to have added some new ones).

Also, are there any benchmark results for the various optimisations? If not, does anyone have good suggestions for benchmarks (a problem Xavier also complained about when he added CSE)?

@gasche
Copy link
Member

gasche commented Dec 19, 2014

If not, does anyone have good suggestions for benchmarks (a problem Xavier also complained about when he added CSE)?

Yes: Vincent Bernardoff ( @vbmithr ) worked on a set of benchmarks for OCaml during an internship at OCamlPro. The work is still young and fresh, and I haven't yet had the time to play more with it, but it could be fairly useful to evaluate changes such as this one. I hope to write more about it eventually.

For the record I have played a bit with the flambda branch in the past when asking questions of the form "would {trunk, flambda} be able to optimize this code pattern?" and been generally satisfied with the answers -- for things that wouldn't show up much in benchmarks of existing code, such as functor inlining or code-generation-specific patterns. I think the even more important question is whether the IL makes it easier to implement new optimizations correctly or improve the existing ones.

@bactrian
Copy link

On 19 Dec 2014, at 09:40, gasche [email protected] wrote:

If not, does anyone have good suggestions for benchmarks (a problem Xavier also complained about when he added CSE)?

Yes: Vincent Bernardoff ( @vbmithr https://github.com/vbmithr ) worked on a set of benchmarks for OCaml during an internship at OCamlPro. The work is still young and fresh, and I haven't yet had the time to play more with it, but it could be fairly useful to evaluate changes such as this one.

Is this work available online anywhere?

@lpw25
Copy link
Contributor

lpw25 commented Dec 19, 2014

Aaah! @bactrian has become sentient.

@avsm
Copy link
Member

avsm commented Dec 19, 2014

Gosh darn it, I've been outed! It is actually me, Annnniiiil!

@vbmithr
Copy link

vbmithr commented Dec 19, 2014

http://github.com/vbmithr/operf-macro
Have a look, and don't hesitate to ask questions. I have completed my "internship" in the end of november, and this is the result. We wanted to use it a bit more with @chambart before announcing it to the world. The doc should be OK though.

@lefessan
Copy link
Contributor Author

I think the main argument against "inlining before closure conversion" is inter-module inlining: to allow inter-module inlining, you have to be able to recover the variables in the environment from another module. Unfortunately, in OCaml (I think it is not true for Haskell), abstraction through module interfaces allows you to hide values, and thus, such values won't be reachable from the inlined code. After closure conversion, the closure is stored somewhere, so you just have to recover it to access all the environment through it.

For operf-macro, you should access it through http://github.com/OCamlPro/operf-macro, as this is the version that we are going to maintain. There is also operf-micro (http://github.com/OCamlPro/operf-micro, with Vincent's work available as a pull-request to be reviewed before inclusion), that provides micro-benchmarks only for the compiler.

@alainfrisch
Copy link
Contributor

On 12/19/2014 07:18 PM, Fabrice Le Fessant wrote:

I think the main argument against "inlining before closure conversion"
is inter-module inlining: to allow inter-module inlining, you have to be
able to recover the variables in the environment from another module.
Unfortunately, in OCaml (I think it is not true for Haskell),
abstraction through module interfaces allows you to hide values, and
thus, such values won't be reachable from the inlined code. After
closure conversion, the closure is stored somewhere, so you just have to
recover it to access all the environment through it.

Is this still true for functions that are not defined in a functor body
(i.e. at toplevel or under sub-modules)?

The current compilations scheme (which you implemented, I believe) adds
extra fields to each compilation unit to store all extra values which
are not exported, and code within the unit accesses those value through
these extra fields. This means that all these functions should be
closed. Is it not the case?

For functors, the alternate compilation which I suggested recently on
Mantis would achieve a similar effect: all functions defined in the
body would actually have a single value in their closure -- the
structure representing the functor's result. And this value would
normally be accessible wherever such a function is required. I.e. after:

module Y = F(X)

a reference to Y.f would be a function whose closure contains only Y (or
perhaps we could even share the block representing Y and the closure,
with inner pointers). So Y.f can be inlined on the call site.

Alain

@c-cube
Copy link
Contributor

c-cube commented Dec 19, 2014

I have two questions related to shiny new optimizations in OCaml (which I'm truly eager to have):

  • will there be a -O flag to have fast compilation and slow binaries during dev, and slow compilation and fast binaries for production?
  • will there be annotations ([@inline always], [@specialize] for combinators, [@unroll 3] for recursion/loop unrolling, etc.) to give hints to the optimizer? Sometimes we know better than the optimizer and we should be able to direct it.

Apart from that I'm going to try this on small benchmarks of mine. That branch is great.

@yallop
Copy link
Member

yallop commented Dec 19, 2014

@c-cube: there's been some discussion of @inline annotations on the cam-compiler-hacking mailing list.

@rixed
Copy link
Contributor

rixed commented Dec 20, 2014

I just tried a quick benchmark using ocamlgraph, which uses a lot of functors, and the result is great.
Using the sudoku solver found here: https://www.lri.fr/~filliatr/ftp/publis/ocamlgraph-tfp-8.pdf

% opam switch show
4.03.0+trunk
% ocamlfind ocamlopt -inline 99999 -o sudoku.opt -package ocamlgraph -linkpkg sudoku.ml
% ls -l sudoku.opt
-rwxr-xr-x 1 rixed rixed 1754767 Dec 20 19:42 sudoku.opt*
% time ./sudoku.opt < grid1 >/dev/null
0.93s user 0.00s system 99% cpu 0.938 total
% opam switch 4.03.0+pr132
% eval `opam config env`
% ocamlfind ocamlopt -inline 99999 -o sudoku.opt -package ocamlgraph -linkpkg sudoku.ml
% ls -l sudoku.opt
-rwxr-xr-x 1 rixed rixed 3280581 Dec 20 19:43 sudoku.opt*
% time ./sudoku.opt < grid1 >/dev/null
0.59s user 0.00s system 99% cpu 0.599 total

@c-cube
Copy link
Contributor

c-cube commented Dec 21, 2014

Since we are talking about micro-benchmarks, I wrote a very small one
that tests internal iterators (attached). The output is nice too :)

edit: no attachment on github, check http://cedeela.fr/~simon/files/bench_sequence.sh and http://cedeela.fr/~simon/files/bench_sequence2.sh

The results (computing a mean on a large integer sequence after a few
maps/filters, see bench_sequence.sh) are:

4.02.1:
avg: 50000000

real 3.292s
user 3.283s
sys 0.003s

flambda:
avg: 50000000

real 2.008s
user 1.997s
sys 0.010s

So it looks quite nice.

Note: Running the benchmark will install sequence and create files in
your current directory. It will also produce the clambda output of both
compilers for you to read the diff.

@gasche
Copy link
Member

gasche commented Dec 21, 2014

Since they are talking about micro-benchmarks, let's instead bring some macro-benchmarks! I checked the time it takes for trunk and flambda to compile OCaml programs on my machine.

For camlp4, make all takes 1m06s on trunk, and 2m00s on flambda: because of the extra optimization work, the overall compile-time is twice slower. opam install ocamlfind takes 5s in trunk and 10s in flambda: again, twice slower. This just means that the current branch has been optimized with respect to compilation time yet.

Then I tried some bytecode-only compilation to see if the compiler itself had gotten faster thanks to the flambda work. In Batteries, running ocamlbuild src/batteries.cma five times in a row takes 32.5s on trunk, and 37.7s on flambda. It seems that bytecode compilation is slightly slower as well.

@c-cube
Copy link
Contributor

c-cube commented Dec 21, 2014

I'm not sure that's the right place for reporting bugs, but here we go. I don't know exactly how to get the commit number of an opam switch, sorry, I only know the switch is 4.03.0+pr132.

So I tried to compile my datalog library to check its performance.

opam switch 4.03.0+pr132
eval `opam config env`
git clone https://github.com/c-cube/datalog.git
cd datalog
make all

It fails as follows:

ocamlfind ocamlopt -c -g -I src -package unix -package str -package num -inline 10 -I src -o src/topDownCli.cmx src/topDownCli.ml
Value unknown: (var TopDown.interpret/24656 TopDown.interpret_list/24657
TopDownUnix.inlined_closure/6556)

TopDownCli.inlined_closure/5736

TopDownUnix.inlined_closure/6556

Fatal error: exception File "asmcomp/flambdasimplify.ml", line 685, characters 12-18: Assertion failed
Command exited with code 2.

@rixed
Copy link
Contributor

rixed commented Dec 21, 2014

For camlp4, make all takes 1m06s on trunk, and 2m00s on flambda:
because of the extra optimization work, the overall compile-time is twice slower

Meh. How much faster is the camlp4 generated by flambda compared to the one generated by trunk?

@gasche
Copy link
Member

gasche commented Dec 22, 2014

How much faster is the camlp4 generated by flambda compared to the one generated by trunk?

They're about the same speed. Maybe most Camlp4 workflows are IO and GC-bound?

@gasche
Copy link
Member

gasche commented Nov 18, 2015

We discussed flambda in general in the developer meeting today, and there was agreement on trying to get it in the next release if it is ready on time. Mark was aiming for the 4th of December as a landing date.

@gasche gasche closed this Nov 18, 2015
@alainfrisch
Copy link
Contributor

@gasche Why did you close this PR? Should we look at another branch?

@gasche
Copy link
Member

gasche commented Nov 19, 2015

I suspect that the in-development branch is chambart/ocaml-1#flambda_trunk, but I am not sure Mark and Pierre are expecting us to pry on their development history. Having a separate "clean" branch for review made sense at some point, but it looks like the release timeline is too short for this to be effective in practice.

I just closed the PR as a issue-handling reaction: my idea is to maximize, among the open PRs, the proportion of those that require review/decisions, in order to direct the attention of interested contributors (core team or external contributors alike). The writing is already on the wall for this one, so I closed it. If you think (even as a mild intuition) that keeping it open is the better thing to do (encourage the miraculous review from someone?), I'm fine with reopening.

@alainfrisch
Copy link
Contributor

No, no, I was just wondering.

stedolan pushed a commit to stedolan/ocaml that referenced this pull request Jun 9, 2017
Add runtime option to increase stack threshold
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request May 5, 2020
lthls added a commit to lthls/ocaml that referenced this pull request Sep 23, 2020
lthls added a commit to lthls/ocaml that referenced this pull request Sep 23, 2020
lthls added a commit to lthls/ocaml that referenced this pull request Sep 24, 2020
chambart pushed a commit to chambart/ocaml-1 that referenced this pull request Aug 4, 2021
stedolan pushed a commit to stedolan/ocaml that referenced this pull request Oct 5, 2021
stedolan pushed a commit to stedolan/ocaml that referenced this pull request Dec 13, 2021
chambart pushed a commit to chambart/ocaml-1 that referenced this pull request Feb 1, 2022
23a7f73 flambda-backend: Fix some Debuginfo.t scopes in the frontend (ocaml#248)
33a04a6 flambda-backend: Attempt to shrink the heap before calling the assembler (ocaml#429)
8a36a16 flambda-backend: Fix to allow stage 2 builds in Flambda 2 -Oclassic mode (ocaml#442)
d828db6 flambda-backend: Rename -no-extensions flag to -disable-all-extensions (ocaml#425)
68c39d5 flambda-backend: Fix mistake with extension records (ocaml#423)
423f312 flambda-backend: Refactor -extension and -standard flags (ocaml#398)
585e023 flambda-backend: Improved simplification of array operations (ocaml#384)
faec6b1 flambda-backend: Typos (ocaml#407)
8914940 flambda-backend: Ensure allocations are initialised, even dead ones (ocaml#405)
6b58001 flambda-backend: Move compiler flag -dcfg out of ocaml/ subdirectory (ocaml#400)
4fd57cf flambda-backend: Use ghost loc for extension to avoid expressions with overlapping locations (ocaml#399)
8d993c5 flambda-backend: Let's fix instead of reverting flambda_backend_args (ocaml#396)
d29b133 flambda-backend: Revert "Move flambda-backend specific flags out of ocaml/ subdirectory (ocaml#382)" (ocaml#395)
d0cda93 flambda-backend: Revert ocaml#373 (ocaml#393)
1c6eee1 flambda-backend: Fix "make check_all_arches" in ocaml/ subdirectory (ocaml#388)
a7960dd flambda-backend: Move flambda-backend specific flags out of ocaml/ subdirectory (ocaml#382)
bf7b1a8 flambda-backend: List and Array Comprehensions (ocaml#147)
f2547de flambda-backend: Compile more stdlib files with -O3 (ocaml#380)
3620c58 flambda-backend: Four small inliner fixes (ocaml#379)
2d165d2 flambda-backend: Regenerate ocaml/configure
3838b56 flambda-backend: Bump Menhir to version 20210419 (ocaml#362)
43c14d6 flambda-backend: Re-enable -flambda2-join-points (ocaml#374)
5cd2520 flambda-backend: Disable inlining of recursive functions by default (ocaml#372)
e98b277 flambda-backend: Import ocaml#10736 (stack limit increases) (ocaml#373)
82c8086 flambda-backend: Use hooks for type tree and parse tree (ocaml#363)
33bbc93 flambda-backend: Fix parsecmm.mly in ocaml subdirectory (ocaml#357)
9650034 flambda-backend: Right-to-left evaluation of arguments of String.get and friends (ocaml#354)
f7d3775 flambda-backend: Revert "Magic numbers" (ocaml#360)
0bd2fa6 flambda-backend: Add [@inline ready] attribute and remove [@inline hint] (not [@inlined hint]) (ocaml#351)
cee74af flambda-backend: Ensure that functions are evaluated after their arguments (ocaml#353)
954be59 flambda-backend: Bootstrap
dd5c299 flambda-backend: Change prefix of all magic numbers to avoid clashes with upstream.
c2b1355 flambda-backend: Fix wrong shift generation in Cmm_helpers (ocaml#347)
739243b flambda-backend: Add flambda_oclassic attribute (ocaml#348)
dc9b7fd flambda-backend: Only speculate during inlining if argument types have useful information (ocaml#343)
aa190ec flambda-backend: Backport fix from PR#10719 (ocaml#342)
c53a574 flambda-backend: Reduce max inlining depths at -O2 and -O3 (ocaml#334)
a2493dc flambda-backend: Tweak error messages in Compenv.
1c7b580 flambda-backend: Change Name_abstraction to use a parameterized type (ocaml#326)
07e0918 flambda-backend: Save cfg to file (ocaml#257)
9427a8d flambda-backend: Make inlining parameters more aggressive (ocaml#332)
fe0610f flambda-backend: Do not cache young_limit in a processor register (upstream PR 9876) (ocaml#315)
56f28b8 flambda-backend: Fix an overflow bug in major GC work computation (ocaml#310)
8e43a49 flambda-backend: Cmm invariants (port upstream PR 1400) (ocaml#258)
e901f16 flambda-backend: Add attributes effects and coeffects (#18)
aaa1cdb flambda-backend: Expose Flambda 2 flags via OCAMLPARAM (ocaml#304)
62db54f flambda-backend: Fix freshening substitutions
57231d2 flambda-backend: Evaluate signature substitutions lazily (upstream PR 10599) (ocaml#280)
a1a07de flambda-backend: Keep Sys.opaque_identity in Cmm and Mach (port upstream PR 9412) (ocaml#238)
faaf149 flambda-backend: Rename Un_cps -> To_cmm (ocaml#261)
ecb0201 flambda-backend: Add "-dcfg" flag to ocamlopt (ocaml#254)
32ec58a flambda-backend: Bypass Simplify (ocaml#162)
bd4ce4a flambda-backend: Revert "Semaphore without probes: dummy notes (ocaml#142)" (ocaml#242)
c98530f flambda-backend: Semaphore without probes: dummy notes (ocaml#142)
c9b6a04 flambda-backend: Remove hack for .depend from runtime/dune  (ocaml#170)
6e5d4cf flambda-backend: Build and install Semaphore (ocaml#183)
924eb60 flambda-backend: Special constructor for %sys_argv primitive (ocaml#166)
2ac6334 flambda-backend: Build ocamldoc (ocaml#157)
c6f7267 flambda-backend: Add -mbranches-within-32B to major_gc.c compilation (where supported)
a99fdee flambda-backend: Merge pull request ocaml#10195 from stedolan/mark-prefetching
bd72dcb flambda-backend: Prefetching optimisations for sweeping (ocaml#9934)
27fed7e flambda-backend: Add missing index param for Obj.field (ocaml#145)
cd48b2f flambda-backend: Fix camlinternalOO at -O3 with Flambda 2 (ocaml#132)
9d85430 flambda-backend: Fix testsuite execution (ocaml#125)
ac964ca flambda-backend: Comment out `[@inlined]` annotation. (ocaml#136)
ad4afce flambda-backend: Fix magic numbers (test suite) (ocaml#135)
9b033c7 flambda-backend: Disable the comparison of bytecode programs (`ocamltest`) (ocaml#128)
e650abd flambda-backend: Import flambda2 changes (`Asmpackager`) (ocaml#127)
14dcc38 flambda-backend: Fix error with Record_unboxed (bug in block kind patch) (ocaml#119)
2d35761 flambda-backend: Resurrect [@inline never] annotations in camlinternalMod (ocaml#121)
f5985ad flambda-backend: Magic numbers for cmx and cmxa files (ocaml#118)
0e8b9f0 flambda-backend: Extend conditions to include flambda2 (ocaml#115)
99870c8 flambda-backend: Fix Translobj assertions for Flambda 2 (ocaml#112)
5106317 flambda-backend: Minor fix for "lazy" compilation in Matching with Flambda 2 (ocaml#110)
dba922b flambda-backend: Oclassic/O2/O3 etc (ocaml#104)
f88af3e flambda-backend: Wire in the remaining Flambda 2 flags (ocaml#103)
678d647 flambda-backend: Wire in the Flambda 2 inlining flags (ocaml#100)
1a8febb flambda-backend: Formatting of help text for some Flambda 2 options (ocaml#101)
9ae1c7a flambda-backend: First set of command-line flags for Flambda 2 (ocaml#98)
bc0bc5e flambda-backend: Add config variables flambda_backend, flambda2 and probes (ocaml#99)
efb8304 flambda-backend: Build our own ocamlobjinfo from tools/objinfo/ at the root (ocaml#95)
d2cfaca flambda-backend: Add mutability annotations to Pfield etc. (ocaml#88)
5532555 flambda-backend: Lambda block kinds (ocaml#86)
0c597ba flambda-backend: Revert VERSION, etc. back to 4.12.0 (mostly reverts 822d0a0 from upstream 4.12) (ocaml#93)
037c3d0 flambda-backend: Float blocks
7a9d190 flambda-backend: Allow --enable-middle-end=flambda2 etc (ocaml#89)
9057474 flambda-backend: Root scanning fixes for Flambda 2 (ocaml#87)
08e02a3 flambda-backend: Ensure that Lifthenelse has a boolean-valued condition (ocaml#63)
77214b7 flambda-backend: Obj changes for Flambda 2 (ocaml#71)
ecfdd72 flambda-backend: Cherry-pick 9432cfdadb043a191b414a2caece3e4f9bbc68b7 (ocaml#84)
d1a4396 flambda-backend: Add a `returns` field to `Cmm.Cextcall` (ocaml#74)
575dff5 flambda-backend: CMM traps (ocaml#72)
8a87272 flambda-backend: Remove Obj.set_tag and Obj.truncate (ocaml#73)
d9017ae flambda-backend: Merge pull request ocaml#80 from mshinwell/fb-backport-pr10205
3a4824e flambda-backend: Backport PR#10205 from upstream: Avoid overwriting closures while initialising recursive modules
f31890e flambda-backend: Install missing headers of ocaml/runtime/caml (ocaml#77)
83516f8 flambda-backend: Apply node created for probe should not be annotated as tailcall (ocaml#76)
bc430cb flambda-backend: Add Clflags.is_flambda2 (ocaml#62)
ed87247 flambda-backend: Preallocation of blocks in Translmod for value let rec w/ flambda2 (ocaml#59)
a4b04d5 flambda-backend: inline never on Gc.create_alarm (ocaml#56)
cef0bb6 flambda-backend: Config.flambda2 (ocaml#58)
ff0e4f7 flambda-backend: Pun labelled arguments with type constraint in function applications (ocaml#53)
d72c5fb flambda-backend: Remove Cmm.memory_chunk.Double_u (ocaml#42)
9d34d99 flambda-backend: Install missing artifacts
10146f2 flambda-backend: Add ocamlcfg (ocaml#34)
819d38a flambda-backend: Use OC_CFLAGS, OC_CPPFLAGS, and SHAREDLIB_CFLAGS for foreign libs (#30)
f98b564 flambda-backend: Pass -function-sections iff supported. (#29)
e0eef5e flambda-backend: Bootstrap (#11 part 2)
17374b4 flambda-backend: Add [@@Builtin] attribute to Primitives (#11 part 1)
85127ad flambda-backend: Add builtin, effects and coeffects fields to Cextcall (#12)
b670bcf flambda-backend: Replace tuple with record in Cextcall (#10)
db451b5 flambda-backend: Speedups in Asmlink (#8)
2fe489d flambda-backend: Cherry-pick upstream PR#10184 from upstream, dynlink invariant removal (rev 3dc3cd7 upstream)
d364bfa flambda-backend: Local patch against upstream: enable function sections in the Dune build
886b800 flambda-backend: Local patch against upstream: remove Raw_spacetime_lib (does not build with -m32)
1a7db7c flambda-backend: Local patch against upstream: make dune ignore ocamldoc/ directory
e411dd3 flambda-backend: Local patch against upstream: remove ocaml/testsuite/tests/tool-caml-tex/
1016d03 flambda-backend: Local patch against upstream: remove ocaml/dune-project and ocaml/ocaml-variants.opam
93785e3 flambda-backend: To upstream: export-dynamic for otherlibs/dynlink/ via the natdynlinkops files (still needs .gitignore + way of generating these files)
63db8c1 flambda-backend: To upstream: stop using -O3 in otherlibs/Makefile.otherlibs.common
eb2f1ed flambda-backend: To upstream: stop using -O3 for dynlink/
6682f8d flambda-backend: To upstream: use flambda_o3 attribute instead of -O3 in the Makefile for systhreads/
de197df flambda-backend: To upstream: renamed ocamltest_unix.xxx files for dune
bf3773d flambda-backend: To upstream: dune build fixes (depends on previous to-upstream patches)
6fbc80e flambda-backend: To upstream: refactor otherlibs/dynlink/, removing byte/ and native/
71a03ef flambda-backend: To upstream: fix to Ocaml_modifiers in ocamltest
686d6e3 flambda-backend: To upstream: fix dependency problem with Instruct
c311155 flambda-backend: To upstream: remove threadUnix
52e6e78 flambda-backend: To upstream: stabilise filenames used in backtraces: stdlib/, otherlibs/systhreads/, toplevel/toploop.ml
7d08e0e flambda-backend: To upstream: use flambda_o3 attribute in stdlib
403b82e flambda-backend: To upstream: flambda_o3 attribute support (includes bootstrap)
65032b1 flambda-backend: To upstream: use nolabels attribute instead of -nolabels for otherlibs/unix/
f533fad flambda-backend: To upstream: remove Compflags, add attributes, etc.
49fc1b5 flambda-backend: To upstream: Add attributes and bootstrap compiler
a4b9e0d flambda-backend: Already upstreamed: stdlib capitalisation patch
4c1c259 flambda-backend: ocaml#9748 from xclerc/share-ev_defname (cherry-pick 3e937fc)
00027c4 flambda-backend: permanent/default-to-best-fit (cherry-pick 64240fd)
2561dd9 flambda-backend: permanent/reraise-by-default (cherry-pick 50e9490)
c0aa4f4 flambda-backend: permanent/gc-tuning (cherry-pick e9d6d2f)

git-subtree-dir: ocaml
git-subtree-split: 23a7f73
EmileTrotignon pushed a commit to EmileTrotignon/ocaml that referenced this pull request Jan 12, 2024
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.