Skip to content

Commit

Permalink
Fix small bug in #36684
Browse files Browse the repository at this point in the history
PR #36684 changes `iterate(IncrementalCompact)` to return an extra index, but
leaves its arguments unchanged. However, the PR decremented the index argument
in a particular recursive call to `iterate`. This caused `iterate` not to
recognise that it was done when `allow_cfg_transforms` was turned on.
  • Loading branch information
yhls authored and vchuravy committed Aug 21, 2020
1 parent 5f11002 commit 95e9f52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/compiler/ssair/ir.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1206,7 +1206,7 @@ function iterate(compact::IncrementalCompact, (idx, active_bb)::Tuple{Int, Int}=
# Move to next block
compact.idx += 1
if finish_current_bb!(compact, active_bb, old_result_idx, true)
return iterate(compact, (compact.idx-1, active_bb + 1))
return iterate(compact, (compact.idx, active_bb + 1))
else
return Pair{Pair{Int, Int}, Any}(Pair{Int,Int}(compact.idx-1, old_result_idx), compact.result[old_result_idx][:inst]), (compact.idx, active_bb + 1)
end
Expand Down

0 comments on commit 95e9f52

Please sign in to comment.