aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2022-09-27 10:16:52 +0200
committerRichard Biener <rguenther@suse.de>2022-11-07 09:59:26 +0100
commit7314b98b1bcd382c996a79bdcd0a1cb1e9231f55 (patch)
tree043054286439775617248db7b0273c3741fba8ab /contrib
parenta8fb90eb3949bfb101bd6f50f24a029e10119591 (diff)
unswitch most profitable condition first
When doing the loop unswitching re-org we promised to followup with improvements on the cost modeling. The following makes sure we try to unswitch on the most profitable condition first. As most profitable we pick the condition leading to the edge with the highest profile count. Note the profile is only applied when picking the first unswitching opportunity since the profile counts are not updated with earlier unswitchings in mind. Further opportunities are picked in DFS order. * tree-ssa-loop-unswitch.cc (unswitch_predicate::count): New. (unswitch_predicate::unswitch_predicate): Initialize count. (init_loop_unswitch_info): First collect candidates and determine the outermost loop to unswitch. (tree_ssa_unswitch_loops): First perform all guard hoisting, then perform unswitching on innermost loop predicates. (find_unswitching_predicates_for_bb): Keep track of the most profitable predicate to unswitch on. (tree_unswitch_single_loop): Unswitch given predicate if not NULL.
Diffstat (limited to 'contrib')
0 files changed, 0 insertions, 0 deletions