Skip to content
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

Backport the main safepoints PRs #740

Merged
merged 14 commits into from
Oct 17, 2022
Prev Previous commit
Next Next commit
Update backend/cfg/simplify_terminator.ml
Co-authored-by: Xavier Clerc <xclerc@users.noreply.github.com>
  • Loading branch information
mshinwell and xclerc committed Oct 17, 2022
commit 36a0db53bd5ce73753d04edafeda2dfb67c95e5c
7 changes: 7 additions & 0 deletions backend/cfg/simplify_terminator.ml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,13 @@ let block (block : C.basic_block) =
| Call_no_return _
| Tailcall (Self _ | Func _)
| Raise _ | Return | Poll_and_jump _ ->
mshinwell marked this conversation as resolved.
Show resolved Hide resolved
(* CR xclerc: I wonder whether Merge_straightline_block should be updated
to optimize a Poll_and_jump block where block is empty, and
has a terminator such as Always block'.

(Note that the blocks are currently and correctly not merged
because Poll_and_jump block can raise. The optimization I
suggest would be to rewrite it to Poll_and_jump block'.) *)
()

xclerc marked this conversation as resolved.
Show resolved Hide resolved
let run cfg = C.iter_blocks cfg ~f:(fun _ b -> block b)