Skip to content

Experimental SSA-form IR borrow checker#34

Merged
MilesCranmer merged 66 commits intomainfrom
ir-checker
Jan 12, 2026
Merged

Experimental SSA-form IR borrow checker#34
MilesCranmer merged 66 commits intomainfrom
ir-checker

Conversation

@MilesCranmer
Copy link
Copy Markdown
Owner

@MilesCranmer MilesCranmer commented Jan 8, 2026

Needs nightly Julia to work.

Basically, now we don't need the annotations anymore.

julia> import BorrowChecker

julia> g!(x) = push!(x, 1)
g! (generic function with 1 method)

julia> BorrowChecker.@auto function foo()
           x = [1, 2, 3]
           y = x
           g!(x)
           return y
       end
foo (generic function with 1 method)

julia> foo()
ERROR: BorrowCheckError for specialization Tuple{typeof(foo)}

  [1] stmt#15: cannot perform write: value is aliased by another live binding
      stmt: :((%13)(%14))

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 8, 2026

Codecov Report

❌ Patch coverage is 81.54762% with 310 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.79%. Comparing base (ebfd424) to head (74e2ac0).
⚠️ Report is 67 commits behind head on main.

Files with missing lines Patch % Lines
src/auto/diagnostics.jl 59.48% 111 Missing ⚠️
src/auto/ir_primitives.jl 74.67% 77 Missing ⚠️
src/auto/summaries.jl 81.64% 67 Missing ⚠️
src/auto/callsite.jl 85.86% 26 Missing ⚠️
src/auto/alias.jl 87.16% 19 Missing ⚠️
src/auto/defs.jl 90.62% 6 Missing ⚠️
src/auto/checker.jl 98.92% 2 Missing ⚠️
src/auto/frontend.jl 98.51% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #34       +/-   ##
===========================================
- Coverage   98.23%   86.79%   -11.44%     
===========================================
  Files          11       19        +8     
  Lines         791     2453     +1662     
===========================================
+ Hits          777     2129     +1352     
- Misses         14      324      +310     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MilesCranmer
Copy link
Copy Markdown
Owner Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c4ba195188

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/auto/summaries.jl Outdated
@yebai
Copy link
Copy Markdown

yebai commented Jan 12, 2026

@MilesCranmer this looks great!

@MilesCranmer MilesCranmer merged commit 4017844 into main Jan 12, 2026
5 of 7 checks passed
@MilesCranmer MilesCranmer deleted the ir-checker branch January 12, 2026 23:22
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.

2 participants