Skip to content

Commit

Permalink
fix effects (some statements do not have effects)
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Aug 26, 2024
1 parent 2f92371 commit 6cde758
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base/compiler/abstractinterpretation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3533,7 +3533,7 @@ function typeinf_local(interp::AbstractInterpreter, frame::InferenceState, nextr
exct = Bottom
changes = nothing
refinements = nothing
effects = EFFECTS_TOTAL
effects = nothing
if isa(stmt, NewvarNode)
changes = StateUpdate(stmt.slot, VarState(Bottom, true), false)
elseif isa(stmt, PhiNode)
Expand Down Expand Up @@ -3602,7 +3602,7 @@ function typeinf_local(interp::AbstractInterpreter, frame::InferenceState, nextr
end
end
end
effects = merge_override_effects!(interp, effects, frame)
effects === nothing || merge_override_effects!(interp, effects, frame)
if lhs !== nothing && rt !== Bottom
if isa(lhs, SlotNumber)
changes = StateUpdate(lhs, VarState(rt, false), false)
Expand Down
1 change: 1 addition & 0 deletions base/compiler/inferencestate.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,7 @@ function merge_effects!(::AbstractInterpreter, caller::InferenceState, effects::
effects = Effects(effects; effect_free=ALWAYS_TRUE)
end
caller.ipo_effects = merge_effects(caller.ipo_effects, effects)
nothing
end
merge_effects!(::AbstractInterpreter, ::IRInterpretationState, ::Effects) = return

Expand Down

0 comments on commit 6cde758

Please sign in to comment.