-
- Downloads
"git@gitlab.cobolworx.com:COBOLworx/gcc-cobol.git" did not exist on "a5650762680ea88c789906de91ded06ee48e1e67"
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.
Showing
- gcc/cfgloopmanip.cc 183 additions, 93 deletionsgcc/cfgloopmanip.cc
- gcc/cfgloopmanip.h 3 additions, 0 deletionsgcc/cfgloopmanip.h
- gcc/loop-unroll.cc 5 additions, 3 deletionsgcc/loop-unroll.cc
- gcc/tree-ssa-loop-manip.cc 6 additions, 24 deletionsgcc/tree-ssa-loop-manip.cc
- gcc/tree-ssa-loop-split.cc 2 additions, 43 deletionsgcc/tree-ssa-loop-split.cc
Loading
Please register or sign in to comment