-
Notifications
You must be signed in to change notification settings - Fork 85
For testing #3833
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
Open
gretay-js
wants to merge
56
commits into
main
Choose a base branch
from
refactor_cfg_dead_code_v2_for_test
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
For testing #3833
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
31e5014
to
5b4a146
Compare
* Add ubuntu on arm64 github ci actions with an without debug runtime * Disable test that fails on arm64 / linux
We have a check that the free variables in a probe are all values. Unfortunately, this check runs _after_ translation to lambda, which means it considers the free variables of the lambda code. This is bad if the probe has a reference to a compilation unit that takes a parameter, since that will get translated to a local variable that doesn't appear in the environment and therefore we can't check its jkind. Also, the error one gets in this situation is an uncaught `Not_found` with a backtrace, which is unpleasant and hard to debug. Other improvements are possible, but for the moment we can just remember which lambda-level locals refer to runtime parameters, since those will always have value jkinds. Additionally, I've added a nicer error message for any other `Not_found`s that might arise from this check.
* replace groups via regex substitution * .mlp -> .ml * escape special characters * add output channel parametric versions of some helper functions in emitaux * parameterized emitters in emit.ml * remove regex note again * formatting * remove old emit functions that were commented out * change format string * mark load instruction for debugging difference * mark all load instructions * Revert "mark all load instructions" This reverts commit f639636. * Revert "change format string" This reverts commit e7c38a2. * change format string * Revert "mark load instruction for debugging difference" This reverts commit 43f8ed3. --------- Co-authored-by: Simon Spies <simonspies@icloud.com>
Copy target specific files in root dune
* Remove type parameter from Select_utils.environment * Remove tailrec_label instance var * Make entry and exit fields mutable in Sub_cfg * Remove the current_sub_cfg instance variable
Clean up regalloc jobs (CI).
* add many nops * diffing script * remove hacking-no-watch target and use boot-install instead * avoid jumping around in commits * extract also the build directory and add -S flag * copy bootcompiler instead of final compiler * fix path * cleanup * allow the script to take arguments * revert changes again to non-script files * avoid rebuilding the boot compiler to avoid dune rebuilds * add suggestions for how to diff the result
* Remove _aux suffixes, remove ret, update comment * Rename emit_sequence etc * Another removal of ret
New implementation of emit_stores
… 1) (#3794) * script to build a mutant compiler for comparison * start with emitting address; test by duplicating store instructions * avoid rebuilding the boot compiler accidentally * remove duplicate stores and replace more instructions * remove duplicate load instruction * different load alternatives * fix typos * fix printing to match the original * more loads * stack pointer * support for fixed register * move DSL * moves * ocamlformat * support for unconditional branches * more branching * move symbol emit into DSL * support for labels * add support for symbols besides labels to ARM Ast * symbol operands * support branch lo * replace several branch instructions with DSL * memory barriers * replace lots of standard instructions * move up DSL further * do not print tab for empty arguments * ocamlformat * remove mutant compiler script from this PR * mark changes for future PRs * note that record label should return to its original form
* Remove terminator Specific_can_raise and Arch.can_raise_operation: current target backends don't have specific instructions that can raise.
A simple refactor. Replaces all objects with first-class modules. Inheritance is mimicked using `include`. There is exactly once instance where that doesn't work, since a method gets overridden and one one of the remaining methods calls it, but all that's necessary is to “override” both “methods” (and they're not even in different files so it's easy). The formatting is pretty wonky as I was hoping to keep a small diff in case changes are made upstream. (Obviously this can only help so much, especially given the repeated uses of `method`.)
Co-authored-by: Simon Spies <sspies@janestreet.com>
* remove cvt_emit * remove various .mlp references and settings for .mlp files * catch another emit.mlp reference
…3825) Remove reference to `simple_operation.ml*` in `.ocamlformat-enable`.
* Make weak_array_par more likely to fail on arm64 * Add appropriate memory fences on ephemeron updates
* add hashes for immediates * remove aliases and add missing comparison * remove always and never
… 2) (#3813) * Extend ARM DSL and use it for the emission of more instructions (Part 2) * ocamlformat * naming * Small code cleanup changes * preallocate registers and operands * review * cleanup * fix stack realloc instruction * Handle remaining instruction + refactoring of the memory addressing Co-authored-by: Greta Yorsh <45005955+gretay-js@users.noreply.github.com> * replace remaining load and store instructions * cleanup --------- Co-authored-by: Greta Yorsh <45005955+gretay-js@users.noreply.github.com>
Ensure that Alias bindings are not substituted under lambda This used to be the case, but the recent refactoring of Lletrec introduced a bug. (Due to locals, this is a soundness issue rather than just poor optimisation)
The test has been observed to fail on bytecode too, disable it.
* Move all dead code passes into Cfg_simplify and delete trap handlers * Fix catch-try*.cmm tests * Add compilation flag -cfg-eliminate-dead-trap-handlers * Add flag cfg-eliminate-dead-trap-handlers to some github ci jobs
Fail if any handlers are dead
5b4a146
to
d756cef
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.
Test PR #3768 : enable elimination of dead trap handlers by default and fail if there are any.