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

@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 from 9834dbd to a3e57e4 Compare July 16, 2025 22:10
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