Repository activity
40458 results across all weeks
Optimize `equal` for `int or_null`
(Not sure at all this is the best IR for that.)
Xavier Clerc (@xclerc)Overhaul of sort variable levels
Unsound layout polymorphism is abound, because levels of sort variables are not correctly tracked, and they could generalise via let poly_ at semi-arbitrary points.
Jakub Bachurski (@jbachurski)Peephole on tag_int(x lsr n): make #int array length primitive as good as standard array length
There was a missing peephole optimisation for this primitive.
Pierre Chambart (@chambart)Peephole optimise imul to lea for multipliers 3,5,9.
We already use lea in place of imul for simple constant multipliers in some places. In experimenting with writing hash functions in OxCaml, @nmatschke found some places where that was not done. This adds a peephole stage on the backend to pick up those cases.
Nick Barnes (@NickBarnes)Prevent [@unboxable] from applying to local values
The current implementation of unboxing for parameters in Flambda2 will create allocations in the unboxed version, with the hope that these allocations will be simplified away. However, for values with local mode, inserting such allocations is bad, because we don't know the region in which they're going to live.
Vincent Laviron (@lthls)Prevent abstract kinds from escaping their scope
This implements raising Escape errors for Jkinds, just like for types.
Jakub Bachurski (@jbachurski)Printing and hiding a mode polymorphic curry mode
This PR makes the following changes to the printer of mode polymorphic variables, all related to curry mode:
ainageorgesProduce structured mode diagnostics
This PR introduces the diagnsotics/ directory, which consumes errors in the compiler and produces "structured diagnostics".
Gavin Gray (@gavinleroy)Propagate expected application results before typing arguments
Import the application typing rule from ocaml/ocaml#285: propagate the expected application result before typing arguments. Build on composite kind constraint propagation so result constraints can refine argument types.
dkalinichenko-jsPropagate kind constraints through with-bounds
When resolving kind constraints with with-bounds on the left, propagate the constraints to the variables in with-bounds if possible. This means we can now type:
dkalinichenko-jsReaper: answer rebuild's queries at solve time
This PR introduces an optimization in the reaper: it precomputes the queries asked at build time. That is, the datalog queries the rebuild needs are recorded during traversal, run in bulk once the fixpoint is solved, and captured as plain values. [Rebuild_solution] packages the query results with the unboxing decisions and code changes. The rebuild consumes …
Simon Spies (@spiessimon)Reaper: compute slot offsets from explicit inputs
This PR materializes the inputs of the slot offset computation in preparation for link time optimization. It allows us to compute them at traverse time, store them on disk, and then load them for the solve time computation.
Simon Spies (@spiessimon)Reaper: keep unboxed fields in a fixed traversal order
This PR materializes the order in which we traverse unboxed fields in preparation for link-time optimization. The reason is that fields are hash consed, so if we serialize and then deserialize fields, we are not guaranteed the same ids. By fixing the order, we can be sure that rebuilt parameters and arguments agree with code metadata on the order of fields.
Simon Spies (@spiessimon)Reaper: read result arities from the code metadata
This PR removes result arity as an accumulator field in traverse_acc.ml, because the information is already in the code metadata.
Simon Spies (@spiessimon)Reaper: record cross-unit call references, resolved before solving
This PR prepares for link-time optimization with the reaper. Specifically, it records calls that cross compilation units, thereby delaying when they are added to the dependency graph. This change will allow us to record the relevant calls at traverse time and then actually connect them at rebuild time.
Simon Spies (@spiessimon)Reaper: split into staged traverse, solve and rebuild phases
In preparation for link-time optimization, this PR refactors the reaper into traverse, solve, and rebuild stages. This will allow us to run these steps in different ocamlopt processes in the future.
Simon Spies (@spiessimon)Recheck constraints after refining parameters from manifests
Reject:
dkalinichenko-jsRecompute type declaration variance after module dependency elimination
Title. #6762 exposed an edge case where code in Ctype.update_level was not properly expanding parametrized constructors with phantom parameters through aliases, because those aliases had imprecise variance information. Now we recompute type declaration variance after module dependency elimination. See tests, before and after the change, for more context.
dkalinichenko-jsRecord compiler profiling in Dune action traces
Liam Stevenson (@liam923)Record compiler timings in Dune action traces
PR for testing
Liam Stevenson (@liam923)