Skip to content

[LifetimeSafety] Implement LiveOrigins analysis #148976

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

Draft
wants to merge 1 commit into
base: users/usx95/07-14-users_usx95_lifetime-safety-add-loan-expiry
Choose a base branch
from

Conversation

usx95
Copy link
Contributor

@usx95 usx95 commented Jul 15, 2025

Add a live origins analysis to the lifetime safety checker.

This PR introduces a new backward dataflow analysis called LiveOriginAnalysis that tracks which origins are live at each program point. The analysis:

  • Uses a LivenessLattice structure to represent the set of live origins
  • Implements transfer functions for assignment, loan issuance, and return statements
  • Joins lattices by taking the union of live origin sets

Copy link
Contributor Author

usx95 commented Jul 15, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@usx95 usx95 changed the title add-liveness-finally [LifetimeSafety] Implement Lianalysis Jul 15, 2025
@usx95 usx95 changed the title [LifetimeSafety] Implement Lianalysis [LifetimeSafety] Implement LiveOrigins analysis Jul 15, 2025
@usx95 usx95 force-pushed the users/usx95/07-14-users_usx95_lifetime-safety-add-loan-expiry branch from 8bbae58 to 037a7ec Compare July 16, 2025 10:45
@usx95 usx95 force-pushed the users/usx95/07-15-add-liveness-finally branch from 6d91a96 to 76e0954 Compare July 16, 2025 10:45
@usx95 usx95 force-pushed the users/usx95/07-15-add-liveness-finally branch from 76e0954 to b51604d Compare July 16, 2025 14:08
@usx95 usx95 force-pushed the users/usx95/07-14-users_usx95_lifetime-safety-add-loan-expiry branch 2 times, most recently from a4cba20 to 7365fc4 Compare July 16, 2025 14:27
@usx95 usx95 force-pushed the users/usx95/07-15-add-liveness-finally branch from b51604d to 9834dbd Compare July 16, 2025 14:28
@usx95 usx95 force-pushed the users/usx95/07-14-users_usx95_lifetime-safety-add-loan-expiry branch from 7365fc4 to a7d03b1 Compare July 16, 2025 22:10
@usx95 usx95 force-pushed the users/usx95/07-15-add-liveness-finally branch 2 times, most recently from a3e57e4 to ba980c0 Compare July 17, 2025 17:48
@usx95 usx95 force-pushed the users/usx95/07-14-users_usx95_lifetime-safety-add-loan-expiry branch from a7d03b1 to d5b093e Compare July 17, 2025 17:48
@usx95 usx95 force-pushed the users/usx95/07-14-users_usx95_lifetime-safety-add-loan-expiry branch from d5b093e to 70b63ed Compare July 17, 2025 18:54
@usx95 usx95 force-pushed the users/usx95/07-15-add-liveness-finally branch 2 times, most recently from 7f47b11 to 91d2800 Compare July 17, 2025 20:07
@usx95 usx95 force-pushed the users/usx95/07-14-users_usx95_lifetime-safety-add-loan-expiry branch from 9a3a69a to 8c5c8f1 Compare July 18, 2025 11:57
@usx95 usx95 force-pushed the users/usx95/07-15-add-liveness-finally branch 2 times, most recently from b591be3 to e940cf0 Compare July 18, 2025 14:27
@usx95 usx95 force-pushed the users/usx95/07-14-users_usx95_lifetime-safety-add-loan-expiry branch from 8c5c8f1 to c29040a Compare July 18, 2025 14:27
@usx95 usx95 force-pushed the users/usx95/07-15-add-liveness-finally branch from e940cf0 to 5eadf7b Compare July 19, 2025 10:01
@usx95 usx95 force-pushed the users/usx95/07-15-add-liveness-finally branch from 5eadf7b to 01b019d Compare July 19, 2025 12:27
@usx95 usx95 force-pushed the users/usx95/07-15-add-liveness-finally branch from 01b019d to e132740 Compare July 19, 2025 12:28
@usx95 usx95 self-assigned this Jul 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

1 participant