Skip to content
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

Improved handling of calls inside values for inlining reports #626

Merged

Conversation

poechsel
Copy link
Contributor

Take the following code sample:

(* File Foo.ml *)
module A = struct
  let a = f ()
end

Inlining reports were showing the call to f to happen in Foo while it actually happened under Foo.A.
The reason behind this misreporting was that the scoping information wasn't used when creating
the relative path for a call.
This PR use the location information on the call to build the correct relative path. This is fine
because closure conversion won't inline Lambda terms directly: the inliner is only able to inline
terms that were only visited and does not even try to maintain correct debuginfo -- or histories --
on those.

@mshinwell mshinwell added the flambda2 Prerequisite for, or part of, flambda2 label Apr 19, 2022
@poechsel poechsel force-pushed the inlining-reports-calls-inside-values branch from 10d306e to d76f08e Compare April 19, 2022 16:03
Co-authored-by: Luke Maurer <Luke.Maurer@alumni.carleton.edu>
@mshinwell mshinwell merged commit 9872e80 into ocaml-flambda:main May 9, 2022
mshinwell pushed a commit that referenced this pull request May 20, 2022
Co-authored-by: Luke Maurer <Luke.Maurer@alumni.carleton.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flambda2 Prerequisite for, or part of, flambda2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants