This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Revamp loop profile scaling to profile_probability
> On Sat, Jul 1, 2017 at 7:14 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
> > Hi,
> > this patch makes loop profile scaling to use profile_probability. This
> > is mostly trivial change except for vect_do_peeling which seems to scale
> > profile down and then back up. This is a bad idea, because things may simply
> > drop to 0. So I kept that one to use integer scaling (because probability
> > can not represent value greater than 1).
> >
> > Bootstrapped/regtested x86_64-linux.
>
> This likely regressed
>
> FAIL: gcc.dg/vect/pr79347.c scan-tree-dump-not vect "Invalid sum of "
Oops, thanks. It was stupid updating typo (which took me a long while to find).
I will commit the following after regtesting.
Index: tree-vect-loop-manip.c
===================================================================
--- tree-vect-loop-manip.c (revision 249926)
+++ tree-vect-loop-manip.c (working copy)
@@ -1849,8 +1849,8 @@ vect_do_peeling (loop_vec_info loop_vinf
get lost if we scale down to 0. */
int scale_up = REG_BR_PROB_BASE * REG_BR_PROB_BASE
/ prob_vector.to_reg_br_prob_base ();
- basic_block *bbs = get_loop_body (loop);
- scale_bbs_frequencies_int (bbs, loop->num_nodes, scale_up,
+ basic_block *bbs = get_loop_body (epilog);
+ scale_bbs_frequencies_int (bbs, epilog->num_nodes, scale_up,
REG_BR_PROB_BASE);
free (bbs);
}