diff options
author | Honza <jh@ryzen4.suse.cz> | 2023-07-28 19:39:19 +0200 |
---|---|---|
committer | Honza <jh@ryzen4.suse.cz> | 2023-07-28 19:39:19 +0200 |
commit | 88618fa0211d77d91b70f7af9b02e08a34b57912 (patch) | |
tree | cfd1053672c124cdf0613e618201b8f1a3f65280 /gcc/gimple-range-cache.h | |
parent | fdbb0863b6111ad3f45b79f47ebfe471555b2c4a (diff) | |
download | gcc-88618fa0211d77d91b70f7af9b02e08a34b57912.zip gcc-88618fa0211d77d91b70f7af9b02e08a34b57912.tar.gz gcc-88618fa0211d77d91b70f7af9b02e08a34b57912.tar.bz2 |
Cleanup profile updating code in unrolling and splitting
I have noticed that for all these three cases I need same update of
loop exit probability. While my earlier patch unified it for unrollers,
this patch makes it more general and also simplifies
tree-ssa-loop-split.cc.
I also refactored the code, since with all the special cases for
corrupted profile it gets relatively long.
I now also handle multiple loop exits in RTL unroller.
Bootstrapped/regtested x86_64-linux, comitted.
gcc/ChangeLog:
* cfgloopmanip.cc (loop_count_in): Break out from ...
(loop_exit_for_scaling): Break out from ...
(update_loop_exit_probability_scale_dom_bbs): Break out from ...;
add more sanity check and debug info.
(scale_loop_profile): ... here.
(create_empty_loop_on_edge): Fix whitespac.
* cfgloopmanip.h (update_loop_exit_probability_scale_dom_bbs): Declare.
* loop-unroll.cc (unroll_loop_constant_iterations): Use
update_loop_exit_probability_scale_dom_bbs.
* tree-ssa-loop-manip.cc (update_exit_probability_after_unrolling): Remove.
(tree_transform_and_unroll_loop): Use
update_loop_exit_probability_scale_dom_bbs.
* tree-ssa-loop-split.cc (split_loop): Use
update_loop_exit_probability_scale_dom_bbs.
Diffstat (limited to 'gcc/gimple-range-cache.h')
0 files changed, 0 insertions, 0 deletions