forked from ocaml-flambda/flambda-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
Use the new directives in Arm #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
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
Add failing test case (and don't fix it)
Previously, the `add_equation` logic handled multiple concerns at the same time in a relatively convoluted way, in part due to the need to accomodate both basic and advanced meet algorithms in the same code. With the removal of the basic meet (ocaml-flambda#3726), we can considerably simplify the code. This commit refactors `add_equation` by decomposing it into smaller, well-defined steps and recognizing that concrete types and aliases need to be handled differently. This restructuring clarifies the process of adding an equation: 1. Compute the canonical of the LHS with `get_canonical_simple_ignoring_name_mode` 2. Check if the type is a concrete type or an alias, which is then resolved to its current canonical (`add_equation_on_canonical`). 3. If an alias, merge the two canonical simples in the Aliases structure, then call `record_demotion` to update the typing env, transferring the existing concrete type from the demoted element to its new canonical element. 4. If a concrete type, perform the `meet` with the existing concrete type, then call `replace_concrete_equation` if a more precise concrete type is found. `replace_concrete_equation` automatically demotes to a constant instead if the concrete type is a singleton (without going through `record_demotion`, since we have already computed the `meet`). Additionally, `Type_grammar.recover_const_alias` is renamed to `must_be_singleton`, which better captures its behavior. Overall, this should be easier to read and maintain. It also facilitates extensions; for instance, the improved relations tracking for the match-in-match heuristics will rely on `record_demotion` and `add_alias_between_canonicals`.
* Disable warning 4 on SIMD instructions only * Move warning "-66" back to one "open" * Stronger condition for [Simd.Seq.equal] * Minor refactor of [Simd.Seq] * Format arm64/regalloc_stack_operands.ml * Refactor Simd.operation * Add a CR * Refactor Simd_selection.pseudoregs_for_operation * Minor refactor in Emit * Refactor SSE string operations: instroduce Pcompare_string layer * minor edit * match on seq id --------- Co-authored-by: Greta Yorsh <[email protected]>
Signed-off-by: Thomas Del Vecchio <[email protected]>
revert order for frametable expression
* remove direct assignment of the form x = e * ocamlformat
disable macOS on x86
7fca7b7
to
647a5f8
Compare
f2bf842
to
4eb459d
Compare
Revert "Disable macOS on x86 (ocaml-flambda#3904)" This reverts commit 0f1d0aa.
debc14e
to
62e9ab4
Compare
* Fix stack offset after eliminating dead handlers * Propagate handler label to Linear.Poptrap for debugging * Move [invalid_stack_offset] to [Cfg] * Remove unused interface * Add [Cfg.set_stack_offset_for_block] * Check top of trap stack on pop in select_utils (disabled by default) * Improve debug printing * Remove Select_utils.debug (statically turn on)
4c703f1
to
820f17b
Compare
…ges to `ART` API (ocaml-flambda#3884) * Use [Are_rebuilding_terms.t] in DE instead of bool Also, remove the `of_bool` function in favour of dedicated constructors for values of type [ART.t], since they were only called with constant literals for now. Not a necessary path, but seems cleaner. * missing renaming * make fmt
* Stable ordering * Update middle_end/flambda2/compare/compare.ml Co-authored-by: Nathanaëlle Courant <[email protected]> --------- Co-authored-by: Nathanaëlle Courant <[email protected]>
…l-flambda#3303) Index lifted cont params y variables instead of custom indexes This should have no observable effect, but will simplify the continuation specialization work, particularly when paired with the replay histories feature, so that lifted cont params can be correctly tracked between a first pass and subsequent passes during continuation specialization.
No mixed float implicit unboxed records
6652136
to
079dfa4
Compare
Currently, any and all variables in scope, including parameters and extra parameters (coming from CSE and unboxing), are added to the lifted_cont_params. This is superfluous, since the handlers of lifted continuations do not contain any reference to these extra params prior to simplification, and these extra params can be recomputed for the lifted continuations. As it stands, this commit alone may lead to regressions, since we currently do not perform unboxing on the lifted_cont_params. This will be fixed in a later commit.
b0d668b
to
b3f70e5
Compare
b3f70e5
to
a7d853d
Compare
bfa142f
to
ae0ac31
Compare
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 PR replaces the manually printed assembly directives in Arm with the new assembly directives. I only observed a minor difference in the resulting assembly: no comments for floating point constants. The difference is summarized in this branch: https://github.com/spiessimon/flambda-backend/tree/new-directives-in-arm-patches