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

Doubly-linked lists for CFG layouts #1124

Merged
merged 7 commits into from
Feb 23, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge remote-tracking branch 'upstream-flambda-backend/main' into layout
  • Loading branch information
gretay-js committed Feb 23, 2023
commit c1118b57cb6ee44752b35442f8fd9691b421fcc4
20 changes: 13 additions & 7 deletions backend/cfg/cfg_regalloc_utils.ml
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,19 @@ let make_temporary :
let simplify_cfg : Cfg_with_layout.t -> Cfg_with_layout.t =
fun cfg_with_layout ->
let cfg = Cfg_with_layout.cfg cfg_with_layout in
Cfg.iter_blocks cfg ~f:(fun _label block ->
Cfg.DoublyLinkedList.filter_left block.body ~f:(fun instr ->
not (Cfg.is_noop_move instr)));
Eliminate_fallthrough_blocks.run cfg_with_layout;
Merge_straightline_blocks.run cfg_with_layout;
Eliminate_dead_code.run_dead_block cfg_with_layout;
Simplify_terminator.run cfg;
Profile.record ~accumulate:true "remove-noop-move"
(fun () ->
Cfg.iter_blocks cfg ~f:(fun _label block ->
Cfg.DoublyLinkedList.filter_left block.body ~f:(fun instr ->
not (Cfg.is_noop_move instr))))
();
Profile.record ~accumulate:true "eliminate" Eliminate_fallthrough_blocks.run
cfg_with_layout;
Profile.record ~accumulate:true "merge" Merge_straightline_blocks.run
cfg_with_layout;
Profile.record ~accumulate:true "dead_block"
Eliminate_dead_code.run_dead_block cfg_with_layout;
Profile.record ~accumulate:true "terminator" Simplify_terminator.run cfg;
cfg_with_layout

let precondition : Cfg_with_layout.t -> unit =
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.