-
Notifications
You must be signed in to change notification settings - Fork 76
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
Emit low-level location information for FDO: use discriminators (2/2) #6
Merged
mshinwell
merged 7 commits into
ocaml-flambda:4.11
from
gretay-js:use_discriminators_for_fdo
Mar 22, 2021
Merged
Emit low-level location information for FDO: use discriminators (2/2) #6
mshinwell
merged 7 commits into
ocaml-flambda:4.11
from
gretay-js:use_discriminators_for_fdo
Mar 22, 2021
Conversation
This file contains 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
gretay-js
force-pushed
the
use_discriminators_for_fdo
branch
from
March 22, 2021 12:36
db6d5ed
to
1da7917
Compare
mshinwell
requested changes
Mar 22, 2021
mshinwell
approved these changes
Mar 22, 2021
mshinwell
referenced
this pull request
in mshinwell/flambda-backend
May 17, 2021
poechsel
pushed a commit
to poechsel/flambda-backend
that referenced
this pull request
May 26, 2021
poechsel
pushed a commit
that referenced
this pull request
Jun 28, 2021
poechsel
pushed a commit
that referenced
this pull request
Jun 29, 2021
lukemaurer
added a commit
to lukemaurer/flambda-backend
that referenced
this pull request
Oct 20, 2021
Coercions only apply to their own domains - that is, a coercion on closures doesn't apply to pairs (which might contain, say, a closure and an int). So we don't want to recurse into types in general when applying coercions. Unfortunately, the situation with closures is ... complicated, as explained in comments.
ccasin
added a commit
to ccasin/flambda-backend
that referenced
this pull request
Mar 12, 2023
5e7dfce331 Merge flambda-backend changes 9f7f2d24a7 Edit script for test merge 1ae71ce59d Review comments (ocaml-flambda#6) 1845365bd0 Layouts version 1 aba629478e Immediacy rework (ocaml-flambda#122) cf4eeefb12 Add no-stack-allocation variant of some tests that print lambda (ocaml-flambda#133) 8f22438aa4 Fully switch over Jane Street Merlin support to `.local-*` (ocaml-flambda#136) 5482a8df7b Remove `Lev_module_definition` from lambda (ocaml-flambda#135) 261e016273 Change modular extensions to produce `AST_desc` types (ocaml-flambda#132) 0760c82c68 Disable module patterns in comprehensions (ocaml-flambda#131) 6acac8024b Add Ctype global state debug printers (ocaml-flambda#130) bc32037f10 Enable support for Jane Street's internal Merlin configuration (ocaml-flambda#64) d1a8d0311b Split out `Clflags.Extension` into a new file, `Language_extension` (ocaml-flambda#125) 435de6d38c Fix bootstrap and add legacy CI (ocaml-flambda#126) 7e5a626e4b Improve the API of language extensions to better support upstream compatibility (and also tooling) (ocaml-flambda#13) c4e17b0b2a Replace var with local for faster mode checking (ocaml-flambda#53) 6d477d8ef1 Merge pull request ocaml-flambda#124 from riaqn/merge-backend d7375333a1 minor fixes after merge f1710d6dc4 Merge flambda-backend changes cc18534f49 Just run make boostrap (ocaml-flambda#123) git-subtree-dir: ocaml git-subtree-split: 5e7dfce331d0e39c695fab9b00e3d2cda7d9ebb4
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.
Use
discriminator
field of.loc
directives for the extra debug info when building with FDO, instead of using line numbers in fabricated files. This means we can preserve the source locations (file and line and column) in FDO executables.This PR is on top of #5 and addresses the second problem described in #5.
Some
Linear
instructions don't have any debug info associated with them, because the compiler's support for propagating debug info is incomplete. We need debug info on each Linear instruction to emit FDO locations as discriminators. Following the semantics ofdebug_line
programs,ocamlfdo
tool infers the missing debug info from the preceding debug info in the order of the original function layout.To ensure that the inferred debug info does not affect backtraces, in comparison to a build without FDO,
ocamlfdo
writes the inferred debug info into [fdo] field of Linear.instruction instead of directly to [dbg] field. This way, the inferred debug info is only used for .loc directives when FDO is enabled.