Commit 8e9a9b01 by Andrey Belevantsev Committed by Andrey Belevantsev

re PR rtl-optimization/83913 (Compile time and memory hog w/ selective scheduling)

       PR rtl-optimization/83913

       * sel-sched-ir.c (merge_expr_data): Choose the middle between two
       different sched-times when merging exprs.

       * gcc.dg/pr83913.c: New test.

From-SVN: r259230
parent ab6dceab
2018-04-09 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/83913
* sel-sched-ir.c (merge_expr_data): Choose the middle between two
different sched-times when merging exprs.
2018-04-09 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/83962
* sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
......
......@@ -1837,8 +1837,12 @@ merge_expr_data (expr_t to, expr_t from, insn_t split_point)
if (EXPR_PRIORITY (to) < EXPR_PRIORITY (from))
EXPR_PRIORITY (to) = EXPR_PRIORITY (from);
if (EXPR_SCHED_TIMES (to) > EXPR_SCHED_TIMES (from))
EXPR_SCHED_TIMES (to) = EXPR_SCHED_TIMES (from);
/* We merge sched-times half-way to the larger value to avoid the endless
pipelining of unneeded insns. The average seems to be good compromise
between pipelining opportunities and avoiding extra work. */
if (EXPR_SCHED_TIMES (to) != EXPR_SCHED_TIMES (from))
EXPR_SCHED_TIMES (to) = ((EXPR_SCHED_TIMES (from) + EXPR_SCHED_TIMES (to)
+ 1) / 2);
if (EXPR_ORIG_BB_INDEX (to) != EXPR_ORIG_BB_INDEX (from))
EXPR_ORIG_BB_INDEX (to) = 0;
......
2018-04-09 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/83913
* gcc.dg/pr83913.c: New test.
2018-04-09 Andrey Belevantsev <abel@ispras.ru>
PR rtl-optimization/83962
* gcc.dg/pr83962.c: New test.
......
/* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
/* { dg-options "-O2 -funroll-all-loops -fselective-scheduling -fsel-sched-pipelining -fschedule-insns -fno-dce -fno-forward-propagate -fno-rerun-cse-after-loop -fno-web" } */
int jo, z4;
int
be (long unsigned int l7, int nt)
{
int en;
jo = l7;
for (en = 0; en < 24; ++en)
{
jo = (jo / z4) * (!!jo >= ((!!nt) & 2));
if (jo == 0)
nt = 0;
else
{
nt = z4;
++z4;
nt = (long unsigned int) nt == (l7 + 1);
}
}
return nt;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment