Conversation
That avoids CIs, allowing easier spoofing of effects through efuncs.
vchuravy
reviewed
Feb 9, 2026
vchuravy
approved these changes
Feb 10, 2026
Member
Author
|
Going to minimize some of the intrinsic definitions still, removing bodies where possible. |
Member
|
Unsure if you need it, but if you add the lattice (the weird L) as an argument to your tfunc, you can also participate in the extended lattice and as an example implement the correct behavior when you get a PartialConst |
vchuravy
reviewed
Feb 10, 2026
When Julia's optimizer constant-folds an SSA statement (via concrete eval, SROA, constant propagation), it becomes a bare literal value instead of an Expr(:call, ...). The else-branch in emit_statement! previously just warned and discarded these, so the SSA slot was never registered in ctx.values, causing "SSAValue not found" crashes for any downstream reference. Delegate to emit_constant!/emit_value! for literal values, mirroring the existing pattern in emit_rhs!. Add regression test using crafted IR (the optimizer propagates constants too aggressively for a source-level repro). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Previously, emit_expr! returned nothing for Expr(:boundscheck), so the SSA slot was never registered. When the IR structurizer created an IfOp whose condition referenced that SSA, emit_value! crashed with "SSAValue not found". This happens when concrete_eval_eligible doesn't block semi-concrete eval, causing @BoundsCheck blocks from tuple indexing in the One() adapter to survive to codegen. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
:call, not:invoke, allowing easier spoofing of effectsefuncsto set proper effectstfuncsto model const-prop behaviorThanks to @vchuravy for the help.