Skip to content

[CodeGen] Reuse checked machine objects across unobserved source edits - #12

Open
charliermarsh wants to merge 1 commit into
charlie/llvm-consume-cache-pruningfrom
charlie/llvm-checked-changed-source-lines
Open

charliermarsh wants to merge 1 commit into
charlie/llvm-consume-cache-pruningfrom
charlie/llvm-checked-changed-source-lines

Conversation

@charliermarsh

@charliermarsh charliermarsh commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Across eight paired builds, this line mapper used 12.09% fewer instructions to rebuild and link Ruff after a parser edit. The checked records grew from 43.7 to 79.6 MiB. Measured Ruff edit

The object cache already handles source insertions. We now reuse an object across a bounded replacement or deletion when every shortest edit sequence maps its observed lines to the same destinations. LLVM emits a fresh object when a line was deleted or its destination is ambiguous. Large control-flow graphs with short blocks are also eligible.

On the complete −31 SDK, the same warm Ruff edit used 8.90% fewer instructions than the six-change SDK. The two warm stores occupied 51.7 MiB and 75.6 MiB, respectively. All 1,552 rebuilt machine objects matched an ordinary build with the same compiler. Combined replays

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

Hello @charliermarsh 👋

Thank you for submitting a Pull Request (PR) to the LLVM Project. Since this is your first PR, here are a few useful links covering our main contribution policies and review practices.

  • All contributions to LLVM must follow our LLVM AI Tool Use Policy. In particular, if you used AI while working on this PR, remember to add a note to the PR description.
  • The LLVM Code-Review Policy and Practices document contains practical information about the PR process, including how patches are reviewed and accepted, and who can review a PR.
  • Our LLVM Developer Policy describes our expectations for code quality, commit summaries and contains notes on our CI system.

Please reply to this message to confirm that you have read these policies, especially the LLVM AI Tool Use Policy, and that any AI tool usage has been noted in the PR description.


Frequently asked questions

How do I add reviewers?

This PR will be automatically labeled, and the relevant teams will be notified. For some parts of the project, reviewers may also be added automatically.

You can also add reviewers manually using the Reviewers section on this page. If you cannot use that section, it is probably because you do not have write permissions for the repository. In that case, you can request a review by tagging reviewers in a comment using @ followed by their GitHub username.

What if there are no comments?

If you have not received any comments on your PR after a week, you can request a review by pinging the PR with a comment such as “Ping”. The common courtesy ping rate is once a week. Please remember that you are asking for volunteer time from other developers.

Are any special GitHub settings required to contribute to LLVM?

We only require contributors to have a public email address associated with their GitHub commits, see this section of LLVM Developer Policy for details.


If you have questions, feel free to leave a comment on this PR, or ask on LLVM Discord or LLVM Discourse.

Thank you,
The LLVM Community

@charliermarsh
charliermarsh force-pushed the charlie/llvm-checked-changed-source-lines branch from cd61a3f to 160ad81 Compare November 10, 2026 14:24
@charliermarsh
charliermarsh changed the base branch from charlie/llvm-checked-caller-location-objects to charlie/llvm-consume-cache-pruning November 10, 2026 14:24
@charliermarsh
charliermarsh marked this pull request as ready for review November 10, 2026 14:24
@charliermarsh
charliermarsh added this pull request to stack #20 November 10, 2026 14:28
@charliermarsh
charliermarsh force-pushed the charlie/llvm-checked-changed-source-lines branch from 160ad81 to 82c9714 Compare November 17, 2026 05:36
@charliermarsh
charliermarsh removed this pull request from stack #20 November 17, 2026 05:37
@charliermarsh
charliermarsh added this pull request to stack #33 November 17, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant